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

openApi.getServers() is null in OpenApiCustomiser when using different locales #2155

Closed
harsel opened this issue Mar 21, 2023 · 2 comments
Closed

Comments

@harsel
Copy link

harsel commented Mar 21, 2023

Describe the bug

In an OpenApiCustomiser, calling OpenApi.getServers() may return null.

To Reproduce

  • Using latest master
  • Add a bean of type OpenApiCustomiser which invokes getServers()
  • Request the open api document using header Accept-Language: en-US
  • Request the open api document using header Accept-Language: de-DE
  • The second request fails with a NullpointerException in the OpenApiCustomiser as openApi.getServers() returns null
@bnasslahsen
Copy link
Contributor

@harsel,

Can you Provide a Minimal, Reproducible Example - with HelloController that reproduces the problem ?

@harsel
Copy link
Author

harsel commented Mar 22, 2023

I already created PR #2156 with a failing test.

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

2 participants