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

Enhance OpenAPI interface, for namespace-local APIs, and extra routing options #1400

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

peterbroadhurst
Copy link
Contributor

Currently each namespace has it's own API, but you cannot get an OpenAPI/Swagger definition scoped just to that namespace.

This PR proposes an enhance OpenAPI / Swagger UI interface at the Namespace level, which allows an API to be generated that only contains the API at that level.

It also provides extra dynamic header support for the external URL that an individual namespace has been exposed on, such that the namespace local API can be exposed on a mapped URL/Host.

Depends on hyperledger/firefly-common#97

…g options

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@codecov-commenter
Copy link

codecov-commenter commented Sep 13, 2023

Codecov Report

Merging #1400 (56af59b) into main (5418e40) will decrease coverage by 0.02%.
Report is 2 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1400      +/-   ##
==========================================
- Coverage   99.98%   99.96%   -0.02%     
==========================================
  Files         315      316       +1     
  Lines       22078    22147      +69     
==========================================
+ Hits        22074    22139      +65     
- Misses          2        4       +2     
- Partials        2        4       +2     
Files Changed Coverage Δ
internal/coreconfig/coreconfig.go 100.00% <ø> (ø)
internal/metrics/private_msg.go 100.00% <ø> (ø)
internal/apiserver/ffi2swagger.go 100.00% <100.00%> (ø)
internal/apiserver/routes.go 100.00% <100.00%> (ø)
internal/apiserver/server.go 100.00% <100.00%> (ø)
internal/apiserver/spi_routes.go 100.00% <100.00%> (ø)
internal/contracts/manager.go 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@nguyer nguyer merged commit 6bea969 into main Sep 14, 2023
@nguyer nguyer deleted the openapi-enhancements branch September 14, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants