< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.OpenApi.Attributes.OpenApiPropertyAttribute
Assembly: CoreWCF.WebHttp
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.WebHttp/src/CoreWCF/OpenApi/Attributes/OpenApiPropertyAttribute.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 39
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/OpenApiPropertyAttribute.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;
 5
 6namespace CoreWCF.OpenApi.Attributes
 7{
 8    /// <summary>
 9    /// Attribute to denote a information about a property in a request or response object.
 10    /// </summary>
 11    [AttributeUsage(AttributeTargets.Property)]
 12    public sealed class OpenApiPropertyAttribute : Attribute
 13    {
 14        /// <summary>
 15        /// Description of the property.
 16        /// </summary>
 1017        public string Description { get; set; }
 18
 19        /// <summary>
 20        /// Whether the property is required or not.
 21        /// </summary>
 1022        public bool IsRequired { get; set; }
 23
 24        /// <summary>
 25        /// Minimum length of the property.
 26        /// </summary>
 227        public int MinLength { get; set; }
 28
 29        /// <summary>
 30        /// Maximum length of the property.
 31        /// </summary>
 232        public int MaxLength { get; set; }
 33
 34        /// <summary>
 35        /// How the property should be formatted.
 36        /// </summary>
 237        public string Format { get; set; }
 38    }
 39}