Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade REST API spec to OpenAPI 3 #649

Merged
merged 10 commits into from
Nov 25, 2022
Merged

Upgrade REST API spec to OpenAPI 3 #649

merged 10 commits into from
Nov 25, 2022

Conversation

osma
Copy link
Member

@osma osma commented Nov 25, 2022

We currently specify the REST API using Swagger 2.0. This has long ago been superseded by OpenAPI 3.0, which is nowadays also well supported by the Connexion framework.

This PR updates the REST API spec for OpenAPI 3.0 and renames the directory it is stored in from swagger to openapi. I used the Swagger Editor for an initial conversion, but I had to make several fixes until I got it working. Also there are minor changes to the implementation code in rest.py that were necessary to make the new spec work.

Fixes #644

@osma osma added this to the 0.60 milestone Nov 25, 2022
@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Base: 99.54% // Head: 99.55% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (b8f6b8c) compared to base (02e60ed).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #649   +/-   ##
=======================================
  Coverage   99.54%   99.55%           
=======================================
  Files          87       87           
  Lines        5968     6006   +38     
=======================================
+ Hits         5941     5979   +38     
  Misses         27       27           
Impacted Files Coverage Δ
tests/test_rest.py 100.00% <ø> (ø)
annif/__init__.py 88.46% <100.00%> (ø)
annif/rest.py 96.36% <100.00%> (+0.13%) ⬆️
annif/parallel.py 100.00% <0.00%> (ø)
annif/registry.py 100.00% <0.00%> (ø)
tests/test_cli.py 100.00% <0.00%> (ø)
annif/backend/http.py 100.00% <0.00%> (ø)
tests/test_parallel.py 100.00% <0.00%> (ø)
tests/test_backend_http.py 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@osma osma marked this pull request as ready for review November 25, 2022 09:21
@osma osma self-assigned this Nov 25, 2022
@osma osma marked this pull request as draft November 25, 2022 12:40
@osma
Copy link
Member Author

osma commented Nov 25, 2022

There are still problems with parameter handling

@osma osma marked this pull request as ready for review November 25, 2022 13:40
annif/openapi/annif.yaml Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Nov 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade API spec to OpenAPI 3
2 participants