Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI 3.1.0 support: incorrect rendering in Operation.callbacks field #8504

Closed
char0n opened this issue Mar 23, 2023 · 2 comments
Closed

Comments

@char0n
Copy link
Member

char0n commented Mar 23, 2023

In OpenAPI 3.1.0 definitions, SwaggerUI renders callbacks incorrectly. Callbacks are rendered like this:

image

This is how the callbacks are rendered in OpenAPI 3.0.x definitions:

image


The goal of this issue is to figure out what is the source of the bug and fix it.

@char0n
Copy link
Member Author

char0n commented Mar 23, 2023

Investigation notes:

  • The reason why this happens for OpenAPI 3.1.0 is because of complete normalization support for OpenAPI 3.1.0 where OpenAPI.servers are denormalized into PathItem.servers

char0n added a commit that referenced this issue Mar 23, 2023
Before this fix, other Path Item fields were
included into rendering as well (like servers).

Refs #8504
@char0n
Copy link
Member Author

char0n commented Mar 23, 2023

After the #8507 is merged, only fields that are of type Operation Object will be rendered as Callback operations.

image

char0n added a commit that referenced this issue Mar 23, 2023
Before this fix, other Path Item fields were
included into rendering of Operation Objects under
a specific Callback Object.

Refs #8504
@char0n char0n closed this as completed Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant