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

Explain semantics of quarkus.rest.path; add tests #15474

Merged
merged 1 commit into from
Mar 10, 2021
Merged

Explain semantics of quarkus.rest.path; add tests #15474

merged 1 commit into from
Mar 10, 2021

Conversation

ebullient
Copy link
Member

@ebullient ebullient commented Mar 4, 2021

Since #15030, we now have a convention in our config that leading slashes in configured paths matter.

Update doc for quarkus.rest.path to make clearer association with @ApplicationPath

Add a few tests to make expected behavior more obvious (and ensure it keeps working that way)

@ebullient ebullient changed the title Consistent behavior of @Path annotations Leading slash in quarkus.rest.path Mar 5, 2021
@ebullient ebullient changed the title Leading slash in quarkus.rest.path Ignored leading slash in quarkus.rest.path Mar 5, 2021
@ebullient ebullient self-assigned this Mar 9, 2021
@ebullient ebullient marked this pull request as ready for review March 9, 2021 19:54
@ebullient ebullient changed the title Ignored leading slash in quarkus.rest.path Explain semantics of quarkus.rest.path; add tests Mar 9, 2021
* JAX-RS resource URIs provided by Path annotations when there are no
* {@code @ApplicationPath} annotation defined on {@code Application} classes.
* <p>
* This value is always resolved relative to {@code quarkus.http.root-path}.
*/
@ConfigItem(defaultValue = "/")
Copy link
Member

Choose a reason for hiding this comment

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

Is it confusing that we're saying it's a relative path and then the default is an absolute?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a substitute for @ApplicationPath .. it is JAX-RS. It will ALWAYS be interpreted relative to http.root-path. Always

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm trying to make that unambiguous .. by reference more JAX-RS things in JAX-RS-y language.

Copy link
Member Author

Choose a reason for hiding this comment

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

@stuartwdouglas .. we could remove the default or leave it empty or.. ?

This was referenced Mar 12, 2021
@ebullient ebullient mentioned this pull request Apr 29, 2021
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.

4 participants