Class EndpointMetadata
- Namespace
- Cratis.Arc.Http
- Assembly
- Cratis.Arc.Core.dll
Represents metadata for an endpoint.
public record EndpointMetadata : IEquatable<EndpointMetadata>
- Inheritance
-
EndpointMetadata
- Implements
- Inherited Members
- Extension Methods
Constructors
EndpointMetadata(EndpointMetadata)
protected EndpointMetadata(EndpointMetadata original)
Parameters
originalEndpointMetadata
EndpointMetadata(string, string?, IEnumerable<string>?, bool, Type?, Type?, bool)
Represents metadata for an endpoint.
public EndpointMetadata(string Name, string? Summary = null, IEnumerable<string>? Tags = null, bool AllowAnonymous = false, Type? RequestBodyType = null, Type? ResponseType = null, bool ExcludeFromApiDescription = false)
Parameters
NamestringThe unique name of the endpoint.
SummarystringA summary description of what the endpoint does.
TagsIEnumerable<string>Tags for grouping endpoints.
AllowAnonymousboolWhether anonymous access is allowed.
RequestBodyTypeTypeThe type of the request body, if any.
ResponseTypeTypeThe type of the response body, if any.
ExcludeFromApiDescriptionboolWhether the endpoint should be excluded from the generated API description (e.g. OpenAPI).
Properties
AllowAnonymous
Whether anonymous access is allowed.
public bool AllowAnonymous { get; init; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
ExcludeFromApiDescription
Whether the endpoint should be excluded from the generated API description (e.g. OpenAPI).
public bool ExcludeFromApiDescription { get; init; }
Property Value
Name
The unique name of the endpoint.
public string Name { get; init; }
Property Value
RequestBodyType
The type of the request body, if any.
public Type? RequestBodyType { get; init; }
Property Value
RequireAuthentication
Gets whether this endpoint explicitly requires an authenticated caller.
public bool RequireAuthentication { get; init; }
Property Value
ResponseType
The type of the response body, if any.
public Type? ResponseType { get; init; }
Property Value
Roles
Gets comma-separated roles, any one of which grants access to an authenticated caller.
public string? Roles { get; init; }
Property Value
Summary
A summary description of what the endpoint does.
public string? Summary { get; init; }
Property Value
Tags
Tags for grouping endpoints.
public IEnumerable<string>? Tags { get; init; }
Property Value
Methods
Deconstruct(out string, out string?, out IEnumerable<string>?, out bool, out Type?, out Type?, out bool)
public void Deconstruct(out string Name, out string? Summary, out IEnumerable<string>? Tags, out bool AllowAnonymous, out Type? RequestBodyType, out Type? ResponseType, out bool ExcludeFromApiDescription)
Parameters
NamestringSummarystringTagsIEnumerable<string>AllowAnonymousboolRequestBodyTypeTypeResponseTypeTypeExcludeFromApiDescriptionbool
Equals(EndpointMetadata?)
public virtual bool Equals(EndpointMetadata? other)
Parameters
otherEndpointMetadata
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(EndpointMetadata?, EndpointMetadata?)
public static bool operator ==(EndpointMetadata? left, EndpointMetadata? right)
Parameters
leftEndpointMetadatarightEndpointMetadata
Returns
operator !=(EndpointMetadata?, EndpointMetadata?)
public static bool operator !=(EndpointMetadata? left, EndpointMetadata? right)
Parameters
leftEndpointMetadatarightEndpointMetadata