File tree Expand file tree Collapse file tree
tools/proto-convert/src/config/protobuf-schema-template Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010jobs :
1111 auto-proto-convert :
1212 runs-on : ubuntu-latest
13- # if: github.repository == 'opensearch-project/opensearch-protobufs'
13+ if : github.repository == 'opensearch-project/opensearch-protobufs'
1414 steps :
1515 - name : Checkout Repository
1616 uses : actions/checkout@v4
@@ -107,10 +107,7 @@ jobs:
107107 run : npm ci && npm run preprocessing -- --opensearch-version "$OPENSEARCH_VERSION"
108108
109109 - name : Clone Protobuf Generator Repository
110- run : |
111- git clone https://github.com/OpenAPITools/openapi-generator cloned-repo
112- cd cloned-repo
113- git checkout 6699ecd9d2f4e0868f23bb36566ea03cd1230e6a
110+ run : git clone https://github.com/lucy66hw/openapi-generator.git cloned-repo
114111
115112 - name : Build Protobuf Generator Tool
116113 run : |
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import "{{{import}}}.proto";
3030{ {/oneOf} }
3131{ {^oneOf} }
3232 { {#vars} }
33+ { {^vendorExtensions.x-protobuf-oneof-property} }
3334 { {#description} }
3435 // { {{.} }}
3536 { {/description} }
@@ -47,8 +48,34 @@ import "{{{import}}}.proto";
4748
4849 { {enumName} } { {name} } = { {vendorExtensions.x-protobuf-index} };
4950 { {/isEnum} }
51+ { {/vendorExtensions.x-protobuf-oneof-property} }
52+ { {/vars} }
53+ { {#vendorExtensions.x-protobuf-minmax-schema} }
54+ oneof min_max_properties_choice {
55+ {{#vars} }
5056
57+ { {#vendorExtensions.x-protobuf-oneof-property} }
58+ { {#description} }
59+ // { {{.} }}
60+ { {/description} }
61+ { {^isEnum} }
62+ { {#vendorExtensions.x-protobuf-type} }{ {{.} }} { {/vendorExtensions.x-protobuf-type} }{ {{vendorExtensions.x-protobuf-data-type} }} { {{name} }} = { {vendorExtensions.x-protobuf-index} }{ {#vendorExtensions.x-protobuf-packed} } [packed=true]{ {/vendorExtensions.x-protobuf-packed} };
63+ { {/isEnum} }
64+ { {#isEnum} }
65+ enum { {enumName} } {
66+ {{#allowableValues} }
67+ { {#enumVars} }
68+ { {{name} }} = { {{protobuf-enum-index} }};
69+ { {/enumVars} }
70+ { {/allowableValues} }
71+ }
72+
73+ { {enumName} } { {name} } = { {vendorExtensions.x-protobuf-index} };
74+ { {/isEnum} }
75+ { {/vendorExtensions.x-protobuf-oneof-property} }
5176 { {/vars} }
77+ }
78+ { {/vendorExtensions.x-protobuf-minmax-schema} }
5279{ {/oneOf} }
5380}
5481{ {/isEnum} }
You can’t perform that action at this time.
0 commit comments