Questions about Swagger openapidetailed.yaml

Hello together

I have questions about handling Swagger in certain use cases.

With the link obtained in the documentation I looked up the REST-API documentation of JMIX with swagger. In the Swagger-UI obtained through that link I was able to post “http://localhost:8080/rest/docs/openapiDetailed.yaml” and see the REST-API documentation for all my entities. I was also able to download the file “rest-openapi.yaml” from jmix and “openapidetailed.yaml” from my own application.

My questions are:

  1. why do I see the REST-API for basic Oauth in the Jmix Swagger-UI but not in the Swagger-UI for my own application?
  2. How do restrict or make changes in the “openapidetailed.yaml”?
  3. I would like to have a swagger-ui start with only my swagger-rest-api-documentations similar to the starting link for the jmix swagger-ui. How is this possible?
  4. In the forum I saw hints to the procedure to implement swagger annotations (in 2021) addressing an article on baeldung.com. Is this still the best practice or has there been a change?

Thanks for your advice and hints.

big hug, Michael

Hi,

  1. I guess this is because the generic Jmix OpenAPI definition specifies the security scheme, but YAML file generated by the openapidetailed endpoint doesn’t.
  2. See this topic.
  3. Just deploy swagger-ui app somewhere or try integrating springfox into your application that may provide swagger-ui.
  4. Which topic and which baeldung article?

Dear Maxim

The topic was https://forum.jmix.io/t/swagger-openapi/412 and the referenced baeldung link was: https://www.baeldung.com/swagger-2-documentation-for-spring-rest-api.

So as I understood, integrating springfox into my application and starting an own swagger yaml would be best if I want add the security scheme rest apis.

thx and best regards

Michael