Skip to content

Commit 86f1f7a

Browse files
committed
test
1 parent 086e318 commit 86f1f7a

2 files changed

Lines changed: 29 additions & 5 deletions

File tree

.github/workflows/convert-proto.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
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: |

tools/proto-convert/src/config/protobuf-schema-template/model.mustache

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff 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}}

0 commit comments

Comments
 (0)