File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,9 +102,20 @@ jobs:
102102 OPENSEARCH_VERSION : ${{ steps.get_opensearch_version.outputs.version }}
103103 run : npm ci && npm run preprocessing -- --opensearch-version "$OPENSEARCH_VERSION"
104104
105+ - name : Clone Protobuf Generator Repository
106+ run : |
107+ git clone https://github.com/OpenAPITools/openapi-generator cloned-repo
108+ cd cloned-repo
109+ git checkout 6699ecd9d2f4e0868f23bb36566ea03cd1230e6a
110+
111+ - name : Build Protobuf Generator Tool
112+ run : |
113+ cd cloned-repo
114+ ./mvnw clean package
115+
105116 - name : Convert protobuf
106117 run : |
107- java -jar tools/bin /openapi-generator-cli.jar generate -c tools/proto-convert/src/config/protobuf-generator-config.yaml
118+ java -jar cloned-repo/modules/openapi-generator-cli/target /openapi-generator-cli.jar generate -c tools/proto-convert/src/config/protobuf-generator-config.yaml
108119
109120 - name : Check for auto-pr-branch and use its protos if exists
110121 run : |
Original file line number Diff line number Diff line change 1313jobs :
1414 auto-proto-convert :
1515 runs-on : ubuntu-latest
16- # if: github.repository == 'opensearch-project/opensearch-protobufs'
16+ if : github.repository == 'opensearch-project/opensearch-protobufs'
1717 steps :
1818 - name : Checkout Repository
1919 uses : actions/checkout@v4
@@ -32,11 +32,11 @@ jobs:
3232 - name : Download Release Assets
3333 uses : robinraju/release-downloader@v1
3434 with :
35- repository : ' opensearch-project/opensearch-api-specification'
36- latest : true
37- fileName : ' opensearch-openapi.yaml'
38- tag : ' main-latest'
39- preRelease : true
35+ repository : ' opensearch-project/opensearch-api-specification'
36+ latest : true
37+ fileName : ' opensearch-openapi.yaml'
38+ tag : ' main-latest'
39+ preRelease : true
4040
4141 - name : Get Latest Commit ID
4242 id : get_commit
@@ -104,9 +104,20 @@ jobs:
104104 OPENSEARCH_VERSION : ${{ steps.get_opensearch_version.outputs.version }}
105105 run : npm ci && npm run preprocessing -- --opensearch-version "$OPENSEARCH_VERSION"
106106
107+ - name : Clone Protobuf Generator Repository
108+ run : |
109+ git clone https://github.com/OpenAPITools/openapi-generator cloned-repo
110+ cd cloned-repo
111+ git checkout 6699ecd9d2f4e0868f23bb36566ea03cd1230e6a
112+
113+ - name : Build Protobuf Generator Tool
114+ run : |
115+ cd cloned-repo
116+ ./mvnw clean package
117+
107118 - name : Convert protobuf
108119 run : |
109- java -jar tools/bin /openapi-generator-cli.jar generate -c tools/proto-convert/src/config/protobuf-generator-config.yaml
120+ java -jar cloned-repo/modules/openapi-generator-cli/target /openapi-generator-cli.jar generate -c tools/proto-convert/src/config/protobuf-generator-config.yaml
110121
111122 - name : Post Process Protobuf
112123 id : merge_report
Original file line number Diff line number Diff line change @@ -588,6 +588,10 @@ export class SchemaModifier {
588588 const prop = schema . properties [ propName ] as any ;
589589 if ( prop && typeof prop === 'object' ) {
590590 prop [ 'x-oneof-property' ] = true ;
591+
592+ if ( '$ref' in prop ) {
593+ this . markReferencedSchemaAsOneof ( prop . $ref ) ;
594+ }
591595 }
592596 }
593597 }
You can’t perform that action at this time.
0 commit comments