< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.OpenApi.Attributes.OpenApiResponseAttribute
Assembly: CoreWCF.WebHttp
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.WebHttp/src/CoreWCF/OpenApi/Attributes/OpenApiResponseAttribute.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 35
Line coverage: 100%
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

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.WebHttp/src/CoreWCF/OpenApi/Attributes/OpenApiResponseAttribute.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4using System;
 5using System.Net;
 6
 7namespace CoreWCF.OpenApi.Attributes
 8{
 9    /// <summary>
 10    /// Attribute to denote information about a response from an operation.
 11    /// </summary>
 12    [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
 13    public sealed class OpenApiResponseAttribute : Attribute
 14    {
 15        /// <summary>
 16        /// A status code that can be returned by an operation.
 17        /// </summary>
 2918        public HttpStatusCode StatusCode { get; set; } = HttpStatusCode.OK;
 19
 20        /// <summary>
 21        /// A type that can be returned by an operation.
 22        /// </summary>
 1023        public Type Type { get; set; }
 24
 25        /// <summary>
 26        /// A description of why this type and status code would be returned by an operation.
 27        /// </summary>
 1328        public string Description { get; set; }
 29
 30        /// <summary>
 31        /// Content types this response can be returned as.
 32        /// </summary>
 1233        public string[] ContentTypes { get; set; }
 34    }
 35}