From b639c9ea6c7927fa2763d5dcdc122a7e3653f811 Mon Sep 17 00:00:00 2001 From: Jatin Arora Date: Thu, 10 Oct 2024 14:20:01 +0530 Subject: [PATCH] feat(conf): update swagger source to refer to local swagger This commit updates the configuration for swagger generate to refer to the api reference swagger present locally in the directory. --- custom_conf.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/custom_conf.py b/custom_conf.py index c2d44d8b..ae2df09a 100644 --- a/custom_conf.py +++ b/custom_conf.py @@ -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.