swagger-api / swagger-editor

Swagger Editor
https://editor.swagger.io
Apache License 2.0
8.86k stars 2.24k forks source link

SwaggerEditor@next: does not render model extensions within SwaggerUI #4493

Open frankkilcommins opened 10 months ago

frankkilcommins commented 10 months ago

SwaggerEditor@Next does not enable the showExtensions property when initializing SwaggerUI.

This is a regression in SwaggerEditor@Next for OpenAPI. The heritage version of SwaggerEditor supports it as well as AsyncAPI extensions being supported in the Next version of the editor.

SwaggerEditor@Next: new_ui

SwaggerEditor: old_ui

char0n commented 10 months ago

For OpenAPI 2.0 and 3.0.x this should be a configuration change.

For OpenAPI 3.1.0 we need to check if the new JSON Schema 2020-12 renderer (used with OpenAPI 3.1.0 definitions) supports rendering the extensions at all.

frankkilcommins commented 10 months ago

@char0n additional work will have to be done to accommodate the new renderers. Suggest to split that out into a separate issue.

char0n commented 10 months ago

Extension rendering enhancement for OpenAPI 2.0/3.0.x is being handled in: https://github.com/swagger-api/swagger-ui/issues/9377

Extension rendering for OpenAPI 3.1.0 is being handled in: https://github.com/swagger-api/swagger-ui/issues/9376

swagger-bot commented 9 months ago

:tada: This issue has been resolved in version 5.0.0-alpha.81 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

char0n commented 5 months ago

This hasn't been addressed yet

pavelkornev commented 4 months ago

@char0n @frankkilcommins we (SAP) made this contribution to AsyncAPI UI component: https://github.com/asyncapi/asyncapi-react/pull/994

  1. We need a way to pass the configuration to AsyncAPI plugin via Swagger UI constructor. Is there a way already?
  2. We need a similar extension mechanism for OpenAPI rendering. Are you open for a similar contribution to Swagger UI component as we did to AsyncAPI UI? If so, we will prepare a PR.
char0n commented 4 months ago

Hi @pavelkornev,

  1. We need a way to pass the configuration to AsyncAPI plugin via Swagger UI constructor. Is there a way already?

Extracted in https://github.com/swagger-api/swagger-editor/issues/5006 and resolved there.

char0n commented 4 months ago
  1. We need a similar extension mechanism for OpenAPI rendering. Are you open for a similar contribution to Swagger UI component as we did to AsyncAPI UI? If so, we will prepare a PR.

This is a multi-step effort, we'll be addressing this in foreseeable future.