swagger-editor icon indicating copy to clipboard operation
swagger-editor copied to clipboard

SwaggerEditor@next: does not render model extensions within SwaggerUI

Open frankkilcommins opened this issue 10 months ago • 8 comments

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

frankkilcommins avatar Oct 24 '23 09:10 frankkilcommins

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.

char0n avatar Nov 01 '23 12:11 char0n

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

frankkilcommins avatar Nov 09 '23 15:11 frankkilcommins

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

char0n avatar Nov 13 '23 12:11 char0n

: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:

swagger-bot avatar Nov 16 '23 14:11 swagger-bot

This hasn't been addressed yet

char0n avatar Apr 03 '24 19:04 char0n

@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.

pavelkornev avatar Apr 22 '24 17:04 pavelkornev

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 avatar May 06 '24 07:05 char0n

  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.

char0n avatar May 06 '24 09:05 char0n