diff --git a/scripts/check-openapi-sources.py b/scripts/check-openapi-sources.py index 39e27f24..2fb8ad93 100755 --- a/scripts/check-openapi-sources.py +++ b/scripts/check-openapi-sources.py @@ -87,11 +87,11 @@ def check_response(filepath, request, code, response): ), e) -def check_swagger_file(filepath): +def check_openapi_file(filepath): with open(filepath) as f: - swagger = yaml.safe_load(f) + openapi = yaml.safe_load(f) - for path, path_api in swagger.get('paths', {}).items(): + for path, path_api in openapi.get('paths', {}).items(): for method, request_api in path_api.items(): request = "%s %s" % (method.upper(), path) @@ -169,7 +169,7 @@ if __name__ == '__main__': # Get the directory that this script is residing in script_directory = os.path.dirname(os.path.realpath(__file__)) - # Resolve the directory containing the swagger sources, + # Resolve the directory containing the OpenAPI sources, # relative to the script path source_files_directory = os.path.realpath(os.path.join(script_directory, "../data")) @@ -182,6 +182,6 @@ if __name__ == '__main__': path = os.path.join(root, filename) try: - check_swagger_file(path) + check_openapi_file(path) except Exception as e: raise ValueError("Error checking file %s" % (path,), e) diff --git a/scripts/dump-openapi.py b/scripts/dump-openapi.py index b9b3b6a3..1cc2279c 100755 --- a/scripts/dump-openapi.py +++ b/scripts/dump-openapi.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# dump-swagger reads all of the OpenAPI docs used in spec generation and +# dump-openapi reads all of the OpenAPI docs used in spec generation and # outputs a JSON file which merges them all, for use as input to an OpenAPI # viewer. @@ -84,7 +84,7 @@ def edit_links(node, base_url): edit_links(item, base_url) parser = argparse.ArgumentParser( - "dump-swagger.py - assemble the OpenAPI specs into a single JSON file" + "dump-openapi.py - assemble the OpenAPI specs into a single JSON file" ) parser.add_argument( "--base-url", "-b", @@ -113,7 +113,7 @@ parser.add_argument( ) parser.add_argument( "-o", "--output", - default=os.path.join(scripts_dir, "swagger", "api-docs.json"), + default=os.path.join(scripts_dir, "openapi", "api-docs.json"), help="File to write the output to. Default: %(default)s" ) args = parser.parse_args() diff --git a/scripts/openapi-http-server.py b/scripts/openapi-http-server.py index 4f43daf8..307e7dbe 100755 --- a/scripts/openapi-http-server.py +++ b/scripts/openapi-http-server.py @@ -41,13 +41,13 @@ if __name__ == '__main__': help='TCP port to listen on (default: %(default)s)', ) parser.add_argument( - 'swagger_dir', nargs='?', - default=os.path.join(scripts_dir, 'swagger'), + 'openapi_dir', nargs='?', + default=os.path.join(scripts_dir, 'openapi'), help='directory to serve (default: %(default)s)', ) args = parser.parse_args() - os.chdir(args.swagger_dir) + os.chdir(args.openapi) httpd = socketserver.TCPServer(("localhost", args.port), MyHTTPRequestHandler)