Blog

OpenAPI Generator: TypeScript axios clients, CORS preflight with custom headers, and request interceptors

Axios merges headers per request—ensure interceptors add `Authorization` only after the browser completes preflight.

1 min read
openapiopenapi-generatorcors

Multi-file specs

Bundled specs may flatten $ref chains—verify CORS documentation for each operationId.

Versioning strategies (`/v1` vs headers) can shift which origins are allowed in API gateways.

Retries

axios-retry on 429 must respect Retry-After without breaking credentialed CORS flows.

Exponential backoff should not amplify preflight storms during outages.

Back to blog