Category: NetCoreUsefullEndpoints
-
NetCoreUsefullEndpoints-5 Endpoints summary
So for now the package https://www.nuget.org/packages/NetCoreUsefullEndpoints/ has the following endpoints: GET=>/api/usefull/user/authorization GET=>/api/usefull/user/noAuthorization GET=>/api/usefull/environment GET=>/api/usefull/errorWithILogger GET=>/api/usefull/errorPure GET=>/api/usefull/date GET=>/api/usefull/endpoints/graph ( this calls https://github.com/dotnet/aspnetcore/blob/8bf447aa3f9719f6f162598708020dd4b420b49d/src/Http/Routing/src/Internal/DfaGraphWriter.cs#L22 ) GET=>/api/usefull/endpoints/text GET=>/api/usefull/configuration ( this calls https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.configuration.configurationrootextensions.getdebugview?view=dotnet-plat-ext-6.0 ) You can see in practice at https://netcoreusefullendpoints.azurewebsites.net/swagger/
-
NetCoreUsefullEndpoints-4 Nuget package
or NugetPackages there is a simple .NET Pack CLI command and many configurations However,it is not so simple . See https://docs.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices . In practice,I have a readme.md file ( for showing on nuget.org ) and a readme.txt file( for the programmer to show help after installing the package) THis is what I have in the…
-
NetCoreUsefullEndpoints-3 CICD
Now I find usefull that,every time that I push some code,the code is build and the nuget package is attached . So GitHub Actions to the rescue. There will be 2 GitHub actions – one for build and package,other for deploying to the Azure a test application This is the code for building. ( The…
-
NetCoreUsefullEndpoints-2–MVP
So let’s start the implementation for user / error / environment. The only difficulty resides in the fact that IEndpointRouteBuilder is not defined into a usual library,but the dll csproj must contain <ItemGroup> <FrameworkReference Include=”Microsoft.AspNetCore.App” /> </ItemGroup> Otherwise,it is work as usual. For example,for seeing a user public static void MapUser(this IEndpointRouteBuilder route) { ArgumentNullException.ThrowIfNull(route);…
-
NetCoreUsefullEndpoints–1- Idea
For every web Api that I produce I want to see if it is well configured . That means The error flows how it should,where it should ? ( API for error ) The user is authorized and authenticated ? What is the current environment that I have ? ( name of the host )…