Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples to AddOpenApi extension method/overloads #58808

Merged
merged 8 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Microsoft.AspNetCore;
mikekistler marked this conversation as resolved.
Show resolved Hide resolved
using Microsoft.AspNetCore.Http.Json;
using Microsoft.AspNetCore.OpenApi;
using Microsoft.Extensions.ApiDescriptions;
Expand All @@ -19,6 +20,14 @@
/// </summary>
/// <param name="services">The <see cref="IServiceCollection"/> to register services onto.</param>
/// <param name="documentName">The name of the OpenAPI document associated with registered services.</param>
/// <example>
/// This method is commonly used to add OpenAPI services to the <see cref="WebApplicationBuilder.Services"/>

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: macOS)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: Ubuntu x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: macOS)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS arm64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: Ubuntu x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 24 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L24

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(24,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved
/// of a <see cref="WebApplicationBuilder"/>, as shown in the following example:

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: macOS)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: Ubuntu x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: macOS)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS arm64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: Ubuntu x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 25 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L25

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(25,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved
/// <code>
/// var builder = WebApplication.CreateBuilder(args);
/// builder.Services.AddOpenApi("MyWebApi");
/// </code>
/// </example>
public static IServiceCollection AddOpenApi(this IServiceCollection services, string documentName)
{
ArgumentNullException.ThrowIfNull(services);
Expand All @@ -32,6 +41,17 @@
/// <param name="services">The <see cref="IServiceCollection"/> to register services onto.</param>
/// <param name="documentName">The name of the OpenAPI document associated with registered services.</param>
/// <param name="configureOptions">A delegate used to configure the target <see cref="OpenApiOptions"/>.</param>
/// <example>
/// This method is commonly used to add OpenAPI services to the <see cref="WebApplicationBuilder.Services"/>

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: macOS)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: Ubuntu x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: macOS)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS arm64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: Ubuntu x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 45 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L45

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(45,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved
/// of a <see cref="WebApplicationBuilder"/>, as shown in the following example:

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: macOS)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: Ubuntu x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: macOS)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS arm64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: Ubuntu x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved

Check failure on line 46 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L46

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(46,25): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'WebApplicationBuilder' that could not be resolved
/// <code>
/// var builder = WebApplication.CreateBuilder(args);
/// builder.Services.AddOpenApi("MyWebApi", options => {
/// // Add a custom schema transformer for decimal types
/// options.AddSchemaTransformer(DecimalTransformer.TransformAsync);
/// });
/// </code>
/// </example>
public static IServiceCollection AddOpenApi(this IServiceCollection services, string documentName, Action<OpenApiOptions> configureOptions)
{
ArgumentNullException.ThrowIfNull(services);
Expand All @@ -51,13 +71,32 @@
/// </summary>
/// <param name="services">The <see cref="IServiceCollection"/> to register services onto.</param>
/// <param name="configureOptions">A delegate used to configure the target <see cref="OpenApiOptions"/>.</param>
/// <example>
/// This method is commonly used to add OpenAPI services to the <see cref="WebApplicationBuilder.Services"/>

Check failure on line 75 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L75

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(75,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 75 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L75

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(75,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 75 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L75

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(75,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 75 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L75

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(75,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 75 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L75

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(75,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 75 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L75

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(75,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 75 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L75

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(75,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 75 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: macOS)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L75

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(75,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 75 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: macOS)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L75

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(75,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 75 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS arm64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L75

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(75,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved

Check failure on line 75 in src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: Ubuntu x64)

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs#L75

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs(75,80): error CS1574: (NETCORE_ENGINEERING_TELEMETRY=Build) XML comment has cref attribute 'Services' that could not be resolved
/// of a <see cref="WebApplicationBuilder"/>, as shown in the following example:
/// <code>
/// var builder = WebApplication.CreateBuilder(args);
/// builder.Services.AddOpenApi(options => {
/// // Add a custom schema transformer for decimal types
/// options.AddSchemaTransformer(DecimalTransformer.TransformAsync);
/// });
/// </code>
/// </example>
public static IServiceCollection AddOpenApi(this IServiceCollection services, Action<OpenApiOptions> configureOptions)
=> services.AddOpenApi(OpenApiConstants.DefaultDocumentName, configureOptions);

/// <summary>
/// Adds OpenAPI services related to the default document to the specified <see cref="IServiceCollection"/>.
/// </summary>
/// <param name="services">The <see cref="IServiceCollection"/> to register services onto.</param>
/// <example>
/// This method is commonly used to add OpenAPI services to the <see cref="WebApplicationBuilder.Services"/>
/// of a <see cref="WebApplicationBuilder"/>, as shown in the following example:
/// <code>
/// var builder = WebApplication.CreateBuilder(args);
/// builder.Services.AddOpenApi();
/// </code>
/// </example>
public static IServiceCollection AddOpenApi(this IServiceCollection services)
=> services.AddOpenApi(OpenApiConstants.DefaultDocumentName);

Expand Down
1 change: 1 addition & 0 deletions src/OpenApi/src/Microsoft.AspNetCore.OpenApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<Reference Include="Microsoft.AspNetCore.Routing" />
<Reference Include="Microsoft.AspNetCore.Mvc.Core" />
<Reference Include="Microsoft.AspNetCore.Mvc.ApiExplorer" />
<Reference Include="Microsoft.AspNetCore" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading