Class Endpoint
- Namespace
- TypedRest.CodeGeneration.Endpoints
- Assembly
- TypedRest.CodeGeneration.dll
Represents a TypedRest endpoint.
public class Endpoint : IEndpoint, IOpenApiSerializable, IOpenApiElement, IOpenApiExtension
- Inheritance
-
objectEndpoint
- Implements
- Derived
Properties
Children
The child endpoints of this endpoint.
public IDictionary<string, IEndpoint> Children { get; }
Property Value
Description
A short description of the endpoint.
public string? Description { get; set; }
Property Value
Kind
The kind/type of endpoint.
public virtual string Kind { get; }
Property Value
Uri
The relative URI of the endpoint.
public string? Uri { get; set; }
Property Value
Methods
Parse(OpenApiObject, IEndpointParser)
Fills the endpoint with information parsed from an OpenAPI Object.
public virtual void Parse(OpenApiObject data, IEndpointParser parser)
Parameters
dataOpenApiObjectThe OpenAPI Object to parse.
parserIEndpointParserThe endpoint parser to use for parsing child objects.
ParseChildren(OpenApiObject, IEndpointParser)
protected void ParseChildren(OpenApiObject data, IEndpointParser parser)
Parameters
dataOpenApiObjectparserIEndpointParser
ResolveReferences(OpenApiComponents)
Resolves OpenApiReferences.
public virtual void ResolveReferences(OpenApiComponents components)
Parameters
componentsOpenApiComponentsThe components that references can point to.
SerializeAsV2(IOpenApiWriter)
Serialize Open API element to v2.0.
public void SerializeAsV2(IOpenApiWriter writer)
Parameters
writerIOpenApiWriterThe writer.
SerializeAsV3(IOpenApiWriter)
Serialize Open API element to v3.0.
public void SerializeAsV3(IOpenApiWriter writer)
Parameters
writerIOpenApiWriterThe writer.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Write(IOpenApiWriter, OpenApiSpecVersion)
Write out contents of custom extension
public virtual void Write(IOpenApiWriter writer, OpenApiSpecVersion specVersion)
Parameters
writerIOpenApiWriterspecVersionOpenApiSpecVersionVersion of the OpenAPI specification that that will be output.
WriteBody(IOpenApiWriter, OpenApiSpecVersion)
Writes this endpoint description to an OpenAPI document.
protected virtual void WriteBody(IOpenApiWriter writer, OpenApiSpecVersion specVersion)
Parameters
writerIOpenApiWriterThe write to write to.
specVersionOpenApiSpecVersionThe OpenAPI Spec version to use.