Skip to content

Commit

Permalink
feat(conf): update swagger source to refer to local swagger
Browse files Browse the repository at this point in the history
This commit updates the configuration for  swagger generate to refer to
the api reference swagger present locally in the directory.
  • Loading branch information
jat-canonical committed Oct 10, 2024
1 parent 031ee99 commit b639c9e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions custom_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,18 @@
# Inject AMS configuration valuues and Node configuration values from the swagger
# specification hosted on Github.
def generate_ams_configuration():
from scripts.ams_configuration import get_swagger_from_url, parse_swagger
from scripts.ams_configuration import parse_swagger

with open("scripts/requirements.txt", "r") as f:
for req in f.readlines():
custom_required_modules.append(req)
ams_configuration_file = "reference/ams-configuration.md"
parse_swagger(get_swagger_from_url(), ams_configuration_file)
import yaml

with open("reference/api-reference/ams-api.yaml", "r") as f:
swagger = yaml.safe_load(f)
parse_swagger(swagger, ams_configuration_file)


## The following code is to automatically load the API from swagger into documentation.

Expand Down

0 comments on commit b639c9e

Please sign in to comment.