-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[DRAFT] 2.0 upgrade guide working doc #2298
base: main
Are you sure you want to change the base?
Conversation
@martincostello Hi Martin! Please refer to this as a work in progress, upgrade guide. We will work on this in the open and keeping adding to it as we have more preview bits added. Please let us know if you have any feedback or questions or if we are missing anything you'd like more info on. |
|
||
public virtual JsonNode Example { get; set; } // No longer IOpenApiAny | ||
public virtual IList<JsonNode> Examples { get; set; } | ||
public virtual IList<JsonNode> Enum { get; set; } = new List<JsonNode>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public virtual IList<JsonNode> Enum { get; set; } = new List<JsonNode>(); | |
public virtual IList<JsonNode> Enum { get; set; } |
@RachitMalik12 Thanks for providing this. I've made various suggested edits to the current content. My main feedback so far based on my (still ongoing) move in Swashbuckle would be to have a dedicated section showing how the reference handling has changed with the type checks. For example the need to do things like: public void ProcessSchema(IOpenApiSchema schema)
{
if (schema is OpenApiSchema concrete)
{
// Do something
}
else if (scheme is OpenApiSchemaReference reference)
{
// Do something else
}
} I'll be sure to leave any additional feedback that might be useful once I've gotten Swashbuckle working with the preview7 (as that's what ASP.NET Core 10 preview 2 is compiled against). |
I've also been tripped up by - if (schema.Type == JsonSchemaTypes.Array)
+ if (schema.Type is { } type && type.HasFlag(JsonSchemaTypes.Array)) People might miss this and introduce subtle bugs if they just one-to-one map the strings to the values like: - if (schema.Type == "array")
+ if (schema.Type == JsonSchemaTypes.Array) |
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
This comment was marked as outdated.
This comment was marked as outdated.
1 similar comment
|
No description provided.