-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedfeature-openapiold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
public class WeatherForecast
{
public DateOnly Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
[DefaultValue("123")]
public string? Summary { get; set; }
public DateOnly? Date1 { get; set; }
public int? TemperatureC1 { get; set; }
[Required]
public DateOnly? Date2 { get; set; }
[Required]
public int? TemperatureC2 { get; set; }
}
OpenAPI
Swashbuckle
TemperatureFhas no method set, and should not appear in the modelTemperatureC2is a nullable attribute, but it adds a required attribute and should no longer appear nullable
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.Status: Resolvedfeature-openapiold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

