Jan
24
7 hours ago
Activity icon
issue

hkosova issue swagger-api/swagger-ui

hkosova
hkosova

Cannot view the schema for a request body while in 'Try It Out' with OpenAPI v3

Content & configuration

Swagger/OpenAPI definition: Try https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/petstore.json vs https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v2.0/json/petstore.json

Is your feature request related to a problem?

Editing request bodies can be tricky, being able to refer back to the documentation is useful. Swagger used to give an easy way to do that with v2 API docs as you can switch back to the model while editing the body. This has gone away with v3, you can not switch.

Describe the solution you'd like

The option to switch back to the schema at any time like you could with the model with v2 api docs.

Activity icon
issue

hkosova issue comment swagger-api/swagger-ui

hkosova
hkosova

Cannot view the schema for a request body while in 'Try It Out' with OpenAPI v3

Content & configuration

Swagger/OpenAPI definition: Try https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/petstore.json vs https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v2.0/json/petstore.json

Is your feature request related to a problem?

Editing request bodies can be tricky, being able to refer back to the documentation is useful. Swagger used to give an easy way to do that with v2 API docs as you can switch back to the model while editing the body. This has gone away with v3, you can not switch.

Describe the solution you'd like

The option to switch back to the schema at any time like you could with the model with v2 api docs.

started
started time in 39 minutes ago
started
started time in 4 hours ago
started
started time in 6 hours ago
Jan
23
1 day ago
started
started time in 11 hours ago
started
started time in 14 hours ago
Activity icon
issue

mitasov-ra issue comment swagger-api/swagger-ui

mitasov-ra
mitasov-ra

Swagger-ui-react oauth2 redirect url

Q&A (please complete the following information)

  • OS: [Windows 10]
  • Browser: [chrome, safari]
  • Method of installation: [npm]
  • Swagger-UI version: [swagger-ui-react 3.22.2]
  • Swagger/OpenAPI version: [Swagger 2.0]

How can we help?

I'm aware that the current documentation states that OAuth redirection is not supported. However we are willing to implement 'Try it out' in our react application and are forced to switch to swagger-ui-react to get the 'required parameter issue' solved. In our case, the application is not hosted on the root of the server but in a sub folder. By default when performing authorization, the request includes a redirect uri= hostname/oauth2-redirect.html. In our case this leads to a not found response since it's actually located in a sub folder. It's also not possible to relocate this redirect.html file. Is there any way how I can overcome this issue? This is the only thing blocking us at the moment. If no, would there be a future development to include the support for adjusting the redirect uri?

Thanks in advance

mitasov-ra
mitasov-ra

My final working solution (from docker-compose):

OAUTH2_REDIRECT_URL: '" + window.location.protocol + "//" + window.location.host + window.location.pathname.replace(/index\.html$$/, "") + "oauth2-redirect.html" + "'
started
started time in 16 hours ago
started
started time in 21 hours ago
Previous