Commit 20df9ea0 authored by Nugine's avatar Nugine
Browse files

feat(codegen/minio): x-minio-force-delete

parent d3822295
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4,9 +4,11 @@ on:
  push:
    branches:
      - main
      - minio
  pull_request:
    branches:
      - main
      - minio
      - 'feat/**'
  schedule:
    - cron: '0 0 * * 0' # at midnight of each sunday
+25 −0
Original line number Diff line number Diff line
name: MinIO

on:
  push:
    branches:
      - main

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: taiki-e/install-action@just
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - run: |
          git checkout main
          git checkout -B minio
          just codegen
      - uses: actions-js/push@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: minio
          force: true
          message: "sync codegen minio"
+8 −0
Original line number Diff line number Diff line
@@ -69,6 +69,11 @@ pub fn codegen(ops: &Operations, rust_types: &RustTypes) {
                        s => s,
                    };

                    if field.is_custom_extension {
                        g!("{s3s_field_name}: None,");
                        continue;
                    }

                    if field.type_ == "SelectObjectContentEventStream" {
                        g!("{s3s_field_name}: Some(crate::event_stream::from_aws(x.{aws_field_name})),");
                        continue;
@@ -159,6 +164,9 @@ pub fn codegen(ops: &Operations, rust_types: &RustTypes) {
                }

                for field in &ty.fields {
                    if field.is_custom_extension {
                        continue;
                    }
                    let s3s_field_name = field.name.as_str();
                    let aws_field_name = match s3s_field_name {
                        "checksum_crc32c" => "checksum_crc32_c",
+4 −0
Original line number Diff line number Diff line
@@ -54,6 +54,10 @@ pub fn codegen(ops: &Operations, rust_types: &RustTypes) {
            };

            for field in ty.fields.iter().chain(flattened_fields) {
                if field.is_custom_extension {
                    continue;
                }

                let s3s_field_name = match ty.name.as_str() {
                    "SelectObjectContentInput" if field.name == "request" => continue,
                    "SelectObjectContentInput" if field.position == "xml" => f!("request.{}", field.name),
+2 −0
Original line number Diff line number Diff line
@@ -202,6 +202,7 @@ pub fn collect_rust_types(model: &smithy::Model, ops: &Operations) -> RustTypes
                        http_query: field.traits.http_query().map(o),
                        xml_name: field.traits.xml_name().map(o),
                        xml_flattened: field.traits.xml_flattened(),
                        is_custom_extension: field.traits.minio(),
                    };
                    fields.push(field);
                }
@@ -281,6 +282,7 @@ fn patch_types(space: &mut RustTypes) {
            http_query: None,
            xml_name: Some(request.name.clone()),
            xml_flattened: false,
            is_custom_extension: false,
        });
        ty.name = o("SelectObjectContentInput");

Loading