mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-26 13:04:10 +01:00
Rename scripts using openapi instead of swagger
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
ec4db7f8ee
commit
217fbbeab1
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
|
|
@ -92,17 +92,17 @@ jobs:
|
||||||
export RELEASE="unstable"
|
export RELEASE="unstable"
|
||||||
fi
|
fi
|
||||||
# The output path matches the final deployment path at spec.matrix.org
|
# The output path matches the final deployment path at spec.matrix.org
|
||||||
scripts/dump-swagger.py \
|
scripts/dump-openapi.py \
|
||||||
--base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \
|
--base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \
|
||||||
--api application-service \
|
--api application-service \
|
||||||
-r "$RELEASE" \
|
-r "$RELEASE" \
|
||||||
-o spec/application-service-api/api.json
|
-o spec/application-service-api/api.json
|
||||||
scripts/dump-swagger.py \
|
scripts/dump-openapi.py \
|
||||||
--base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \
|
--base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \
|
||||||
--api client-server \
|
--api client-server \
|
||||||
-r "$RELEASE" \
|
-r "$RELEASE" \
|
||||||
-o spec/client-server-api/api.json
|
-o spec/client-server-api/api.json
|
||||||
scripts/dump-swagger.py \
|
scripts/dump-openapi.py \
|
||||||
--base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \
|
--base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \
|
||||||
--api push-gateway \
|
--api push-gateway \
|
||||||
-r "$RELEASE" \
|
-r "$RELEASE" \
|
||||||
|
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -2,7 +2,7 @@ node_modules
|
||||||
/data/msc
|
/data/msc
|
||||||
/env*
|
/env*
|
||||||
/resources
|
/resources
|
||||||
/scripts/swagger
|
/scripts/openapi
|
||||||
/scripts/tmp
|
/scripts/tmp
|
||||||
/hugo-config.toml
|
/hugo-config.toml
|
||||||
/public
|
/public
|
||||||
|
|
|
||||||
|
|
@ -88,12 +88,12 @@ spec to `/spec`. If you'd like to serve the spec off a path instead of a domain
|
||||||
to the `hugo -d "spec"` command.
|
to the `hugo -d "spec"` command.
|
||||||
|
|
||||||
For building the OpenAPI definitions, create a python3 virtualenv and activate it. Then run `pip install -r ./scripts/requirements.txt`
|
For building the OpenAPI definitions, create a python3 virtualenv and activate it. Then run `pip install -r ./scripts/requirements.txt`
|
||||||
and finally `python ./scripts/dump-swagger.py` to generate it to `./scripts/swagger/api-docs.json`. To make use of the generated file,
|
and finally `python ./scripts/dump-openapi.py` to generate it to `./scripts/openapi/api-docs.json`. To make use of the generated file,
|
||||||
there are a number of options:
|
there are a number of options:
|
||||||
|
|
||||||
* You can open `./scripts/swagger-preview.html` in your browser, and then open the file by clicking on `Local JSON File`.
|
* You can open `./scripts/openapi-preview.html` in your browser, and then open the file by clicking on `Local JSON File`.
|
||||||
* You can run a local HTTP server by running `./scripts/swagger-http-server.py`, and then view the documentation by
|
* You can run a local HTTP server by running `./scripts/openapi-http-server.py`, and then view the documentation by
|
||||||
opening `./scripts/swagger-preview.html` in your browser.
|
opening `./scripts/openapi-preview.html` in your browser.
|
||||||
|
|
||||||
## Issue tracking
|
## Issue tracking
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ To ease API design and management, the API definition is split across several
|
||||||
files. Each of these files is self-contained valid OpenAPI.
|
files. Each of these files is self-contained valid OpenAPI.
|
||||||
|
|
||||||
There is no single root file in the source tree as OpenAPI requires; this file
|
There is no single root file in the source tree as OpenAPI requires; this file
|
||||||
can be generated by `dump-swagger.py`. The script does not convert
|
can be generated by `dump-openapi.py`. The script does not convert
|
||||||
the extensions described further in this document so there can be minor
|
the extensions described further in this document so there can be minor
|
||||||
interoperability issues with tooling that expects compliant OpenAPI.
|
interoperability issues with tooling that expects compliant OpenAPI.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue