feat: auto-expand SwaggerUI path/paths for Phoenix usage#696
Open
petermueller wants to merge 1 commit intoopen-api-spex:masterfrom
Open
feat: auto-expand SwaggerUI path/paths for Phoenix usage#696petermueller wants to merge 1 commit intoopen-api-spex:masterfrom
petermueller wants to merge 1 commit intoopen-api-spex:masterfrom
Conversation
…efix when in Phoenix When a Phoenix endpoint is present on the conn, automatically prepend the endpoint's path prefix to `:path` and `:paths` config values.This handles apps deployed behind a path prefix without requiring any special tuple wrapper.Also fix `:paths` not being excluded from the SwaggerUI config `Map.drop`, which would cause JSON encoding errors.
Author
|
I didn't add documentation as I think for a new user it would be assumed that the path generation would work in this way, but as far as patch vs. minor, I guess it depends, as others would have just worked around this previously by making a wrapper plug, or by hard-coding the prefix in the Either way, hopefully(?) it's just a quick sentence in the CHANGELOG.md to say "hey, remove any hard-coded path prefixes if you did that" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #695
Changes:
path: "/open_api_spec"andpaths: [latest: "/open_api_spec", ...]now expand withendpoint_module.path()when the paths start w/"/"oauth2_redirect_url: {:endpoint_url, ...}now also expands withendpoint_module.path()Fixes:
:pathskey