-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix form handling and add NuGet pkg docs (#55321)
- Loading branch information
1 parent
3f68a51
commit 6d9dca9
Showing
13 changed files
with
1,206 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
## About | ||
|
||
Microsoft.AspNetCore.OpenApi is a NuGet package that provides built-in support for generating OpenAPI documents from minimal or controller-based APIs in ASP.NET Core. | ||
|
||
## Key Features | ||
|
||
* Supports viewing generated OpenAPI documents at runtime via a parameterized endpoint (`/openapi/{documentName}.json`) | ||
* Supports generating an OpenAPI document at build-time | ||
* Supports customizing the generated document via document transformers | ||
|
||
## How to Use | ||
|
||
To start using Microsoft.AspNetCore.OpenApi in your ASP.NET Core application, follow these steps: | ||
|
||
### Installation | ||
|
||
```sh | ||
dotnet add package Microsoft.AspNetCore.OpenApi | ||
``` | ||
|
||
### Configuration | ||
|
||
In your Program.cs file, register the services provided by this package in the DI container and map the provided OpenAPI document endpoint in the application. | ||
|
||
```C# | ||
var builder = WebApplication.CreateBuilder(); | ||
|
||
// Registers the required services | ||
builder.Services.AddOpenApi(); | ||
|
||
var app = builder.Build(); | ||
|
||
// Adds the /openapi/{documentName}.json endpoint to the application | ||
app.MapOpenApi(); | ||
|
||
app.Run(); | ||
``` | ||
|
||
For more information on configuring and using Microsoft.AspNetCore.OpenApi, refer to the [official documentation](https://learn.microsoft.com/aspnet/core/fundamentals/minimal-apis/openapi). | ||
|
||
## Main Types | ||
|
||
<!-- The main types provided in this library --> | ||
|
||
The main types provided by this library are: | ||
|
||
* `OpenApiOptions`: Options for configuring OpenAPI document generation. | ||
* `IDocumentTransformer`: Transformer that modifies the OpenAPI document generated by the library. | ||
|
||
## Feedback & Contributing | ||
|
||
<!-- How to provide feedback on this package and contribute to it --> | ||
|
||
Microsoft.AspNetCore.OpenApi is released as open-source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/aspnetcore). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.