From ccb628573a2c9b27104a4b57505807c8f9384116 Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Sat, 30 Sep 2023 08:58:12 +0200 Subject: [PATCH] chore: rename swagger to openapi Refs: #386 --- CITATION.cff | 2 +- README.md | 6 +++--- examples/mass_assessment/fuji_mass_eval_template.py | 4 ++-- fuji_server/app/fuji_app.py | 2 +- fuji_server/config/server.ini | 2 +- fuji_server/yaml/{swagger.yaml => openapi.yaml} | 0 pyproject.toml | 2 +- tests/config/test_server.ini | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) rename fuji_server/yaml/{swagger.yaml => openapi.yaml} (100%) diff --git a/CITATION.cff b/CITATION.cff index 83c52b8e..e22fbb18 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -27,7 +27,7 @@ keywords: - FAIRsFAIR - FAIR Principles - Data Object Assessment - - Swagger + - OpenAPI - FAIR - Research Data - FAIR data diff --git a/README.md b/README.md index 000f224c..f22a7203 100644 --- a/README.md +++ b/README.md @@ -68,16 +68,16 @@ python -m fuji_server -c fuji_server/config/server.ini docker run -d -p 1071:1071 ghcr.io/pangaea-data-publisher/fuji ``` -To access the Swagger user interface, open the url below on the browser: +To access the OpenAPI user interface, open the url below on the browser: ``` http://localhost:1071/fuji/api/v1/ui/ ``` -Your Swagger definition lives here: +Your OpenAPI definition lives here: ``` -http://localhost:1071/fuji/api/v1/swagger.json +http://localhost:1071/fuji/api/v1/openapi.json ``` You can provide a different server config file this way: diff --git a/examples/mass_assessment/fuji_mass_eval_template.py b/examples/mass_assessment/fuji_mass_eval_template.py index 1edd92f6..552c2fac 100644 --- a/examples/mass_assessment/fuji_mass_eval_template.py +++ b/examples/mass_assessment/fuji_mass_eval_template.py @@ -6,7 +6,7 @@ import requests -# That is how a request may look like (from the swagger API) +# That is how a request may look like (from the OpenAPI API) # curl -X POST "http://localhost:1071/fuji/api/v1/evaluate" -H "accept: application/json" -H "Authorization: Basic bWFydmVsOndvbmRlcndvbWFu" -H "Content-Type: application/json" -d "{\"object_identifier\":\"https://archive.materialscloud.org/record/2021.146\",\"test_debug\":true,\"use_datacite\":true}" results_folder = "./results/" @@ -17,7 +17,7 @@ # pids = fileo.readlines() fuji_api_url = "http://localhost:1071/fuji/api/v1/evaluate" -# the Authorization key you get from your running swagger API instance +# the Authorization key you get from your running OpenAPI API instance headers = { "accept": "application/json", "Authorization": "Basic bWFydmVsOndvbmRlcndvbWFu", diff --git a/fuji_server/app/fuji_app.py b/fuji_server/app/fuji_app.py index 34bf63d9..37928d4e 100644 --- a/fuji_server/app/fuji_app.py +++ b/fuji_server/app/fuji_app.py @@ -41,7 +41,7 @@ def create_fuji_app(config): YAML_DIR = config["SERVICE"]["yaml_directory"] app = connexion.FlaskApp(__name__, specification_dir=YAML_DIR) - API_YAML = os.path.join(ROOT_DIR, YAML_DIR, config["SERVICE"]["swagger_yaml"]) + API_YAML = os.path.join(ROOT_DIR, YAML_DIR, config["SERVICE"]["openapi_yaml"]) app.app.json_encoder = encoder.JSONEncoder app.add_api(API_YAML, validate_responses=True) diff --git a/fuji_server/config/server.ini b/fuji_server/config/server.ini index a8f00fcc..246037ef 100644 --- a/fuji_server/config/server.ini +++ b/fuji_server/config/server.ini @@ -3,7 +3,7 @@ service_host = localhost service_port = 1071 yaml_directory = yaml metrics_yaml = metrics_v0.5.yaml -swagger_yaml = swagger.yaml +openapi_yaml = openapi.yaml # set debug_mode to true to avoid online downloads of external files (during development) debug_mode = true data_files_limit = 5 diff --git a/fuji_server/yaml/swagger.yaml b/fuji_server/yaml/openapi.yaml similarity index 100% rename from fuji_server/yaml/swagger.yaml rename to fuji_server/yaml/openapi.yaml diff --git a/pyproject.toml b/pyproject.toml index e8ce18c2..8a5143ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ keywords = [ "FAIRsFAIR", "FAIR Principles", "Data Object Assessment", - "Swagger", + "OpenAPI", "FAIR", "Research Data", "FAIR data", diff --git a/tests/config/test_server.ini b/tests/config/test_server.ini index 6e6d140a..4d02fda8 100644 --- a/tests/config/test_server.ini +++ b/tests/config/test_server.ini @@ -3,7 +3,7 @@ service_host = localhost service_port = 1071 yaml_directory = yaml metrics_yaml = metrics_v0.5.yaml -swagger_yaml = swagger.yaml +openapi_yaml = openapi.yaml debug_mode = true data_files_limit = 5 metric_specification = https://doi.org/10.5281/zenodo.4081213