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

Using .NET 9's built-in OpenAPI document generation #48

Open
hansmbakker opened this issue Jun 26, 2024 · 5 comments
Open

Using .NET 9's built-in OpenAPI document generation #48

hansmbakker opened this issue Jun 26, 2024 · 5 comments
Labels
Feature Request New functionality is needed Server Improvements or additions to the server code
Milestone

Comments

@hansmbakker
Copy link

Is your feature request related to a problem? Please describe.
Currently third-party libraries like Swashbuckle and NSwag are needed to provide OpenAPI documentation for asp.net core based APIs

Describe the solution you'd like
.NET 9 will include built-in support for OpenAPI document generation.

Describe alternatives you've considered

Additional context
I understand .NET 9 is still being developed, but just wanted to put this on the backlog

@hansmbakker hansmbakker added Feature Request New functionality is needed Requires Triage This issue has not been checked by the project team. labels Jun 26, 2024
@adrianhall adrianhall added Server Improvements or additions to the server code and removed Requires Triage This issue has not been checked by the project team. labels Jul 11, 2024
@adrianhall adrianhall added this to the 10.0.0 milestone Jul 11, 2024
@hansmbakker
Copy link
Author

I see you added this to the 10.0.0 milestone - however that is more than a year away.

Would it be an option to do multi-targeting and already do something with 9.0.0 sooner?

@adrianhall
Copy link
Collaborator

Policy is that we target LTS releases. 9.0 is an STS release of dotNet.

That being said, I may produce a 9.0.0 specific library for this functionality. I just can't commit to it right now, especially as I've not seen the API work necessary as yet. If you have taken a look and can contribute the library in question, I'll happily take a look.

@adrianhall
Copy link
Collaborator

Putting a link into the issue for tracking:

https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-9.0?view=aspnetcore-8.0#openapi

I need to write a schema processor, and that can't come in until we switch the main library to .NET 10 (when the standard build of VS includes it)

@hansmbakker
Copy link
Author

hansmbakker commented Oct 9, 2024

Given that you have separate projects like CommunityToolkit.Datasync.Server.NSwag, would it be possible to have an optional project that covers the builtin OpenAPI generation which targets .NET 9?

In my opinion, the limitation of only supporting LTS releases seems like a needless delay to new functionality. What is the driver behind this policy, and who decides about it? Other CommunityToolkit projects (e.g. CommunityToolkit/Maui) will target .NET 9 - so I find it difficult to see where this comes from.

@adrianhall
Copy link
Collaborator

MAUI tracks the MAUI releases, which advise updating to the latest STS.

The problem is that the entire environment shifts and I'm just not set up for it yet. It affects all the tests, builds, pipelines, and releases. It's not a small effort on the infrastructure side. As the maintainer, I can't commit to doing it.

If you would like to take a copy of the NSwag project and release a new one for OpenApi support in .NET 9, I will review and work with you to get it into the project. I'm not saying, in other words, that "you must wait until .NET 10 is out!" - I'm saying "I will not be working on it until the LTS comes out"

If you provide a PR with the library, tests, and a sample, I'll see what I can do on the infrastructure side to support it.

@adrianhall adrianhall modified the milestones: 10.0.0, 9.0.0 Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New functionality is needed Server Improvements or additions to the server code
Projects
None yet
Development

No branches or pull requests

2 participants