Skip to content

OpenApiSchemaResolver

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/parser-core/src/openapi/schema-resolver.ts

Methods

MethodSignatureReturns
fromTsConfigfromTsConfig(tsConfigFilePath: string)OpenApiSchemaResolver
getComponentsgetComponents()Record<string, Record<string, unknown>>
resolveMethodresolveMethod(method: MethodDeclaration, opts: { httpMethod?: string })ResolvedOperation
resolveQueryParametersresolveQueryParameters(method: MethodDeclaration)Array<Record<string, unknown>>

Where it refuses work

  • OpenApiSchemaResolver stops the work with an early return when !knownModels.
  • OpenApiSchemaResolver stops the work with an early return when !schema.
  • OpenApiSchemaResolver stops the work with an early return when typeof ref !== 'string'.
  • OpenApiSchemaResolver stops the work with an early return when !this.knownModels.size.
  • OpenApiSchemaResolver stops the work with an early return when !text.
  • OpenApiSchemaResolver stops the work with an early return when !/^[A-Za-z_$][\w$]*$/.test(inner).

Was this page helpful?

Download as PDF