-
Notifications
You must be signed in to change notification settings - Fork 30
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
Conflict on DateOnly when swagger file defines a DateOnly type #1186
Comments
Hi @mbursill |
The schema: It was generated from a C# API with a very simple model:
It was tested on Kiota 1.13, 1.14 and the latest preview. |
Thanks for the additional information. It appears the generated OAS description is not what kiota would expect here. Instead of having a component schema for DateOnly being used as the referenced schema for InspectionDate, the property should be of type string and format date. Maybe @captainsafia can help us here (from the ASP.net team) |
Looks like this got a recent fix: domaindrivendev/Swashbuckle.AspNetCore#2799 The latest 6.6.1 release of Swashbuckle.AspNetCore generates the correct OAS. |
Thanks for the additional information. So the right code gets generated now? |
Yes, all good now. |
Generated code for a model that includes a DateOnly type (from C#) is including the following fields:
However, the
deserializeIntoDateOnly
call is expecting aPartial<DateOnly>
where theDateOnly
ends up being seen as the one from the abstractions library. The abstractions version doesn't contain the above fields. This is a name conflict on the generated DateOnly type vs the class from the abstractions library.The text was updated successfully, but these errors were encountered: