0

Is there any configuration that must be done in order to change the location of the yaml file in which the specification is described?

Open API url

In the attached picture I would like to set /swagger-ui/open-api.yaml instead of /open-api.

I tried to change the file path by setting the following property:

springdoc: swagger-ui: url: /swagger-ui/open-api.yaml

But I receive 404 not found error.

Maurice
  • 3
  • 2

1 Answers1

0

springdoc: swagger-ui: url: /swagger-ui/open-api.yaml is not a proper configuration.

Change this to springdoc.swagger-ui.url=/swagger-ui/open-api.yaml and place it in your application.properties.

If you are using a application.yml, then make sure the property is also properly set in its associated configuration class as well. Also, sometimes yaml files have trouble parsing urls as a string, so try wrapping it in quotes.

tbatch
  • 1,398
  • 10
  • 21