8 instantiations of ApiDescription
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (1)
64var apiDescription = new ApiDescription();
Microsoft.AspNetCore.Grpc.Swagger.Tests (1)
XmlComments\XmlCommentsDocumentFilterTests.cs (1)
48return new ApiDescription
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
DefaultApiDescriptionProvider.cs (1)
101var apiDescription = new ApiDescription()
EndpointMetadataApiDescriptionProvider.cs (1)
100var apiDescription = new ApiDescription
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
JsonPatchOperationsArrayProviderTests.cs (1)
30var apiDescription = new ApiDescription();
Microsoft.AspNetCore.OpenApi.Tests (3)
Extensions\ApiDescriptionExtensionsTests.cs (3)
22var apiDescription = new ApiDescription 47var apiDescription = new ApiDescription 65var apiDescription = new ApiDescription
185 references to ApiDescription
ApiExplorerWebSite (2)
ApiExplorerDataFilter.cs (2)
37foreach (var description in group.Items) 53private ApiExplorerData CreateSerializableData(ApiDescription description)
Microsoft.AspNetCore.Grpc.Swagger (3)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (3)
52var apiDescription = CreateApiDescription(routeEndpoint, httpRule, methodDescriptor, pattern, verb); 62private static ApiDescription CreateApiDescription(RouteEndpoint routeEndpoint, HttpRule httpRule, MethodDescriptor methodDescriptor, string pattern, string verb) 64var apiDescription = new ApiDescription();
Microsoft.AspNetCore.Grpc.Swagger.Tests (1)
XmlComments\XmlCommentsDocumentFilterTests.cs (1)
46static ApiDescription CreateApiDescription(Type serviceType)
Microsoft.AspNetCore.Mvc.Abstractions (8)
ApiExplorer\ApiDescription.cs (1)
36/// Gets arbitrary metadata properties associated with the <see cref="ApiDescription"/>.
ApiExplorer\ApiDescriptionProviderContext.cs (4)
9/// A context object for <see cref="ApiDescription"/> providers. 23Results = new List<ApiDescription>(); 32/// The list of resulting <see cref="ApiDescription"/>. 34public IList<ApiDescription> Results { get; }
ApiExplorer\ApiResponseType.cs (1)
50/// If an <see cref="ApiDescription"/> has a default response, then the <see cref="StatusCode"/> property should be ignored. This response
ApiExplorer\IApiDescriptionProvider.cs (2)
9/// Defines a contract for specifying <see cref="ApiDescription"/> instances. 51/// Creates or modifies <see cref="ApiDescription"/>s.
Microsoft.AspNetCore.Mvc.ApiExplorer (17)
ApiDescriptionExtensions.cs (7)
7/// Extension methods for <see cref="ApiDescription"/>. 12/// Gets the value of a property from the <see cref="ApiDescription.Properties"/> collection 16/// <param name="apiDescription">The <see cref="ApiDescription"/>.</param> 18public static T? GetProperty<T>(this ApiDescription apiDescription) 33/// Sets the value of an property in the <see cref="ApiDescription.Properties"/> collection using 37/// <param name="apiDescription">The <see cref="ApiDescription"/>.</param> 39public static void SetProperty<T>(this ApiDescription apiDescription, T value)
ApiDescriptionGroup.cs (4)
15/// <param name="items">A collection of <see cref="ApiDescription"/> items for this group.</param> 16public ApiDescriptionGroup(string? groupName, IReadOnlyList<ApiDescription> items) 28/// A collection of <see cref="ApiDescription"/> items for this group. 30public IReadOnlyList<ApiDescription> Items { get; }
DefaultApiDescriptionProvider.cs (3)
21/// Implements a provider of <see cref="ApiDescription"/> for actions represented 94private ApiDescription CreateApiDescription( 101var apiDescription = new ApiDescription()
EndpointMetadataApiDescriptionProvider.cs (2)
83private ApiDescription CreateApiDescription(RouteEndpoint routeEndpoint, string httpMethod, MethodInfo methodInfo, bool disableInferredBody) 100var apiDescription = new ApiDescription
Properties\AssemblyInfo.cs (1)
7[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription))]
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (127)
DefaultApiDescriptionProviderTest.cs (74)
72var description = Assert.Single(descriptions); 87var description = Assert.Single(descriptions); 102var description = Assert.Single(descriptions); 118var description = Assert.Single(descriptions); 132var description = Assert.Single(descriptions); 182var description = Assert.Single(descriptions); 228var description = Assert.Single(descriptions); 266var description = Assert.Single(descriptions); 295var description = Assert.Single(descriptions); 311var description = Assert.Single(descriptions); 337var description = Assert.Single(descriptions); 368var description = Assert.Single(descriptions); 391var description = Assert.Single(descriptions); 418var description = Assert.Single(descriptions); 436var description = Assert.Single(descriptions); 460var description = Assert.Single(descriptions); 484var description = Assert.Single(descriptions); 498var description = Assert.Single(descriptions); 516var description = Assert.Single(descriptions); 535var description = Assert.Single(descriptions); 557var description = Assert.Single(descriptions); 575var description = Assert.Single(descriptions); 591var description = Assert.Single(descriptions); 607var description = Assert.Single(descriptions); 632var description = Assert.Single(descriptions); 698var description = Assert.Single(descriptions); 808var description = Assert.Single(descriptions); 871var description = Assert.Single(descriptions); 941var description = Assert.Single(descriptions); 1011var description = Assert.Single(descriptions); 1059var description = Assert.Single(descriptions); 1084var description = Assert.Single(descriptions); 1123var description = Assert.Single(descriptions); 1147var description = Assert.Single(descriptions); 1167var description = Assert.Single(descriptions); 1199var description = Assert.Single(descriptions); 1218var description = Assert.Single(descriptions); 1232var description = Assert.Single(descriptions); 1256var description = Assert.Single(descriptions); 1274var description = Assert.Single(descriptions); 1304var description = Assert.Single(descriptions); 1321var description = Assert.Single(descriptions); 1349var description = Assert.Single(descriptions); 1368var description = Assert.Single(descriptions); 1385var description = Assert.Single(descriptions); 1402var description = Assert.Single(descriptions); 1419var description = Assert.Single(descriptions); 1451var description = Assert.Single(descriptions); 1472var description = Assert.Single(descriptions); 1490var description = Assert.Single(descriptions); 1504var description = Assert.Single(descriptions); 1521var description = Assert.Single(descriptions); 1550var description = Assert.Single(descriptions); 1581var description = Assert.Single(descriptions); 1600var description = Assert.Single(descriptions); 1619var description = Assert.Single(descriptions); 1638var description = Assert.Single(descriptions); 1657var description = Assert.Single(descriptions); 1676var description = Assert.Single(descriptions); 1695var description = Assert.Single(descriptions); 1714var description = Assert.Single(descriptions); 1738var description = Assert.Single(descriptions); 1769var description = Assert.Single(descriptions); 1801var description = Assert.Single(descriptions); 1832var description = Assert.Single(descriptions); 1860var description = Assert.Single(descriptions); 1891var description = Assert.Single(descriptions); 1909var description = Assert.Single(descriptions); 1928var description = Assert.Single(descriptions); 1947var description = Assert.Single(descriptions); 1972var description = Assert.Single(descriptions); 1994var description = Assert.Single(descriptions); 2219private IReadOnlyList<ApiDescription> GetApiDescriptions( 2256return new ReadOnlyCollection<ApiDescription>(context.Results);
EndpointMetadataApiDescriptionProviderTest.cs (53)
48var apiDescription = GetApiDescription(TestAction); 57var apiDescription = GetApiDescription(() => { }); 65static void AssertCustomRequestFormat(ApiDescription apiDescription) 86var apiDescription = GetApiDescription( 105var apiDescription = GetApiDescription( 120var apiDescription = GetApiDescription( 135static void AssertJsonResponse(ApiDescription apiDescription, Type expectedType) 154var apiDescription = GetApiDescription(() => "foo"); 169static void AssertVoid(ApiDescription apiDescription) 187var apiDescription = GetApiDescription( 214var apiDescription = GetApiDescription( 252var apiDescription = GetApiDescription( 280var apiDescription = GetApiDescription(Results<Created<InferredJsonClass>, BadRequest> () => 306var apiDescription = GetApiDescription(() => TypedResults.Created("https://example.com", new InferredJsonClass())); 324var apiDescription = GetApiDescription(() => TypedResults.Problem()); 338var apiDescription = GetApiDescription(() => 357var apiDescription = GetApiDescription( 385var apiDescription = GetApiDescription( 419static void AssertPathParameter(ApiDescription apiDescription) 434static void AssertPathParameter(ApiDescription apiDescription) 448static void AssertPathParameter(ApiDescription apiDescription) 462static void AssertPathParameter(ApiDescription apiDescription, Type expectedTYpe) 483static void AssertPathParameter(ApiDescription apiDescription, Type expectedTYpe) 504static void AssertPathParameter(ApiDescription apiDescription) 518static void AssertPathParameter(ApiDescription apiDescription) 532static void AssertQueryParameter<T>(ApiDescription apiDescription) 554static void AssertBody<T>(ApiDescription apiDescription) 570var apiDescription = GetApiDescription(([FromHeader] int foo) => { }); 595static void AssertBodyParameter(ApiDescription apiDescription, string expectedName, Type expectedType) 611var apiDescription = GetApiDescription(TestActionWithDefaultValue); 620var apiDescription = GetApiDescription(([FromRoute] int foo, int bar, InferredJsonClass fromBody) => { }, httpMethods: ["POST"]); 649static void AssertParameters(ApiDescription apiDescription, string capturedName = "Foo") 700var apiDescription = GetApiDescription(([AsParameters] AsParametersWithRequiredMembers foo) => { }); 713var apiDescription = GetApiDescription(([AsParameters] AsParametersWithRequiredMembers foo) => { }); 730var apiDescription = GetApiDescription(([AsParameters] AsParametersWithRequiredMembersObliviousContext foo) => { }); 742var apiDescription = GetApiDescription(([FromRoute] int foo, int? bar) => { }); 761var apiDescription = GetApiDescription(() => "foo", displayName: "FOO"); 769var apiDescription = GetApiDescription([ApiExplorerSettings(IgnoreApi = true)] () => { }); 787var apiDescription = GetApiDescription((string foo, int bar) => { }); 806var apiDescription = GetApiDescription(([Description("The name.")] string name) => { }); 849var apiDescription = Assert.Single(context.Results); 874var apiDescription = Assert.Single(context.Results); 1272var apiDescription = GetApiDescription( 1289var apiDescription0 = GetApiDescription((IFormFile fromFile) => { }); 1290var apiDescription1 = GetApiDescription((IFormFile? fromFile) => { }); 1310static void AssertFormFileParameter(ApiDescription apiDescription, Type expectedType, string expectedName) 1380var apiDescription = Assert.Single(context.Results); 1416var apiDescription = Assert.Single(context.Results); 1445var apiDescription = Assert.Single(context.Results); 1476var apiDescription = Assert.Single(context.Results); 1510var apiDescription = Assert.Single(context.Results); 1523private static IList<ApiDescription> GetApiDescriptions( 1575private static ApiDescription GetApiDescription(Delegate action, string? pattern = null, string? displayName = null, IEnumerable<string>? httpMethods = null, RequestDelegateFactoryOptions? options = null) =>
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
JsonPatchOperationsArrayProvider.cs (2)
13/// Implements a provider of <see cref="ApiDescription"/> to change parameters of 40foreach (var result in context.Results)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
JsonPatchOperationsArrayProviderTests.cs (1)
30var apiDescription = new ApiDescription();
Microsoft.AspNetCore.OpenApi (18)
Extensions\ApiDescriptionExtensions.cs (4)
20public static OperationType GetOperationType(this ApiDescription apiDescription) => 42public static string MapRelativePathToItemPath(this ApiDescription apiDescription) 93public static bool TryGetFormParameters(this ApiDescription apiDescription, out IEnumerable<ApiParameterDescription> formParameters) 105public static bool TryGetBodyParameter(this ApiDescription apiDescription, [NotNullWhen(true)] out ApiParameterDescription? bodyParameter)
Services\OpenApiDocumentService.cs (12)
235IGrouping<string?, ApiDescription> descriptions, 243foreach (var description in descriptions) 270ApiDescription description, 297private static string? GetSummary(ApiDescription description) 300private static string? GetDescription(ApiDescription description) 303private static string? GetOperationId(ApiDescription description) 307private static List<OpenApiTag>? GetTags(ApiDescription description) 320ApiDescription description, 352ApiDescription apiDescription, 392ApiDescription description, 460private async Task<OpenApiRequestBody?> GetRequestBodyAsync(ApiDescription description, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, CancellationToken cancellationToken) 680private static Type GetTargetType(ApiDescription description, ApiParameterDescription parameter)
Services\OpenApiOptions.cs (2)
48/// A delegate to determine whether a given <see cref="ApiDescription"/> should be included in the given OpenAPI document. 50public Func<ApiDescription, bool> ShouldInclude { get; set; }
Microsoft.AspNetCore.OpenApi.Tests (6)
Extensions\ApiDescriptionExtensionsTests.cs (3)
22var apiDescription = new ApiDescription 47var apiDescription = new ApiDescription 65var apiDescription = new ApiDescription
Services\OpenApiDocumentServiceTestsBase.cs (2)
139public static IApiDescriptionGroupCollectionProvider CreateApiDescriptionGroupCollectionProvider(IList<ApiDescription> apiDescriptions = null) 141var apiDescriptionGroup = new ApiDescriptionGroup("testGroupName", (apiDescriptions ?? Array.Empty<ApiDescription>()).AsReadOnly());
Transformers\OperationTransformerTests.cs (1)
23var apiDescription = context.Description;