Table of Contents

Class UploadEndpoint

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

Endpoint that accepts binary uploads.

public class UploadEndpoint : Endpoint, IEndpoint, IOpenApiSerializable, IOpenApiElement, IOpenApiExtension
Inheritance
object
UploadEndpoint
Implements
Inherited Members

Properties

FormField

The name of the form field to place the uploaded data into. Leave empty for upload of raw bodies.

public string? FormField { get; set; }

Property Value

string

Kind

The kind/type of endpoint.

public override string Kind { get; }

Property Value

string

Methods

Parse(OpenApiObject, IEndpointParser)

Fills the endpoint with information parsed from an OpenAPI Object.

public override 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.

WriteBody(IOpenApiWriter, OpenApiSpecVersion)

Writes this endpoint description to an OpenAPI document.

protected override void WriteBody(IOpenApiWriter writer, OpenApiSpecVersion specVersion)

Parameters

writer IOpenApiWriter

The write to write to.

specVersion OpenApiSpecVersion

The OpenAPI Spec version to use.