Example #1
0
    public void UsesTagsFromMultipleCallsToWithTags()
    {
        var testBuilder         = new TestEndpointConventionBuilder();
        var routeHandlerBuilder = new RouteHandlerBuilder(new[] { testBuilder });

        routeHandlerBuilder
        .WithTags("A")
        .WithTags("B");

        var operation = GetOpenApiOperation(() => { }, additionalMetadata: testBuilder.Metadata.ToArray());

        Assert.Collection(operation.Tags,
                          tag => Assert.Equal("A", tag.Name),
                          tag => Assert.Equal("B", tag.Name));
    }
Example #2
0
 private static void SetDefaultOptions(RouteHandlerBuilder routeHandlerBuilder, string operationSummary, string tag)
 {
     routeHandlerBuilder.WithMetadata(new OperationDescriptionAttribute(operationSummary, null));
     routeHandlerBuilder.WithTags(tag);
     routeHandlerBuilder.RequireAuthorization();
 }