File tree Expand file tree Collapse file tree 3 files changed +327
-2446
lines changed Expand file tree Collapse file tree 3 files changed +327
-2446
lines changed Original file line number Diff line number Diff line change 28
28
"check:lint" : " eslint ." ,
29
29
"check:format" : " prettier -c ." ,
30
30
"reformat" : " prettier --write ." ,
31
- "generate:download" : " curl -Lo ./scripts/spec.json https://github.com/mongodb/openapi/raw/refs/heads/main/openapi/v2/openapi-2025-03-12.json" ,
32
- "generate:filter" : " tsx ./scripts/filter.ts > ./scripts/filteredSpec.json < ./scripts/spec.json" ,
33
- "generate:bundle" : " redocly bundle --ext json --remove-unused-components ./scripts/filteredSpec.json --output ./scripts/bundledSpec.json" ,
34
- "generate:openapi" : " openapi-typescript ./scripts/bundledSpec.json --root-types-no-schema-prefix --root-types --output ./src/common/atlas/openapi.d.ts" ,
35
- "generate:clear" : " rm -rf ./scripts/bundledSpec.json ./scripts/filteredSpec.json ./scripts/spec.json" ,
36
- "generate" : " npm run generate:download && npm run generate:filter && npm run generate:bundle && npm run generate:openapi && npm run generate:clear"
31
+ "generate" : " ./scripts/generate.sh"
37
32
},
38
33
"license" : " Apache-2.0" ,
39
34
"devDependencies" : {
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -Eeou pipefail
4
+
5
+ curl -Lo ./scripts/spec.json https://github.com/mongodb/openapi/raw/refs/heads/main/openapi/v2/openapi-2025-03-12.json
6
+ tsx ./scripts/filter.ts > ./scripts/filteredSpec.json < ./scripts/spec.json
7
+ redocly bundle --ext json --remove-unused-components ./scripts/filteredSpec.json --output ./scripts/bundledSpec.json
8
+ openapi-typescript ./scripts/bundledSpec.json --root-types-no-schema-prefix --root-types --output ./src/common/atlas/openapi.d.ts
9
+ rm -rf ./scripts/bundledSpec.json ./scripts/filteredSpec.json ./scripts/spec.json
You can’t perform that action at this time.
0 commit comments