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

Caching of open api context is broken in jaxrs2 OpenApiResource #2977

Closed
aharin opened this issue Oct 14, 2018 · 3 comments
Closed

Caching of open api context is broken in jaxrs2 OpenApiResource #2977

aharin opened this issue Oct 14, 2018 · 3 comments

Comments

@aharin
Copy link
Contributor

aharin commented Oct 14, 2018

No description provided.

@aharin
Copy link
Contributor Author

aharin commented Oct 14, 2018

When JaxrsOpenApiContextBuilder creates XmlWebOpenApiContext, it should set ctxId. It is used as a key for OpenApiContext caching. As it currently stands, the code in JaxrsOpenApiContextBuilder is using ctxId derived from the servlet name to lookup OpenApiContext, while XmlWebOpenApiContext created by the builder always cached under a default context id.

@jlw0
Copy link

jlw0 commented Oct 15, 2018

I ran into the same problem. If a context id is not provided, it should default to use the value from ServletConfigContextUtils.getContextIdFromServletConfig(servletConfig). This default value will allow it to work with OpenApiResource and AcceptHeaderOpenApiResource. This will also allow the context id to be set as a servlet init parameter.

@frantuma
Copy link
Member

Thanks for spotting and addressing this! Fixed in #2990 which includes and replaces #2987

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

No branches or pull requests

3 participants