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

Doesn’t work with new Open API stuff in ASP.NET Core 9 #1114

Closed
1 task done
marinasundstrom opened this issue Oct 23, 2024 · 2 comments
Closed
1 task done

Doesn’t work with new Open API stuff in ASP.NET Core 9 #1114

marinasundstrom opened this issue Oct 23, 2024 · 2 comments

Comments

@marinasundstrom
Copy link

marinasundstrom commented Oct 23, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Is there a way to make this work for Minimal API Endpoints in .NET 9?

Routes not showing up in generated spec.

I’m switching from NSwag.

Expected Behavior

Routes showing up in Open API spec.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

9.0.0-RC

Anything else?

No response

@commonsensesoftware
Copy link
Collaborator

I'll need some additional information. "It doesn't work" doesn't provide much context. What is your setup? Is there a repro?

The OpenAPI Minimal API example should show everything you need to get things started with Minimal APIs and OpenAPI.

I should also point out that .NET 9 is not yet officially supported because it is not released. A TFM mapping is only guaranteed to work with an exact match (e.g. net8.0 → .NET 8). This is because of a runtime major version bump. Even if things compile, there can be runtime behavioral differences. I've seen it happen. As an army of one, it's difficult to chase pre-releases. It's rare for me to release a version for a pre-release version of .NET. It isn't as trivial as some might think. Nevertheless, the official release is nearing and I intend to get something aligned to that ASAP.

If the provided example is insufficient, I should point out Microsoft's eShop application for Aspire uses Minimal APIs, OpenAPI, and API Versioning. I collaborated with them on adding it. They appear to have it working without issue. You might want to review that setup (see: here)

@marinasundstrom
Copy link
Author

@commonsensesoftware Excuse me. I was kind of desperate. But it seems that the sample might give me a solution.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants