diff --git a/aspnetcore/fundamentals/openapi/aspnetcore-openapi.md b/aspnetcore/fundamentals/openapi/aspnetcore-openapi.md index 0f6d921ddb9b..031210ce6a29 100644 --- a/aspnetcore/fundamentals/openapi/aspnetcore-openapi.md +++ b/aspnetcore/fundamentals/openapi/aspnetcore-openapi.md @@ -8,6 +8,8 @@ ms.custom: mvc ms.date: 5/22/2024 uid: fundamentals/openapi/aspnetcore-openapi --- + + # Work with OpenAPI documents :::moniker range=">= aspnetcore-9.0" @@ -67,7 +69,7 @@ The following code: * Adds OpenAPI services. * Enables the endpoint for viewing the OpenAPI document in JSON format. -[!code-csharp[](~/fundamentals/minimal-apis/9.0-samples/WebMinOpenApi/Program.cs?name=snippet_first&highlight=3,7)] +[!code-csharp[](~/fundamentals/openapi/samples/9.x/WebMinOpenApi/Program.cs?name=snippet_first&highlight=3,7)] Launch the app and navigate to `https://localhost:/openapi/v1.json` to view the generated OpenAPI document. @@ -400,13 +402,13 @@ Because the OpenAPI document is served via a route handler endpoint, any customi The OpenAPI endpoint doesn't enable any authorization checks by default. However, it's possible to limit access to the OpenAPI document. For example, in the following code, access to the OpenAPI document is limited to those with the `tester` role: -[!code-csharp[](~/fundamentals/minimal-apis/9.0-samples/WebMinOpenApi/Program.cs?name=snippet_mapopenapiwithauth)] +[!code-csharp[](~/fundamentals/openapi/samples/9.x/WebMinOpenApi/Program.cs?name=snippet_mapopenapiwithauth)] #### Cache generated OpenAPI document The OpenAPI document is regenerated every time a request to the OpenAPI endpoint is sent. Regeneration enables transformers to incorporate dynamic application state into their operation. For example, regenerating a request with details of the HTTP context. When applicable, the OpenAPI document can be cached to avoid executing the document generation pipeline on each HTTP request. -[!code-csharp[](~/fundamentals/minimal-apis/9.0-samples/WebMinOpenApi/Program.cs?name=snippet_mapopenapiwithcaching)] +[!code-csharp[](~/fundamentals/openapi/samples/9.x/WebMinOpenApi/Program.cs?name=snippet_mapopenapiwithcaching)] @@ -434,13 +436,13 @@ Transformers can be registered onto the document via the `AddDocumentTransformer * Register a document transformer using a DI-activated `IOpenApiDocumentTransformer`. * Register an operation transformer using a delegate. -[!code-csharp[](~/fundamentals/minimal-apis/9.0-samples/WebMinOpenApi/Program.cs?name=snippet_transUse&highlight=8-13)] +[!code-csharp[](~/fundamentals/openapi/samples/9.x/WebMinOpenApi/Program.cs?name=snippet_transUse&highlight=8-13)] ### Execution order for transformers Transformers execute in first-in first-out order based on registration. In the following snippet, the document transformer has access to the modifications made by the operation transformer: -[!code-csharp[](~/fundamentals/minimal-apis/9.0-samples/WebMinOpenApi/Program.cs?name=snippet_transInOut&highlight=3-9)] +[!code-csharp[](~/fundamentals/openapi/samples/9.x/WebMinOpenApi/Program.cs?name=snippet_transInOut&highlight=3-9)] ### Use document transformers @@ -452,18 +454,18 @@ Document transformers have access to a context object that includes: Document transformers also can mutate the OpenAPI document that is generated. The following example demonstrates a document transformer that adds some information about the API to the OpenAPI document. -[!code-csharp[](~/fundamentals/minimal-apis/9.0-samples/WebMinOpenApi/Program.cs?name=snippet_documenttransformer1)] +[!code-csharp[](~/fundamentals/openapi/samples/9.x/WebMinOpenApi/Program.cs?name=snippet_documenttransformer1)] Service-activated document transformers can utilize instances from DI to modify the app. The following sample demonstrates a document transformer that uses the `IAuthenticationSchemeProvider` service from the authentication layer. It checks if any JWT bearer-related schemes are registered in the app and adds them to the OpenAPI document's top level: -[!code-csharp[](~/fundamentals/minimal-apis/9.0-samples/WebMinOpenApi/Program.cs?name=snippet_documenttransformer2)] +[!code-csharp[](~/fundamentals/openapi/samples/9.x/WebMinOpenApi/Program.cs?name=snippet_documenttransformer2)] Document transformers are unique to the document instance they're associated with. In the following example, a transformer: * Registers authentication-related requirements to the `internal` document. * Leaves the `public` document unmodified. -[!code-csharp[](~/fundamentals/minimal-apis/9.0-samples/WebMinOpenApi/Program.cs?name=snippet_multidoc_operationtransformer1)] +[!code-csharp[](~/fundamentals/openapi/samples/9.x/WebMinOpenApi/Program.cs?name=snippet_multidoc_operationtransformer1)] ### Use operation transformers @@ -480,7 +482,7 @@ Operation transformers have access to a context object which contains: For example, the following operation transformer adds `500` as a response status code supported by all operations in the document. -[!code-csharp[](~/fundamentals/minimal-apis/9.0-samples/WebMinOpenApi/Program.cs?name=snippet_operationtransformer1)] +[!code-csharp[](~/fundamentals/openapi/samples/9.x/WebMinOpenApi/Program.cs?name=snippet_operationtransformer1)] ## Using the generated OpenAPI document @@ -494,13 +496,13 @@ The `Swashbuckle.AspNetCore.SwaggerUi` package provides a bundle of Swagger UI's Enable the swagger-ui middleware with a reference to the OpenAPI route registered earlier. To limit information disclosure and security vulnerability, ***only enable Swagger UI in development environments.*** -[!code-csharp[](~/fundamentals/minimal-apis/9.0-samples/WebMinOpenApi/Program.cs?name=snippet_swaggerui)] +[!code-csharp[](~/fundamentals/openapi/samples/9.x/WebMinOpenApi/Program.cs?name=snippet_swaggerui)] ### Using Scalar for interactive API documentation [Scalar](https://scalar.com/) is an open-source interactive document UI for OpenAPI. Scalar can integrate with the OpenAPI endpoint provided by ASP.NET Core. To configure Scalar, install the `Scalar.AspNetCore` package. -[!code-csharp[](~/fundamentals/minimal-apis/9.0-samples/WebMinOpenApi/Program.cs?name=snippet_openapiwithscalar)] +[!code-csharp[](~/fundamentals/openapi/samples/9.x/WebMinOpenApi/Program.cs?name=snippet_openapiwithscalar)] ### Lint generated OpenAPI documents with Spectral diff --git a/aspnetcore/fundamentals/openapi/buildtime-openapi.md b/aspnetcore/fundamentals/openapi/buildtime-openapi.md index 5fbf081b8483..254a4f052c88 100644 --- a/aspnetcore/fundamentals/openapi/buildtime-openapi.md +++ b/aspnetcore/fundamentals/openapi/buildtime-openapi.md @@ -3,23 +3,27 @@ title: Generate OpenAPI documents at build time author: captainsafia description: Learn how to generate OpenAPI documents in your application's build step ms.author: safia -monikerRange: '>= aspnetcore-6.0' +monikerRange: '>= aspnetcore-9.0' ms.custom: mvc ms.date: 8/13/2024 uid: fundamentals/openapi/buildtime-openapi --- + + # Generate OpenAPI documents at build-time -In a typical web applications, OpenAPI documents are generated at run-time and served via an HTTP request to the application server. +In typical web apps, OpenAPI documents are generated at run-time and served via an HTTP request to the app server. -In some scenarios, it is helpful to generate the OpenAPI document during the application's build step. These scenarios including: +Generating OpenAPI documentation during the app's build step can be useful for documentation that is: -- Generating OpenAPI documentation that is committed into source control -- Generating OpenAPI documentation that is used for spec-based integration testing -- Generating OpenAPI documentation that is served statically from the web server +- Committed into source control. +- Used for spec-based integration testing. +- Served statically from the web server. -To add support for generating OpenAPI documents at build time, install the `Microsoft.Extensions.ApiDescription.Server` package: +To add support for generating OpenAPI documents at build time, install the [`Microsoft.Extensions.ApiDescription.Server`](https://www.nuget.org/packages/Microsoft.Extensions.ApiDescription.Server) NuGet package: ### [Visual Studio](#tab/visual-studio) @@ -36,65 +40,92 @@ Run the following command in the directory that contains the project file: ```dotnetcli dotnet add package Microsoft.Extensions.ApiDescription.Server --prerelease ``` + --- -Upon installation, this package will automatically generate the Open API document(s) associated with the application during build and populate them into the application's output directory. +The `Microsoft.Extensions.ApiDescription.Server` package automatically generates the Open API document(s) associated with the app during build and places them in the app's `obj` directory: + +Consider a template created API app named `MyTestApi`: + +### [Visual Studio](#tab/visual-studio) + +The Output tab in Visual Studio when building the app includes information similar to the following: + +```text +1>Generating document named 'v1'. +1>Writing document named 'v1' to 'MyProjectPath/obj/MyTestApi.json'. +``` + +### [.NET CLI](#tab/net-cli) + +The following commands build the app and display the generated OpenAPI document: ```cli $ dotnet build -$ cat bin/Debub/net9.0/{ProjectName}.json +$ cat obj/MyTestApi.json ``` -## Customizing build-time document generation +--- -### Modifying the output directory of the generated Open API file +The generated `obj/{MyProjectName}.json` file contains the [OpenAPI version, title, endpoints, and more](https://learn.openapis.org/specification/structure.html). The first few lines of `obj/MyTestApi.json` file: -By default, the generated OpenAPI document will be emitted to the application's output directory. To modify the location of the emitted file, set the target path in the `OpenApiDocumentsDirectory` property. +:::code language="json" source="~/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.json" range="1-15" highlight="4-5"::: -```xml - - ./ - -``` +## Customize build-time document generation -The value of `OpenApiDocumentsDirectory` is resolved relative to the project file. Using the `./` value above will emit the OpenAPI document in the same directory as the project file. +Build-time document generation can be customized with properties added to the project file. [dotnet](/dotnet/core/tools/) parses the `ApiDescription.Server` properties in the project file and provides the property and values as arguments to the build-time document generator. The following properties are available and explained in the following sections: -### Modifying the output file name +:::code language="xml" source="~/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.csproj.php" id="snippet_all" highlight="2-4"::: -By default, the generated OpenAPI document will have the same name as the application's project file. To modify the name of the emitted file, set the `--file-name` argument in the `OpenApiGenerateDocumentsOptions` property. +### Modify the output directory of the generated Open API file -```xml - - --file-name my-open-api - -``` +By default, the generated OpenAPI document is generated in the `obj` directory. The value of the `OpenApiDocumentsDirectory` property: -### Selecting the OpenAPI document to generate +* Sets the location of the generated file. +* Is resolved relative to the project file. -Some applications may be configured to emit multiple OpenAPI documents, for various versions of an API or to distinguish between public and internal APIs. By default, the build-time document generator will emit files for all documents that are configured in an application. To only emit for a single document name, set the `--document-name` argument in the `OpenApiGenerateDocumentsOptions` property. +The following example generates the OpenAPI document in the same directory as the project file: -```xml - - --document-name v2 - -``` +:::code language="xml" source="~/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.csproj.php" id="snippet_1" highlight="2"::: -## Customizing run-time behavior during build-time document generation +In the following example, the OpenAPI document is generated in the `MyOpenApiDocs` directory, which is a sibling directory to the project directory: -Under the hood, build-time OpenAPI document generation functions by launching the application's entrypoint with an inert server implementation. This is a requirement to produce accurate OpenAPI documents since all information in the OpenAPI document cannot be statically analyzed. Because the application's entrypoint is invoked, any logic in the applications' startup will be invoked. This includes code that injects services into the DI container or reads from configuration. In some scenarios, it's necessary to restrict the codepaths that will run when the application's entry point is being invoked from build-time document generation. These scenarios include: +:::code language="xml" source="~/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.csproj.php" id="snippet2" highlight="2"::: -- Not reading from certain configuration strings -- Not registering database-related services +### Modify the output file name -In order to restrict these codepaths from being invoked by the build-time generation pipeline, they can be conditioned behind a check of the entry assembly like so: +By default, the generated OpenAPI document has the same name as the app's project file. To modify the name of the generated file, set the `--file-name` argument in the `OpenApiGenerateDocumentsOptions` property: -```csharp -using System.Reflection; +:::code language="xml" source="~/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.csproj.php" id="snippet_file_name" highlight="2"::: -var builder = WebApplication.CreateBuilder(); +The preceding markup configures creation of the `obj/my-open-api.json` file. -if (Assembly.GetEntryAssembly()?.GetName().Name != "GetDocument.Insider") -{ - builders.Services.AddDefaults(); -} -``` +### Select the OpenAPI document to generate + +Some apps may be configured to generate multiple OpenAPI documents, for example: + +* For different versions of an API. +* To distinguish between public and internal APIs. + +By default, the build-time document generator creates files for all documents that are configured in an app. To generate for a single document only, set the `--document-name` argument in the `OpenApiGenerateDocumentsOptions` property: + +:::code language="xml" source="~/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.csproj.php" id="snippet_doc_name"::: + + + +## OpenAPI document cleanup + +The generated OpenAPI documents are not cleaned up by `dotnet clean` or **Build > Clean Solution** in Visual Studio. To remove the generated OpenAPI documents, delete the `obj` directory or the directory specified by the `OpenApiDocumentsDirectory` property. diff --git a/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/MyTestApi.csproj b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/MyTestApi.csproj new file mode 100644 index 000000000000..a749c19167e1 --- /dev/null +++ b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/MyTestApi.csproj @@ -0,0 +1,25 @@ + + + + net9.0 + enable + enable + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + true + + + + --document-name v2 + + + diff --git a/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/MyTestApi.http b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/MyTestApi.http new file mode 100644 index 000000000000..48cebc92d853 --- /dev/null +++ b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/MyTestApi.http @@ -0,0 +1,6 @@ +@MyTestApi_HostAddress = http://localhost:5276 + +GET {{MyTestApi_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/Program.cs b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/Program.cs new file mode 100644 index 000000000000..b6022eb507be --- /dev/null +++ b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/Program.cs @@ -0,0 +1,53 @@ +var builder = WebApplication.CreateBuilder(args); + +builder.Services.AddOpenApi(); +builder.Services.AddOpenApi("v2"); + +var app = builder.Build(); + +if (app.Environment.IsDevelopment()) +{ + app.MapOpenApi(); +} + +app.UseHttpsRedirection(); + +var summaries = new[] +{ + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" +}; + +app.MapGet("/weatherforecast", () => +{ + var forecast = Enumerable.Range(1, 5).Select(index => + new WeatherForecast + ( + DateOnly.FromDateTime(DateTime.Now.AddDays(index)), + Random.Shared.Next(-20, 55), + summaries[Random.Shared.Next(summaries.Length)] + )) + .ToArray(); + return forecast; +}) +.WithName("GetWeatherForecast"); + +app.MapGet("/v2/weatherforecast", (HttpContext httpContext) => +{ + var forecast = Enumerable.Range(1, 5).Select(index => + new WeatherForecast + ( + DateOnly.FromDateTime(DateTime.Now.AddDays(index)), + Random.Shared.Next(-20, 55), + summaries[Random.Shared.Next(summaries.Length)] + )) + .ToArray(); + return forecast; +}) +.WithGroupName("v2"); + +app.Run(); + +record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) +{ + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); +} diff --git a/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/Skip.cs b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/Skip.cs new file mode 100644 index 000000000000..4947e4711eb3 --- /dev/null +++ b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/Skip.cs @@ -0,0 +1,34 @@ +#if NEVER +// +using ControllerApi.Data; +using Microsoft.EntityFrameworkCore; +using System.Reflection; + +var builder = WebApplication.CreateBuilder(args); + +if (Assembly.GetEntryAssembly()?.GetName().Name != "MyTestApi") +{ + builder.Services.AddDbContext(options => + options.UseSqlServer(builder.Configuration.GetConnectionString("ControllerApiContext") + ?? throw new InvalidOperationException("Connection string 'ControllerApiContext' not found."))); +} + +builder.Services.AddControllers(); +builder.Services.AddOpenApi(); + +var app = builder.Build(); + +if (app.Environment.IsDevelopment()) +{ + app.MapOpenApi(); +} + +app.UseHttpsRedirection(); + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); +// +#endif diff --git a/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/appsettings.Development.json b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/appsettings.Development.json new file mode 100644 index 000000000000..0c208ae9181e --- /dev/null +++ b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/appsettings.json b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/appsettings.json new file mode 100644 index 000000000000..10f68b8c8b4f --- /dev/null +++ b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.csproj.php b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.csproj.php new file mode 100644 index 000000000000..33bbffbf070e --- /dev/null +++ b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.csproj.php @@ -0,0 +1,39 @@ + + + + + --file-name my-open-api + + + + + + . + + + + + ../MyOpenApiDocs + + + + + + --document-name v2 + + + + + + . + --file-name my-open-api + --document-name v2 + + diff --git a/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.json b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.json new file mode 100644 index 000000000000..f443cfb8601e --- /dev/null +++ b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/csproj/MyTestApi.json @@ -0,0 +1,57 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "MyTestApi | v1", + "version": "1.0.0" + }, + "paths": { + "/weatherforecast": { + "get": { + "tags": [ + "MyTestApi" + ], + "operationId": "GetWeatherForecast", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date" + }, + "temperatureC": { + "type": "integer", + "format": "int32" + }, + "temperatureF": { + "type": "integer", + "format": "int32" + }, + "summary": { + "type": "string", + "nullable": true + } + } + } + } + } + } + } + } + } + } + }, + "components": { }, + "tags": [ + { + "name": "MyTestApi" + } + ] +} diff --git a/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/x.gitignore b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/x.gitignore new file mode 100644 index 000000000000..d2c2a2e41816 --- /dev/null +++ b/aspnetcore/fundamentals/openapi/samples/9.x/BuildTime/x.gitignore @@ -0,0 +1,227 @@ +# This is a copy of the root .gitignore file except for the following line +TestScripts/MyOpenApiTest/ + +*.min.css +*.min.js +*.map + +_build/ +_site/ +Properties/ + +# See #577 +# Use git add -f to force override .sln when required. Not needed in most cases. +# git add -f myProj.sln +*.sln + +Project_Readme.html + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates +.vscode/ +!.vscode/extensions.json +!.vscode/settings.json +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studo 2015 cache/options directory +.vs/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding addin-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +*.[Cc]ache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +bower_components/ +blazor-samples/ +AspNetCore.Docs.Samples/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +project.lock.json +__pycache__/ + +#Mac OSX +.DS_Store + +# Windows thumbnail cache files +Thumbs.db diff --git a/aspnetcore/toc.yml b/aspnetcore/toc.yml index 136a512d1164..357c1fcd19e5 100644 --- a/aspnetcore/toc.yml +++ b/aspnetcore/toc.yml @@ -846,8 +846,6 @@ items: uid: fundamentals/openapi/overview - name: Work with OpenAPI documents uid: fundamentals/openapi/aspnetcore-openapi - - name: Generate OpenAPI documents at build-time - uid: fundamentals/openapi/buildtime-openapi - name: OpenAPI tools uid: fundamentals/openapi/openapi-tools - name: Swagger / NSWag