Exemplo n.º 1
0
 public static void MapOpenApiDocument(this IEndpointRouteBuilder routeBuilder, string path, OpenApiFile file)
 {
     routeBuilder.MapGet(path, async context =>
     {
         context.Response.StatusCode = StatusCodes.Status200OK;
         await context.Response.WriteAsync(file.Content);
     });
 }
 public ServeOpenApiDocumentOptions(OpenApiFile apiDescription)
 {
     ApiDescription = apiDescription;
 }