Skip to content

fix: swagger ui missing openapi.json#421

Merged
fank merged 4 commits intoOCAP2:mainfrom
smitt14ua:fix/swagger-ui
May 3, 2026
Merged

fix: swagger ui missing openapi.json#421
fank merged 4 commits intoOCAP2:mainfrom
smitt14ua:fix/swagger-ui

Conversation

@smitt14ua
Copy link
Copy Markdown
Contributor

@smitt14ua smitt14ua commented May 1, 2026

Summary

Fix path to openapi.json.
Old path was relative to Swagger UI page, so script tried to fetch /swagger/swagger/openapi.json instead of /swagger/openapi.json

How to test

Go to <your-app>/swagger and check network activities for openapi.json request

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies the OpenAPI UI handler to use an absolute path for the Swagger JSON specification. A review comment suggests avoiding this hardcoded path as it may cause issues when the application is hosted under a subpath, recommending instead to use the specification URL parameter already passed to the handler function.

Comment thread internal/server/openapi_ui.go Outdated
@fank fank merged commit 5f9cb56 into OCAP2:main May 3, 2026
1 of 2 checks passed
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.

2 participants