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

[Bug]: attributes are moved to allOf instead of in the root of an object after updating from 6.5.0 to 6.6.2 #2964

Closed
DerGary opened this issue Jun 28, 2024 · 6 comments
Labels
bug stale Stale issues or pull requests upstream-openapi-dotnet

Comments

@DerGary
Copy link

DerGary commented Jun 28, 2024

Describe the bug

The left side is generated through swagger cli with version 6.5.0 of the library, and the right sight is generated after updating to 6.6.2:
image
When this is now used to generate a client from it it contains the following properties:
image

Expected behavior

Left Side

Actual behavior

Right Side

Steps to reproduce

Create an empty type that inherits from a base class. We are using UseOneOfForPolymorphism as well as:

[SwaggerDiscriminator(ConnectionType.TypeDiscriminatorPropertyName)]
[SwaggerSubType(typeof(HttpConnectionConfigDto), DiscriminatorValue = ConnectionType.Http)]

Exception(s) (if any)

No response

Swashbuckle.AspNetCore version

6.6.2

.NET Version

net8.0

Anything else?

No response

@DerGary DerGary added the bug label Jun 28, 2024
@martincostello
Copy link
Collaborator

We don't explicitly write out the JSON, we delegate it to Microsoft.OpenApi. That dependency was updated to the latest release (1.6.14) as part of the 6.6.x release (#2795), so I would have thought that if this is a bug, it should be logged there.

@DerGary
Copy link
Author

DerGary commented Jun 28, 2024

Okay, is there anything that I need to do?

@martincostello
Copy link
Collaborator

I would suggest opening an issue in their repo.

@serhiiz
Copy link

serhiiz commented Jul 11, 2024

Turns out it's now the expected behavior: #2268

Copy link
Contributor

This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made.

@github-actions github-actions bot added the stale Stale issues or pull requests label Sep 10, 2024
Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale Stale issues or pull requests upstream-openapi-dotnet
Projects
None yet
Development

No branches or pull requests

3 participants