mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-27 16:10:30 +08:00
export and auto-commit docs/docs/api/openapi.json as part of test-api-contract workflow (#719)
- copies that openapi.json file to docs/docs/api/openapi.json as part of start-mock-server.sh. - adds a step to the end of the test-api-contract workflow that just auto-commits changes to the docs/docs/api/openapi.json file. - excludes docs/docs/api/openapi.json from pre-commit since its already been formatted by jq.
This commit is contained in:
@@ -11,6 +11,9 @@ echo "Generating OpenAPI schema..."
|
||||
python -m main --print-openapi-schema > $OPENAPI_JSON_FILE_NAME
|
||||
echo "Done!"
|
||||
|
||||
echo "Formatting & Copying OpenAPI schema to docs directory..."
|
||||
jq . $OPENAPI_JSON_FILE_NAME > ../docs/docs/api/openapi.json
|
||||
|
||||
# If oasst-mock-backend docker container is already running,
|
||||
# just restart it
|
||||
if [ "$(docker ps -q -f name=oasst-mock-backend)" ]; then
|
||||
|
||||
Reference in New Issue
Block a user