jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.53k stars 4.02k forks source link

How to enable Swagger within Microservices itself #21228

Closed xbotuk closed 1 year ago

xbotuk commented 1 year ago

I have api-docs Spring profile set for a microservice, however the /v3/api-docs/ returns HTTP 404.

How to enable Swagger within the Microservices itself?

mshima commented 1 year ago

The url should be v3 instead of v2. Supposing you are using a not too old jhipster.

xbotuk commented 1 year ago

/v3/api-docs/springdocDefault profiles the json output. But what needs to be done to have the actual swagger ui for the microservice?

mshima commented 1 year ago

Use the swagger ui from the gateway. It should be possible to use springdoc-openapi-ui dependency.

xbotuk commented 1 year ago

My question is how to get it working without the gateway?

mshima commented 1 year ago

It's not possible out-of-the-box, it should be possible to add springdoc-openapi-ui dependency.

xbotuk commented 1 year ago

Added springdoc-openapi-ui dependency, makes no difference

mshima commented 1 year ago

Please refer to https://springdoc.org or the related repository. Closing as this is working as expected.