Customize swagger page to include schema section within endpoint section in ASP.NET Core 6.0 Web API - .net-core

I am using Swashbuckle.AspNetcore - 6.5 version.
In the Swagger page, is there any way in ASP.NET Core 6.0 Web API to include schema section inside endpoint section itself?
??

Related

Protect ASP.NET WebAPI in .NET 4.7.X with IdentityServer 4 Jwt

So, I have set up IdentityServer 4 in a .NET Core 3.1 project. And I have Web application, also .NET Core 3.1 signing in users through OpenId Connect (oidc). Works perfectly.
But I also have another ASP.NET WebAPI project created in .NET Framework 4.7.2 and I want to let users authenticate to that with a Bearer token created by my IdentityServer 4.
That would work perfectly if that project was also .NET Core. But it's not. It's .NET 4.7.2 and all examples I can find uses .NET Core with "UseIdentityServerAuthentication" which is not available in .NET 4.7.2. Or I find examples using "IdentityServerBearerTokenAuthenticationOptions", but that requires NuGet for IdentityServer 3 and doesn't seem to support Jwt tokens created by IdentityServer 4 (or so I understood - might be incorrect).
Can someone push me in the right direction here? The WebAPI project needs to be .NET Framework 4.7.2, that is a technical requirement.
You are on right track with IdentityServerBearerTokenAuthenticationOptions. you need to use IdentitySever3.AccessTokenValidation on API project.
The issue with IdentityServer4 generated tokens is that their type is at+jwt, but you need JWT on your API, you can easily change the type on IdentityServer like this
var builder = services.AddIdentityServer(
options =>
{
options.AccessTokenJwtType = "JWT";
})
You may have other issues along the way, which I suggest you to read my blog explaining this with IdentityServer4 and .NET 4.5.2 https://nahidfa.com/posts/identityserver4-and-asp-.net-web-api/

How can I generate static REST api documentation from swagger 1.2 annotated spring MVC application

I have spring MVC based REST controllers annotated with Swagger 1.2 annotations for all my REST apis.
I have my swagger documentation working just fine with these annotations.
I'd like to generate static html pages with the above documentation so that they can be hosted independent of my web app.
Is there a way to generate this ?

Bot Framework asp.net core

As we all know that Asp.net WEB API is not a good option to use when working with front end of a web application. And Bot Framework template is based on WEB API I'm developing a bot but I want to use mvc or .net core instead of web api.
can we do so ?
if yes what changes I have to make for that in other templates LIKE MVC or .NET Core?
Your question a little bit confusing.
ASP .NET Web API based on MVC. The connector client already support .NET Standard as far I know. .NET Core port is in progress but here is basic port from the main repo. Most of the stuff inside the bot builder uses simple API because, this a connector to your 3rd parties ( slack , skype etc ).

No Individual User Accounts auth option in ASP.NET Core Web API template

I am a bit confused as to why there is no Individual User Accounts authentication option in the latest ASP.NET Core Web API template.
Is it still possible to implement individual user accounts the way that the MVC template does or would it not make sense?
Let's say I am creating a stand-alone web API that is going to have all of my business logic and data layer that accesses the database which has the AspNet Identity tables. I plan on making calls to this API w/ an MVC app.
I know one way of doing this is to create an asp.net MVC app w/ individual user accounts auth and simply build the API right within the MVC app using a controllers/api folder. However, I don't want to do it this way because I want the API to be its own standalone project that can be hosted on a completely different server and accessed by multiple applications, not just an MVC app.
Can someone lead me in the right direction on how authentication typically works in this scenario since there is no template?
Individual User Accounts authentication option for the ASP.NET Core Web API is available in .NET Core 2.0 Preview 1.
Unfortunately .NET Core 2.0 Preview 1 isn't available in VS 2017 release.
But you can install Visual Studio 2017 Preview (you can use it side-by-side with VS 2017 stable version) :
I think you can use IdentityServer4 which allows implementing single sign-on and access control for ASP .NET Core Web APIs using protocols like OpenID Connect and OAuth2. It offers integration with ASP.NET Core Identity and Entity Framework Core.
You will need to install to the following nuget package:
Install-Package IdentityServer4
and add the IdentityServer middleware to the HTTP pipeline:
app.UseIdentityServer();
You can find several quick start samples here or follow this article.

Connecting to Umbraco 6.2 from web application

I need to iterate through the nodes in Umbraco 6.2 in the external web application.
But dont know how to make a connection in the code behind to Umbrao cms.
Thanks
Easiest way would be to use umbraco web api.
Umbraco Web api would allow you to set up a restful web service that would call via a url with querystring parameters if required.
In the web api controller, you would have access to all of the Umbraco nodes and you could return results in xml or json format as required.
This is a good reference - https://our.umbraco.org/documentation/Reference/WebApi/
Wing

Resources