74 references to GetApiDescription
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (74)
EndpointMetadataApiDescriptionProviderTest.cs (74)
48var apiDescription = GetApiDescription(TestAction);
57var apiDescription = GetApiDescription(() => { });
105var apiDescription = GetApiDescription(
147AssertJsonResponse(GetApiDescription(() => new InferredJsonClass()), typeof(InferredJsonClass));
148AssertJsonResponse(GetApiDescription(() => (IInferredJsonInterface)null!), typeof(IInferredJsonInterface));
154var apiDescription = GetApiDescription(() => "foo");
179AssertVoid(GetApiDescription(() => { }));
180AssertVoid(GetApiDescription(() => Task.CompletedTask));
181AssertVoid(GetApiDescription(() => new ValueTask()));
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(
427AssertPathParameter(GetApiDescription((int foo) => { }, "/{foo}"));
428AssertPathParameter(GetApiDescription(([FromRoute] int foo) => { }));
442AssertPathParameter(GetApiDescription((TryParseStringRecord foo) => { }, "/{foo}"));
456AssertPathParameter(GetApiDescription((int foo) => { }, "/{foo}"));
470AssertPathParameter(GetApiDescription((DateTime foo) => { }, "/{foo}"), typeof(DateTime));
471AssertPathParameter(GetApiDescription((DateTimeOffset foo) => { }, "/{foo}"), typeof(DateTimeOffset));
472AssertPathParameter(GetApiDescription((DateOnly foo) => { }, "/{foo}"), typeof(DateOnly));
473AssertPathParameter(GetApiDescription((TimeOnly foo) => { }, "/{foo}"), typeof(TimeOnly));
474AssertPathParameter(GetApiDescription((TimeSpan foo) => { }, "/{foo}"), typeof(TimeSpan));
475AssertPathParameter(GetApiDescription((decimal foo) => { }, "/{foo}"), typeof(decimal));
476AssertPathParameter(GetApiDescription((Guid foo) => { }, "/{foo}"), typeof(Guid));
477AssertPathParameter(GetApiDescription((Uri foo) => { }, "/{foo}"), typeof(Uri));
491AssertPathParameter(GetApiDescription((DateTime? foo) => { }, "/{foo}"), typeof(DateTime?));
492AssertPathParameter(GetApiDescription((DateTimeOffset? foo) => { }, "/{foo}"), typeof(DateTimeOffset?));
493AssertPathParameter(GetApiDescription((DateOnly? foo) => { }, "/{foo}"), typeof(DateOnly?));
494AssertPathParameter(GetApiDescription((TimeOnly? foo) => { }, "/{foo}"), typeof(TimeOnly?));
495AssertPathParameter(GetApiDescription((TimeSpan? foo) => { }, "/{foo}"), typeof(TimeSpan?));
496AssertPathParameter(GetApiDescription((decimal? foo) => { }, "/{foo}"), typeof(decimal?));
497AssertPathParameter(GetApiDescription((Guid? foo) => { }, "/{foo}"), typeof(Guid?));
498AssertPathParameter(GetApiDescription((Uri? foo) => { }, "/{foo}"), typeof(Uri));
512AssertPathParameter(GetApiDescription((int? foo) => { }, "/{foo}"));
526AssertPathParameter(GetApiDescription((TryParseStringRecordStruct foo) => { }, "/{foo}"));
540AssertQueryParameter<int>(GetApiDescription((int foo) => { }, "/"));
541AssertQueryParameter<int>(GetApiDescription(([FromQuery] int foo) => { }));
542AssertQueryParameter<TryParseStringRecordStruct>(GetApiDescription(([FromQuery] TryParseStringRecordStruct foo) => { }));
543AssertQueryParameter<int[]>(GetApiDescription((int[] foo) => { }, "/"));
544AssertQueryParameter<string[]>(GetApiDescription((string[] foo) => { }, "/"));
545AssertQueryParameter<StringValues>(GetApiDescription((StringValues foo) => { }, "/"));
546AssertQueryParameter<TryParseStringRecordStruct[]>(GetApiDescription((TryParseStringRecordStruct[] foo) => { }, "/"));
562AssertBody<int[]>(GetApiDescription((int[] foo) => { }, "/", httpMethods: new[] { httpMethod }));
563AssertBody<string[]>(GetApiDescription((string[] foo) => { }, "/", httpMethods: new[] { httpMethod }));
564AssertBody<TryParseStringRecordStruct[]>(GetApiDescription((TryParseStringRecordStruct[] foo) => { }, "/", httpMethods: new[] { httpMethod }));
570var apiDescription = GetApiDescription(([FromHeader] int foo) => { });
581Assert.Empty(GetApiDescription((IInferredServiceInterface foo) => { }).ParameterDescriptions);
582Assert.Empty(GetApiDescription(([FromServices] InferredServiceClass foo) => { }).ParameterDescriptions);
583Assert.Empty(GetApiDescription(([FromKeyedServices("foo")] InferredServiceClass foo) => { }).ParameterDescriptions);
584Assert.Empty(GetApiDescription((HttpContext context) => { }).ParameterDescriptions);
585Assert.Empty(GetApiDescription((HttpRequest request) => { }).ParameterDescriptions);
586Assert.Empty(GetApiDescription((HttpResponse response) => { }).ParameterDescriptions);
587Assert.Empty(GetApiDescription((ClaimsPrincipal user) => { }).ParameterDescriptions);
588Assert.Empty(GetApiDescription((CancellationToken token) => { }).ParameterDescriptions);
589Assert.Empty(GetApiDescription((BindAsyncRecord context) => { }).ParameterDescriptions);
611var apiDescription = GetApiDescription(TestActionWithDefaultValue);
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) => { });
1272var apiDescription = GetApiDescription(
1289var apiDescription0 = GetApiDescription((IFormFile fromFile) => { });
1290var apiDescription1 = GetApiDescription((IFormFile? fromFile) => { });
1319AssertFormFileParameter(GetApiDescription((IFormFile file) => { }), typeof(IFormFile), "file");
1320AssertFormFileParameter(GetApiDescription(([FromForm(Name = "file_name")] IFormFile file) => { }), typeof(IFormFile), "file_name");