Skip to content

Commit

Permalink
Merge remote-tracking branch 'github-desktop-afuetterer/386-rename-sw…
Browse files Browse the repository at this point in the history
…agger'
  • Loading branch information
huberrob committed Oct 11, 2023
2 parents ab8b232 + ccb6285 commit 26911e4
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ keywords:
- FAIRsFAIR
- FAIR Principles
- Data Object Assessment
- Swagger
- OpenAPI
- FAIR
- Research Data
- FAIR data
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions examples/mass_assessment/fuji_mass_eval_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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/"
Expand All @@ -16,7 +16,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",
Expand Down
2 changes: 1 addition & 1 deletion fuji_server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,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)
Expand Down
2 changes: 1 addition & 1 deletion fuji_server/config/server.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ keywords = [
"FAIRsFAIR",
"FAIR Principles",
"Data Object Assessment",
"Swagger",
"OpenAPI",
"FAIR",
"Research Data",
"FAIR data",
Expand Down
2 changes: 1 addition & 1 deletion tests/config/test_server.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26911e4

Please sign in to comment.