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

Customize Servers via application.yml #2948

Closed
huehnerlady opened this issue Mar 26, 2025 · 1 comment
Closed

Customize Servers via application.yml #2948

huehnerlady opened this issue Mar 26, 2025 · 1 comment

Comments

@huehnerlady
Copy link

Is your feature request related to a problem? Please describe.

I would like to change the server URL
For that I found the ServerBaseUrlCustomizer mentiones here
This does not change the description though.

{
  "servers": [
    {
      "url": "https://my-property.test",
      "description": "Generated server url"
    }
  ]
}

Describe the solution you'd like

I would like to have a application.yml property to be able to change the url including the description:

springdoc:
  api-docs:
    enabled: true
  swagger-ui:
    enabled: false
  servers: <--
    server1:
        url: https://my-property.test
        description: "my description"
@bnasslahsen
Copy link
Collaborator

@huehnerlady,

It will be possible starting from the next release with the below syntax:

springdoc:
  open-api:
    servers:
      - url: "https://api.example.com"
        description: "Production Server"
      - url: "https://staging.example.com"
        description: "Staging Server"

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