Skip to content

generateTypeScriptSdk

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/openapi/sdk-generator.ts

Generate the full sdk.ts source for a spec.

Signature

ts
function generateTypeScriptSdk(spec: {
  info?: { title?: string; version?: string };
  servers?: Array<{ url?: string }>;
  paths?: Record<string, Record<string, OpenApiOperation>>;
  components?: { schemas?: Record<string, JsonSchema> };
}): string

Parameters

NameType
spec`{
info?: { title?: string; version?: string };
servers?: Array<{ url?: string }>;
paths?: Record<string, Record<string, OpenApiOperation>>;
components?: { schemas?: Record<string, JsonSchema> };
}`

Returns: string

Was this page helpful?

Download as PDF