[Spring] Generated controllers ignore basePath
See original GitHub issueI have the following line in the openapi file:
basePath: "/v1"
I would expect generated controllers (interfaces) would use this basePath as prefix for all the paths, but they don’t contain this “v1” and just use resource path:
@RequestMapping(value = "/abc", method = RequestMethod.GET)
I’m using latest stable release 3.3.4.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to ignore base path url in Spring MVC? - Stack Overflow
So, I don't want to duplicate this prefix for each controller not to change it everywhere iteratively whenever the prefix is changed.
Read more >[Solved]-How to ignore base path url in Spring MVC?
If you don´t want to use the String in each Controller the only option that I can think of is the following. I...
Read more >ignore server.servlet.context-path for webflux projects, support ...
context-path`` configuration property on displaying spring controller mappings and generating HTTP requests. This property is available, but is not applicable ...
Read more >Documentation for the spring Generator
Property, Value, Notes. generator name, spring, pass this to the generate command after -g. generator stability, STABLE.
Read more >Production-ready Features - Spring
The exclude property lists the IDs of the endpoints that should not be exposed. ... Spring Boot auto-configuration backs off and lets you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
you can manually add the base path to your
application.yml
:Hello, This topic was fixed in swagger-codegen following this issue : 5244. If everybody agrees with the solution, could this be backported here too ? thank you.