From 5e3d9d7c7adf55b94a4691418d635ea14a92431f Mon Sep 17 00:00:00 2001 From: Jennifer Bell Date: Fri, 8 Nov 2024 16:06:11 -0500 Subject: [PATCH] chore(docs): fix packagename ref in openapi doc generation Primary Change: The openapi doc generation script had a reference to the @hyperledger package prefix hardcoded. This meant that packages that were updated to @hyperledger-cacti still had an ampersand in their path, resulting in them not being included in the generated documentation. Signed-off-by: Jennifer Bell --- docs/scripts/publish_openapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/scripts/publish_openapi.py b/docs/scripts/publish_openapi.py index afb46f5641..fcd214c8a5 100644 --- a/docs/scripts/publish_openapi.py +++ b/docs/scripts/publish_openapi.py @@ -1,5 +1,6 @@ import os import os.path +import re import subprocess import json import shutil @@ -65,7 +66,7 @@ def get_openapi_files(root_dir): for openapi_file in get_openapi_files(package['location']): if not package_group in apis_by_group: apis_by_group[package_group] = [] - package_basename = package['name'].replace('@hyperledger/','') + package_basename = re.sub(r'@.*\/', '', package['name']) publish_openapi(package_basename, openapi_file) print(f"{package_group} : {package_basename}") apis_by_group[package_group].append(package_basename)