How to override Jhipster swagger configuration in a microservice project to change the /api path in the backend and update gateway Swagger UI accordingly ?
Asked
Active
Viewed 3,906 times
2 Answers
2
Have you tried setting default-include-pattern
in swagger
section of your config file (probably application.yml
)?
Default setting is /api/.*
. For my project I changed it to /(api|io)/.*
(its a regex) to include api
and io
paths.

Ondřej Stašek
- 761
- 6
- 15
0
As of JHipster 7.0, the following changes were made to the backend:
- swagger maven profile becomes api-docs
- jhipster.swagger property becomes jhipster.api-docs
In order to enable swagger api and to change the default uri pattern I had to:
1 - Enable the maven api-docs
profile
2 - Add the following property under to application.yml (replace with your api path):
jhipster:
api-docs:
default-include-pattern: /api-new-path/.*

francisco neto
- 797
- 1
- 5
- 13
-
1basePath seems to be missing in the output swagger when using the new version of jHipster – Phillip Oct 22 '21 at 20:37