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]: Swashbuckle.AspNetCore.Cli v.6.7.0 doesn't generate format of the property #3005

Closed
AndriiBlandov opened this issue Aug 1, 2024 · 4 comments
Labels
needs-repro A minimal reproducible example is needed

Comments

@AndriiBlandov
Copy link

Describe the bug

In generated swagger.jwon property description object doesn't contain "format"

Expected behavior

"components": {
"schemas": {
"WeatherForecast": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date-time"
},

Actual behavior

"components": {
"schemas": {
"WeatherForecast": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date-time"
},

Steps to reproduce

Generate swagger.json for ASP.NET Core Web Api using class with DateTime property

Exception(s) (if any)

No response

Swashbuckle.AspNetCore version

6.7.0

.NET Version

8.0.303

Anything else?

With version 6.6.2 everything works as expected

@martincostello
Copy link
Collaborator

Please provide a minimal reproducible example as a GitHub repository that demonstrates the issue you're experiencing so we can look into this further.

It's hard to work backwards from the output to determine what about the input has seemingly missed our test coverage.

@martincostello martincostello added the needs-repro A minimal reproducible example is needed label Aug 1, 2024
@martincostello
Copy link
Collaborator

Without a repro to go off, looking at the diff since 6.6.2 my guesses for where a regression could have been introduced are #2803, #2941 or #2980.

@AndriiBlandov
Copy link
Author

False alarme, I am sorry, there was a problem with dependencies in that used Swachbackle as well but was not updated to latest version.

@Dave-EMIS
Copy link

In my case this is because I had a mismatch of Swashbuckle versions:

<PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.5.0" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-repro A minimal reproducible example is needed
Projects
None yet
Development

No branches or pull requests

3 participants