< Summary

Information
Class: TicTacToeApp.API.Extensions.SwaggerServices
Assembly: TicTacToeApp.API
File(s): /home/runner/work/TicTacToe/TicTacToe/TicTacToeApp.API/Extensions/SwaggerServices.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 23
Coverable lines: 23
Total lines: 38
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
AddSwaggerServices(...)100%210%

File(s)

/home/runner/work/TicTacToe/TicTacToe/TicTacToeApp.API/Extensions/SwaggerServices.cs

#LineLine coverage
 1using Microsoft.OpenApi.Models;
 2using TicTacToeApp.API.Filters;
 3
 4namespace TicTacToeApp.API.Extensions;
 5
 6public static class SwaggerServices
 7{
 8    public static IServiceCollection AddSwaggerServices(
 9        this IServiceCollection services
 10    )
 11    {
 012        services.AddOpenApi();
 13
 014        services.AddSwaggerGen(c =>
 015        {
 016            c.SwaggerDoc(
 017                "v1",
 018                new OpenApiInfo
 019                {
 020                    Title = "Крестики-нолики ",
 021                    Version = "v1",
 022                    Description = "API для пользователей",
 023                    Contact = new OpenApiContact
 024                    {
 025                        Url = new Uri("https://github.com/artemovsergey/TicTacToe"),
 026                        Email = "artik3314@gmail.com",
 027                    }
 028                }
 029            );
 030
 031            c.EnableAnnotations();
 032            c.SchemaFilter<ErrorResponseSchemaFilter>();
 033            c.OperationFilter<ErrorResponseOperationFilter>();
 034        });
 35
 036        return services;
 37    }
 38}