CustomSchemaNameAttribute Class
Overrides the schema name used for a type in the generated OpenAPI specification.
public sealed class CustomSchemaNameAttribute : System.AttributeInheritance System.Object 🡒 System.Attribute 🡒 CustomSchemaNameAttribute
Remarks
Section titled “Remarks”By default, schema names are derived from the type name (with the leading I stripped
from interfaces). Apply this attribute to a class, struct or enum to specify an explicit name.
Constructors
Section titled “Constructors”CustomSchemaNameAttribute(string) Constructor
Section titled “CustomSchemaNameAttribute(string) Constructor”Initializes a new instance of CustomSchemaNameAttribute with the specified schema name.
public CustomSchemaNameAttribute(string name);Parameters
Section titled “Parameters”name System.String
The custom name to use for this type in the OpenAPI schema definitions.
Properties
Section titled “Properties”CustomSchemaNameAttribute.Name Property
Section titled “CustomSchemaNameAttribute.Name Property”Gets the custom schema name.
public string Name { get; }Property Value
Section titled “Property Value”Was this page helpful?Thanks for your feedback!