fix: export api version variable for resolution

This commit is contained in:
Rafael Cárdenas
2021-10-27 10:29:03 -05:00
committed by GitHub
parent bae619d653
commit 5134183a33

View File

@@ -13,7 +13,7 @@
"lint:openapi": "lint-openapi ./openapi.yaml",
"generate:types": "ts-node ./scripts/generate-types.ts",
"generate:schemas": "gulp && npm run generate:types",
"generate:resolved-spec": "API_VERSION=$(shx tail -n 1 ../.git-info) speccy resolve --output .tmp/openapi.resolved.yaml openapi.yaml && shx sed -i 'STACKS_API_VERSION' ${API_VERSION:-1.0.0} .tmp/openapi.resolved.yaml > /dev/null",
"generate:resolved-spec": "export API_VERSION=$(shx tail -n 1 ../.git-info) && speccy resolve --output .tmp/openapi.resolved.yaml openapi.yaml && shx sed -i 'STACKS_API_VERSION' ${API_VERSION:-1.0.0} .tmp/openapi.resolved.yaml > /dev/null",
"generate:docs": "redoc-cli bundle --output .tmp/index.html .tmp/openapi.resolved.yaml",
"generate:postman": "openapi2postmanv2 --spec .tmp/openapi.resolved.yaml --output .tmp/collection.json --options folderStrategy=Tags,requestParametersResolution=Example,exampleParametersResolution=Example",
"validate:schemas": "rimraf .tmp && gulp flattenSchemas --silent && ts-node ./scripts/validate-schemas.ts",