mirror of
https://github.com/ansible/awx.git
synced 2026-03-17 00:47:29 -02:30
Publish open api spec on AWX for community use (#16221)
* Added link and ref to openAPI spec for community * Update docs/docsite/rst/contributor/openapi_link.rst Co-authored-by: Don Naro <dnaro@redhat.com> * add sphinxcontrib-redoc to requirements * sphinxcontrib.redoc configuration * create openapi directory and files * update download script for both schema files * suppress warning for redoc * update labels * fix extra closing parenthesis * update schema url * exclude doc config and download script The Sphinx configuration (conf.py) and schema download script (download-json.py) are not application logic and used only for building documentation. Coverage requirements for these files are overkill. * exclude only the sphinx config file --------- Co-authored-by: Don Naro <dnaro@redhat.com>
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
import requests
|
||||
|
||||
url = "https://awx-public-ci-files.s3.amazonaws.com/community-docs/swagger.json"
|
||||
swagger_json = "./docs/docsite/rst/rest_api/_swagger/swagger.json"
|
||||
|
||||
response = requests.get(url)
|
||||
|
||||
if response.status_code == 200:
|
||||
with open(swagger_json, 'wb') as file:
|
||||
file.write(response.content)
|
||||
print(f"JSON file downloaded to {swagger_json}")
|
||||
else:
|
||||
print(f"Request failed with status code: {response.status_code}")
|
||||
Reference in New Issue
Block a user