Table of Contents

Class Endpoint

Namespace
TypedRest.CodeGeneration.Endpoints
Assembly
TypedRest.CodeGeneration.dll

Represents a TypedRest endpoint.

public class Endpoint : IEndpoint, IOpenApiSerializable, IOpenApiElement, IOpenApiExtension
Inheritance
object
Endpoint
Implements
Derived

Properties

Children

The child endpoints of this endpoint.

public IDictionary<string, IEndpoint> Children { get; }

Property Value

IDictionary<string, IEndpoint>

Description

A short description of the endpoint.

public string? Description { get; set; }

Property Value

string

Kind

The kind/type of endpoint.

public virtual string Kind { get; }

Property Value

string

Uri

The relative URI of the endpoint.

public string? Uri { get; set; }

Property Value

string

Methods

Parse(OpenApiObject, IEndpointParser)

Fills the endpoint with information parsed from an OpenAPI Object.

public virtual void Parse(OpenApiObject data, IEndpointParser parser)

Parameters

data OpenApiObject

The OpenAPI Object to parse.

parser IEndpointParser

The endpoint parser to use for parsing child objects.

ParseChildren(OpenApiObject, IEndpointParser)

protected void ParseChildren(OpenApiObject data, IEndpointParser parser)

Parameters

data OpenApiObject
parser IEndpointParser

ResolveReferences(OpenApiComponents)

Resolves OpenApiReferences.

public virtual void ResolveReferences(OpenApiComponents components)

Parameters

components OpenApiComponents

The components that references can point to.

SerializeAsV2(IOpenApiWriter)

Serialize Open API element to v2.0.

public void SerializeAsV2(IOpenApiWriter writer)

Parameters

writer IOpenApiWriter

The writer.

SerializeAsV3(IOpenApiWriter)

Serialize Open API element to v3.0.

public void SerializeAsV3(IOpenApiWriter writer)

Parameters

writer IOpenApiWriter

The 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

writer IOpenApiWriter
specVersion OpenApiSpecVersion

Version 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

writer IOpenApiWriter

The write to write to.

specVersion OpenApiSpecVersion

The OpenAPI Spec version to use.