Skip to content

Commit 065ad2b

Browse files
authored
Add instructions for protobuf generation with API spec feature branches (opensearch-project#408)
* Add instructions for protobuf generation with API spec feature branches Signed-off-by: xil <fridalu66@gmail.com> --------- Signed-off-by: xil <fridalu66@gmail.com>
1 parent 8169480 commit 065ad2b

2 files changed

Lines changed: 33 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
77

88
### Changed
99
- Fix simplifySingleMapSchema to generate named wrapper schemas. ([#406](https://github.com/opensearch-project/opensearch-protobufs/pull/406))
10+
1011
### Removed
1112

1213
### Fixed

DEVELOPER_GUIDE.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,44 @@ To generate Protobuf definitions from the latest OpenSearch API specification lo
217217
npm config set registry https://registry.npmjs.org/
218218
```
219219

220-
1. **Download the latest OpenSearch API Specification**
221-
220+
1. **Download the OpenSearch API Specification**
222221

222+
**Option A: For main branch (latest stable spec)**
223+
223224
```bash
224225
curl -L -o opensearch-openapi.yaml \
225226
https://github.com/opensearch-project/opensearch-api-specification/releases/download/main-latest/opensearch-openapi.yaml
226227
```
227228

229+
**Option B: For spec feature branch development**
230+
231+
If you're working with changes from a feature branch in the API specification:
232+
233+
a. Clone/navigate to the opensearch-api-specification repository:
234+
```bash
235+
cd /path/to/opensearch-api-specification
236+
```
237+
238+
b. Checkout the feature branch:
239+
```bash
240+
git checkout <feature-branch-name>
241+
```
242+
243+
c. Build the merged OpenAPI spec:
244+
```bash
245+
npm ci && npm run merge
246+
```
247+
248+
d. Copy the built spec to the opensearch-protobufs repository:
249+
```bash
250+
cp build/opensearch-openapi.yaml /path/to/opensearch-protobufs/opensearch-openapi.yaml
251+
```
252+
253+
e. Return to the opensearch-protobufs repository:
254+
```bash
255+
cd /path/to/opensearch-protobufs
256+
```
257+
228258
2. **Run Preprocessing**
229259

230260
```bash

0 commit comments

Comments
 (0)