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

Add docs on Microsoft.AspNetCore.OpenApi #32529

Merged
merged 3 commits into from
May 10, 2024
Merged

Add docs on Microsoft.AspNetCore.OpenApi #32529

merged 3 commits into from
May 10, 2024

Conversation

captainsafia
Copy link
Member

@captainsafia captainsafia commented May 6, 2024

@captainsafia captainsafia force-pushed the safia/openapi-pkg branch 11 times, most recently from 8e9f062 to 6519146 Compare May 7, 2024 21:08
@ron-zhong
Copy link

ron-zhong commented May 8, 2024

Well done!! :) What a remarkable milestone. Looking forward to seeing the completed doc.

If the upcoming doc can cover the topics about how to setup auth schemes that would be really great!!

Previously with SwaggerUI, I always needed to setup the OIDC resource owner password grant or AuthZ+PKCE grant flows in order to perform some manual testing with IDP server.

Ref: https://stackoverflow.com/questions/57585888/how-to-do-oauth2-authorization-in-asp-net-core-for-swagger-ui-using-swashbuckle

Hope that will be something we can easily achieve with the new OpenAPI offering in .NET 9. Thank you very much.

@captainsafia
Copy link
Member Author

@ron-zhong Thanks for the feedback! I've added a sample that shows how to register authentication schemes globally using document transformers.

Admittedly, the built-in support doesn't move the needle on making this process more seamless. You still have to manually configure the schemes yourself.

If you're interested in efforts to make this process more seamless, check out dotnet/aspnetcore#39761. I shared some notes there on prototyping I've done in the past to make it easier to introspect auth configurations in an application. It's not super trivial and given the sensitive of authentication it's one of those things that you really have to get right. I dunno that we'll do something in this area for .NET 9 but it is something I've thought about in the past.

@Rick-Anderson Rick-Anderson reopened this May 8, 2024
@captainsafia captainsafia force-pushed the safia/openapi-pkg branch 3 times, most recently from 0e5f87d to 5643121 Compare May 8, 2024 21:30
@captainsafia captainsafia marked this pull request as ready for review May 8, 2024 21:36
@captainsafia
Copy link
Member Author

@tdykstra @Rick-Anderson @mikekistler @JeremyLikness I think there's enough content here to kick-off some review for it. Pardon any rawness in the content, I optimized for iterating early and often on this content as opposed to waiting to hit a perfect state. 😄

@Rick-Anderson
Copy link
Contributor

@captainsafia I was going to PR this PR as I have many minor editorial edits but given this is good enough I think we should merge and then I can quickly PR the topic with my changes and have @tdykstra review them. Should I make any technical changes I'll mention you and the other technical folks.

@Rick-Anderson
Copy link
Contributor

@JeremyLikness @mikekistler can one of you approve the code so we can merge this and then @tdykstra and I will do a quick cleanup right after.

Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

I left a bunch of very minor suggestions that you are free to ignore if you think they are misguided.

aspnetcore/fundamentals/minimal-apis/aspnetcore-openapi.md Outdated Show resolved Hide resolved
aspnetcore/fundamentals/minimal-apis/aspnetcore-openapi.md Outdated Show resolved Hide resolved
aspnetcore/fundamentals/minimal-apis/aspnetcore-openapi.md Outdated Show resolved Hide resolved
aspnetcore/fundamentals/minimal-apis/aspnetcore-openapi.md Outdated Show resolved Hide resolved
aspnetcore/fundamentals/minimal-apis/aspnetcore-openapi.md Outdated Show resolved Hide resolved
aspnetcore/fundamentals/minimal-apis/aspnetcore-openapi.md Outdated Show resolved Hide resolved
aspnetcore/fundamentals/minimal-apis/aspnetcore-openapi.md Outdated Show resolved Hide resolved
aspnetcore/fundamentals/minimal-apis/aspnetcore-openapi.md Outdated Show resolved Hide resolved
aspnetcore/fundamentals/minimal-apis/aspnetcore-openapi.md Outdated Show resolved Hide resolved
aspnetcore/fundamentals/minimal-apis/aspnetcore-openapi.md Outdated Show resolved Hide resolved
@captainsafia captainsafia enabled auto-merge (squash) May 10, 2024 16:48
@captainsafia captainsafia merged commit 6d2dd7c into main May 10, 2024
3 checks passed
@captainsafia captainsafia deleted the safia/openapi-pkg branch May 10, 2024 16:51
@tdykstra tdykstra mentioned this pull request May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants