---
title: "Generate Angular HTTP client from OpenAPI spec"
method: POST
path: "/api/openapi/angular"
tags: ["OpenApi"]
---

# Generate Angular HTTP client from OpenAPI spec

`POST /api/openapi/angular`

## Request body

- OpenApiAngularRequest
  - `openApiSpec` string, nullable — Inline OpenAPI spec content (YAML or JSON). Either this or OpenApiSpecUrl is required.
  - `openApiSpecUrl` string, nullable — URL to fetch the OpenAPI spec from. Either this or OpenApiSpec is required.
  - `strictValidation` boolean, nullable
  - `documentation` boolean, nullable
  - `optionsObjectThreshold` integer, nullable
  - `typeMappings` object, nullable — Override the target language type for an OpenAPI primitive/format. Keys are mapping slugs (int64, decimal, date-time, date) — see TypeMappingRegistry for accepted slug→target combos.
  - `includeTags` string[], nullable — Only generate operations whose service tag matches one of these values (case-insensitive).
  - `errorHandling` ErrorHandlingOptions
    - `enabled` boolean, nullable
    - `returnNullForStatusCodes` integer[], nullable
    - `throwForStatusCodes` integer[], nullable
  - `timeout` TimeoutOptions
    - `seconds` number, double, nullable
    - `connect` number, double, nullable
    - `read` number, double, nullable
    - `write` number, double, nullable
  - `bearerAuth` BearerAuthOptions
    - `envVarName` string, nullable
    - `headerName` string, nullable
  - `basicAuth` BasicAuthOptions
    - `usernameEnvVar` string, nullable
    - `passwordEnvVar` string, nullable
  - `retries` RetryOptions
    - `maxAttempts` integer, nullable
    - `baseDelaySeconds` number, double, nullable
    - `maxDelaySeconds` number, double, nullable
    - `retryStatusCodes` integer[], nullable
  - `customHeaders` CustomHeaderOption[], nullable
    - `headerName` string, nullable
    - `envVarName` string, nullable
  - `baseUrlToken` string, nullable
  - `useInjectFunction` boolean, nullable
  - `providedIn` string, nullable
  - `serviceDecorator` 'AutoProvided' | 'ComponentScoped' — Selects Angular 22's `@Service` decorator (instead of `@Injectable`) and its provisioning scope. Leave the request property null to keep the default `@Injectable` behavior. Setting it auto-enables inject()-based DI and supersedes `ProvidedIn` on the engine's last-wins basis. Requires Angular 22+.
  - `useHttpResources` boolean, nullable
  - `httpResourceTrigger` boolean, nullable
  - `responseDateTransformation` boolean, nullable
  - `useInterceptors` boolean, nullable

## Response `200`

OK

- CodeGenerationResult
  - `executionTimeInMilliseconds` integer
  - `files` CodeFileResult[], nullable
    - `name` string, nullable
    - `path` string, nullable
    - `content` string, nullable
  - `warnings` string[], nullable
  - `additionalInfo` AdditionalInfo
    - `message` string, nullable, required
    - `level` string, nullable — Severity level: info, warning, or critical
    - `actionUrl` string, nullable — Optional URL for the client to act on (e.g., migration guide, changelog)

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.dev/metaengine/apis/metaengine-api.md) · [All operations](https://skmtc.dev/metaengine/apis/metaengine-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/metaengine/metaengine-api/revisions/7bba577610ce/schema)
