Skip to content

Upgrade Guide for v2 #1973

Closed
Closed
@martincostello

Description

@martincostello

Howdy folks - after a pointer from @captainsafia, I've just been having a quick look at what would happen if I tried to use Microsoft.OpenApi 2.0.0 in Swashbuckle.AspNetCore using the latest preview.

Support for OpenAPI 3.1 has been a populate ask from our users for quite some time: domaindrivendev/Swashbuckle.AspNetCore#2349.

Unsurprisingly, there's quite a lot of breaking changes to deal with:

Image

Rather than me just blindly chip through those changes until it compiles (let alone tests pass), I figured a migration guide would be a useful starting point. Even if it's just a simple list of changes rather than a full-blown document, as clearly it would be a moving goal-post in the middle of your development, that would go a good way to understanding the effort that would be required for us in more detail.

This looks like it's going to be a non-trivial piece of work to adopt, and will put constraints on us/our users on what functionality will and will not be retained moving forwards compared to v1 and OpenAPI 2.0/3.0.

Things I've found so far:

  • Removal of the JSON reader;
  • Parsing documents is async;
  • Removal of IOpenApiAny;
  • JsonSchemaType replacing string for schema types;
  • OpenApiDocument.ResolveReference() being removed.

Would someone be able to put something together to aid us in preparing to consume version 2? Ideally this is something we (Swashbuckle) can work on in the background so that we could land support for 3.1 relatively soon after you ship 2.0.0 as stable.

Metadata

Metadata

Assignees

Labels

priority:p1High priority but not blocking. Causes major but not critical loss of functionality SLA <=7days

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions