Skip to content

Commit

Permalink
# Removed hard-coded params for merger
Browse files Browse the repository at this point in the history
Signed-off-by: Theo Truong <[email protected]>
  • Loading branch information
nhtruong committed Apr 1, 2024
1 parent fd35aea commit 0958319
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-single-file-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
working-directory: ./tools
run: |-
npm install
npm run merge
export ROOT_PATH=../spec/OpenSearch.openapi.yaml
export OUTPUT_PATH=../builds/OpenSearch.latest.yaml
npm run merge -- $ROOT_PATH $OUTPUT_PATH
- name: Upload OpenAPI model artifact
uses: actions/upload-artifact@v3
Expand Down
6 changes: 4 additions & 2 deletions tools/merger/merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import OpenApiMerger from "./OpenApiMerger";


async function main() {
const merger = new OpenApiMerger('../spec/OpenSearch.openapi.yaml');
merger.merge('../builds/OpenSearch.latest.yaml');
const root_path: string = process.argv[2]; // '../spec/OpenSearch.openapi.yaml'
const output_path: string = process.argv[3]; // '../builds/OpenSearch.latest.yaml'
const merger = new OpenApiMerger(root_path);
merger.merge(output_path);
}

main();

0 comments on commit 0958319

Please sign in to comment.