Skip to main content

internal

Home > @backstage/backend-openapi-utils > internal

Interfaces

Interface

Description

CookieObject

DocRequestMatcher

Superset of the express router path matcher that enforces typed request and response bodies.

EndpointMapRequestMatcher

Superset of the express router path matcher that enforces typed request and response bodies.

HeaderObject

PathObject

QueryObject

TypedRouter

Type Aliases

Type Alias

Description

ComponentRef

ComponentTypes

ConvertAll

CookieSchema

DiscriminateUnion

DocEndpoint

DocEndpointMethod

DocEndpointTemplate

DocOperation

DocParameter

DocParameters

DocPath

All paths for a given doc,

DocPathMethod

DocPathTemplate

DocPathTemplateMethod

DocRequestHandler

Typed express request handler.

DocRequestHandlerParams

Typed express error handler / request handler union type.

EndpointMap

EndpointMapRequestHandler

Typed express request handler.

EndpointMapRequestHandlerParams

Typed express error handler / request handler union type.

Filter

FromNumberStringToNumber

Helper to convert from string to number, used to index arrays and pull out just the indices in the array.

FullMap

HeaderSchema

HttpMethods

Immutable

From https://github.com/microsoft/TypeScript/issues/13923#issuecomment-653675557, allows us to convert from as const to the various OpenAPI types documented in openapi3-ts.

ImmutableContentObject

ImmutableCookieObject

ImmutableHeaderObject

ImmutableObject

ImmutableOpenAPIObject

ImmutableParameterObject

ImmutablePathObject

ImmutableQueryObject

ImmutableReferenceObject

ImmutableRequestBodyObject

ImmutableResponseObject

ImmutableSchemaObject

LastOf

MapDiscriminatedUnion

MapToSchema

MethodAwareDocEndpoints

MethodAwareDocPath

ObjectWithContentSchema

OptionalMap

ParameterSchema

ParametersSchema

PathDoc

PathSchema

PathTemplate

Validate a string against OpenAPI path template, https://spec.openapis.org/oas/v3.1.0#path-templating-matching.

PickOptionalKeys

PickRequiredKeys

Push

QuerySchema

RequestBody

RequestBodySchema

RequestBodyToJsonSchema

Transform the OpenAPI request body schema to a typesafe JSON schema.

RequiredDoc

Basic OpenAPI spec with paths and components properties enforced.

RequiredMap

Response

ResponseBodyToJsonSchema

Transform the OpenAPI request body schema to a typesafe JSON schema.

ResponseSchemas

SchemaRef

StaticPathParamsSchema

StaticQueryParamsSchema

StaticRequestBodySchema

StaticResponseSchema

TemplateToDocEndpoint

TemplateToDocPath

Extract path as specified in OpenAPI Doc based on request path

ToTypeSafe

TuplifyUnion

UnionToIntersection

From https://stackoverflow.com/questions/71393738/typescript-intersection-not-union-type-from-json-schema

StackOverflow says not to do this, but union types aren't possible any other way.

UnknownIfNever

ValueOf

Get value types of T.