Extending .NET Minimal APIs with Swagger, Authentication & Validation

preview_player
Показать описание

Hello everybody I'm Nick and in this video I wanna will show you how you can add three very useful features in .NET 6's Minimal APIs. Those are Swagger support, Authentication and Authorization support and also Validation support. These are features you requests and they are some of the most basic features an API needs so here you go.

Don't forget to comment, like and subscribe :)

Social Media:

#csharp #dotnet #minimalapi
Рекомендации по теме
Комментарии
Автор

Love your videos Nick! FYI we've added an option to the webapi template to use minimal instead of controllers in rc.2 which includes authn/z and Swagger.

DamianPEdwards
Автор

Great job at the minimal api content I have something to point to when someone at work says these could never be used because it's missing stuff.

yumyumrocks
Автор

Nick Chapsas: _uploads a video on how to add Swagger to minimal APIs_
Me: "YES! OH GOD YES!! FINALLY!!!"

maacpiash
Автор

Awesome Nick! Exactly what I wanted to know more about since your previous video on minimalapi :D

stefangranath
Автор

On your second video you talk about how much better minimal apis where compared to traditional apis performance wise (having the same code). If you add authentication and validation will it still be better in performance? (Obviously assuming you compare minimal apis and traditional both having validation and authentication).

Regardless of performance I will still use the things you taught us. Thanks a lot Nick!

TonoNamnum
Автор

I would like to say, thanks alot for all the constructive information you keep providing.
Keep up the good work Nick!

vince
Автор

Very excellent explanation, thank you for going through this. The fluent api really kinda saves the day there.

ToadieBog
Автор

Ahah!!! My favourite .NET YouTuber 😁(and minimal APIs too!!)

portlyoldman
Автор

You made my day ! It's everything that was missing to start my new project =)

thibaudgallanddemanneville
Автор

Would love to see you cover versioning for minimal api if possible?

I have previously implemented versioning using AddApiVersioning, AddVersionedApiExplorer etc. However to get it to work it appears to rely on AddControllersWithViews including a convention to select the the correct endpoint. I can get Swagger to play nice, but its that call that seems to be controller specific.

Finally just a quick note to say thank you for your videos. You somehow manage to keep them short, to the point, very informative while never feeling rushed. Great balance.

mattgabriel
Автор

Thanks for the video Nick! How can I add Swagger extra documentation (xml/summary/remarks/example post models) to endpoints?

markusn
Автор

Neat. How do you authorize using Active Directory groups?

dasfahrer
Автор

anyone have an example of how to make the validation part middleware as he suggested? It looks like action filters are not available in minimal api

LindenMikus
Автор

I think we still missing a video related to minimal API versioning. Hope to see that soon.

adilbangush
Автор

Hello! Could you please make a video on how to show in swagger signalr endpoints? Thank you 🙏

Necromoph
Автор

Great video! We are in a discussion in my company in Microsoft Covenance Team about whether to start using MinimalAPI or not. As I am a fan of "Don't put logic in a controller" and the CQRS pattern, I guess MinimalAPI is really worth trying. Even for big projects and especially for Microservices.

I do have a question though: as I understood we can add authorization on a specific route or on the complete application. But can I target a route regex? (Similar to AuthorizationAttribute on Controller level instead of whole application or one method)

samysammour
Автор

Loved it, thanks for the awesome content!

KartikyaThakur
Автор

How about claims attribute concept? I.e have to be editor right/role to post

nxecqwh
Автор

Nick - quote from the video @ 17:08 " you can get it from the link in the description below"... Sorry, can't find the link. Can you update the description? Thanks!

michaelestrinone
Автор

What do you think about Vertical Slice Architecture? It would be cool if you cover that topic :D

ivansrsen
welcome to shbcf.ru