Skip to content

addCodeSamplesToSpec

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/openapi/code-samples.ts

Attach x-codeSamples to every operation in the spec (mutates + returns it). Requires the full spec so $ref request/response schemas resolve into example payloads.

Signature

ts
function addCodeSamplesToSpec(spec: any, targets: string[]): any

Parameters

NameType
specany
targetsstring[]

Returns: any

Was this page helpful?

Download as PDF