Skip to content

Commit df1bd1a

Browse files
committed
change to released openapi generator
Signed-off-by: xil <fridalu66@gmail.com>
1 parent a090aa0 commit df1bd1a

4 files changed

Lines changed: 14 additions & 22 deletions

File tree

.github/workflows/backward-compatible-report.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,12 @@ jobs:
102102
OPENSEARCH_VERSION: ${{ steps.get_opensearch_version.outputs.version }}
103103
run: npm ci && npm run preprocessing -- --opensearch-version "$OPENSEARCH_VERSION"
104104

105-
- name: Download openapi-generator JAR
106-
run: |
107-
curl -L -f -o openapi-generator-cli.jar \
108-
https://github.com/opensearch-project/opensearch-protobufs/releases/download/openapi-generator-tool/openapi-generator-cli.jar
109-
110105
- name: Convert protobuf
106+
env:
107+
OPENAPI_GENERATOR_VERSION: 7.19.0
111108
run: |
112-
java -jar openapi-generator-cli.jar generate -c tools/proto-convert/src/config/protobuf-generator-config.yaml
109+
npx --yes @openapitools/openapi-generator-cli generate \
110+
-c tools/proto-convert/src/config/protobuf-generator-config.yaml
113111
114112
- name: Check for auto-pr-branch and use its protos if exists
115113
run: |

.github/workflows/convert-proto.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,12 @@ jobs:
104104
OPENSEARCH_VERSION: ${{ steps.get_opensearch_version.outputs.version }}
105105
run: npm ci && npm run preprocessing -- --opensearch-version "$OPENSEARCH_VERSION"
106106

107-
- name: Download openapi-generator JAR
108-
run: |
109-
curl -L -f -o openapi-generator-cli.jar \
110-
https://github.com/opensearch-project/opensearch-protobufs/releases/download/openapi-generator-tool/openapi-generator-cli.jar
111-
112107
- name: Convert protobuf
108+
env:
109+
OPENAPI_GENERATOR_VERSION: 7.19.0
113110
run: |
114-
java -jar openapi-generator-cli.jar generate -c tools/proto-convert/src/config/protobuf-generator-config.yaml
111+
npx --yes @openapitools/openapi-generator-cli generate \
112+
-c tools/proto-convert/src/config/protobuf-generator-config.yaml
115113
116114
- name: Post Process Protobuf
117115
id: merge_report

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
## [Unreleased]
66
### Added
77
- Add local Protobuf conversion instructions to README ([#362](https://github.com/opensearch-project/opensearch-protobufs/pull/362))
8+
- Use official openapi-generator tool ([#364](https://github.com/opensearch-project/opensearch-protobufs/pull/364))
89

910
### Changed
1011

DEVELOPER_GUIDE.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,15 @@ To generate Protobuf definitions from the latest OpenSearch API specification, f
124124
npm ci && npm run preprocessing
125125
```
126126

127-
3. **Download OpenAPI Generator CLI**
127+
3. **Generate Protobuf**
128128

129129
```bash
130-
curl -L -f -o openapi-generator-cli.jar \
131-
https://github.com/opensearch-project/opensearch-protobufs/releases/download/openapi-generator-tool/openapi-generator-cli.jar
130+
export OPENAPI_GENERATOR_VERSION=7.19.0
131+
npx @openapitools/openapi-generator-cli generate \
132+
-c tools/proto-convert/src/config/protobuf-generator-config.yaml
132133
```
133134

134-
4. **Convert to Protobuf**
135-
136-
```bash
137-
java -jar openapi-generator-cli.jar generate -c tools/proto-convert/src/config/protobuf-generator-config.yaml
138-
```
139-
140-
5. **Run Postprocessing**
135+
4. **Run Postprocessing**
141136

142137
```bash
143138
npm run postprocessing

0 commit comments

Comments
 (0)