@orval/angular 8.15.0 → 8.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -287,7 +287,7 @@ declare const generateHttpClientImplementation: ({
287
287
  paramsSerializer,
288
288
  paramsFilter
289
289
  }: GeneratorVerbOptions, {
290
- route,
290
+ route: _route,
291
291
  context
292
292
  }: HttpClientGeneratorContext) => string;
293
293
  /**
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { DefaultTag, GetterPropType, OutputMode, buildAngularParamsFilterExpression, camel, conventionName, escapeRegExp, generateBodyOptions, generateDependencyImports, generateFormDataAndUrlEncodedFunction, generateMutatorConfig, generateMutatorImports, generateMutatorRequestOptions, generateOptions, generateVerbImports, getAngularFilteredParamsHelperBody, getDefaultContentType, getEnumImplementation, getFileInfo, getFullRoute, getIsBodyVerb, isBoolean, isObject, isSyntheticDefaultImportsAllow, jsDoc, kebab, pascal, sanitize, toObjectString, upath } from "@orval/core";
1
+ import { DefaultTag, GetterPropType, OutputMode, buildAngularParamsFilterExpression, camel, conventionName, escapeRegExp, generateBodyOptions, generateDependencyImports, generateFormDataAndUrlEncodedFunction, generateMutatorConfig, generateMutatorImports, generateMutatorRequestOptions, generateOptions, generateVerbImports, getAngularFilteredParamsHelperBody, getDefaultContentType, getEnumImplementation, getFileInfo, getFullRoute, getIsBodyVerb, isBoolean, isObject, isSyntheticDefaultImportsAllow, jsDoc, kebab, makeRouteSafe, pascal, sanitize, toObjectString, upath } from "@orval/core";
2
2
  //#region src/constants.ts
3
3
  const ANGULAR_HTTP_CLIENT_DEPENDENCIES = [
4
4
  {
@@ -438,7 +438,9 @@ const generateAngularFooter = ({ operationNames }) => {
438
438
  *
439
439
  * @returns The complete TypeScript method declaration and implementation for the operation.
440
440
  */
441
- const generateHttpClientImplementation = ({ headers, queryParams, operationName, response, mutator, body, props, verb, override, formData, formUrlEncoded, paramsSerializer, paramsFilter }, { route, context }) => {
441
+ const generateHttpClientImplementation = ({ headers, queryParams, operationName, response, mutator, body, props, verb, override, formData, formUrlEncoded, paramsSerializer, paramsFilter }, { route: _route, context }) => {
442
+ let route = _route;
443
+ if (context.output.urlEncodeParameters) route = makeRouteSafe(route);
442
444
  const isRequestOptions = override.requestOptions !== false;
443
445
  const isFormData = !override.formData.disabled;
444
446
  const isFormUrlEncoded = override.formUrlEncoded !== false;
@@ -1072,9 +1074,10 @@ const buildHttpResourceFunction = (verbOption, route, output) => {
1072
1074
  const jsonContentType = successTypes.find((type) => type.contentType.includes("json"))?.contentType;
1073
1075
  const resourceFactory = getHttpResourceFactory(response, jsonContentType ?? defaultSuccess.contentType, dataType);
1074
1076
  const signalRoute = applySignalRoute(route, params, props.some((prop) => prop.type === GetterPropType.NAMED_PATH_PARAMS));
1077
+ const encodedRoute = output.urlEncodeParameters ? makeRouteSafe(signalRoute) : signalRoute;
1075
1078
  const signalProps = buildSignalProps(props, params);
1076
1079
  const args = toObjectString(signalProps, "implementation");
1077
- const { bodyForm, request, isUrlOnly } = buildResourceRequest(verbOption, signalRoute);
1080
+ const { bodyForm, request, isUrlOnly } = buildResourceRequest(verbOption, encodedRoute);
1078
1081
  if (uniqueContentTypes.length > 1) {
1079
1082
  const defaultContentType = jsonContentType ?? defaultSuccess.contentType;
1080
1083
  const acceptTypeName = getAcceptHelperName(operationName);
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["getContentTypeReturnType"],"sources":["../src/constants.ts","../src/types.ts","../src/utils.ts","../src/http-client.ts","../src/http-resource.ts","../src/index.ts"],"sourcesContent":["import type { GeneratorDependency } from '@orval/core';\n\nexport const ANGULAR_HTTP_CLIENT_DEPENDENCIES = [\n {\n exports: [\n { name: 'HttpClient', values: true },\n { name: 'HttpHeaders', values: true },\n { name: 'HttpParams' },\n { name: 'HttpContext' },\n { name: 'HttpResponse', alias: 'AngularHttpResponse', values: true }, // alias to prevent naming conflict with msw\n { name: 'HttpEvent' },\n ],\n dependency: '@angular/common/http',\n },\n {\n exports: [\n { name: 'Injectable', values: true },\n { name: 'inject', values: true },\n ],\n dependency: '@angular/core',\n },\n {\n exports: [{ name: 'Observable', values: true }],\n dependency: 'rxjs',\n },\n] as const satisfies readonly GeneratorDependency[];\n\nexport const ANGULAR_HTTP_RESOURCE_DEPENDENCIES = [\n {\n exports: [\n { name: 'httpResource', values: true },\n { name: 'HttpResourceOptions' },\n { name: 'HttpResourceRef' },\n { name: 'HttpResourceRequest' },\n { name: 'HttpHeaders', values: true },\n { name: 'HttpParams' },\n { name: 'HttpContext' },\n ],\n dependency: '@angular/common/http',\n },\n {\n exports: [{ name: 'Signal' }, { name: 'ResourceStatus' }],\n dependency: '@angular/core',\n },\n] as const satisfies readonly GeneratorDependency[];\n","/**\n * Code template for the `HttpClientOptions` interface emitted into generated files.\n *\n * This is NOT an import of Angular's type — Angular's HttpClient methods accept\n * inline option objects, not a single unified interface. Orval generates this\n * convenience wrapper so users have a single referenceable type.\n *\n * Properties sourced from Angular HttpClient public API (angular/angular\n * packages/common/http/src/client.ts).\n */\nexport const HTTP_CLIENT_OPTIONS_TEMPLATE = `interface HttpClientOptions {\n readonly headers?: HttpHeaders | Record<string, string | string[]>;\n readonly context?: HttpContext;\n readonly params?:\n | HttpParams\n | Record<string, string | number | boolean | Array<string | number | boolean>>;\n readonly reportProgress?: boolean;\n readonly withCredentials?: boolean;\n readonly credentials?: RequestCredentials;\n readonly keepalive?: boolean;\n readonly priority?: RequestPriority;\n readonly cache?: RequestCache;\n readonly mode?: RequestMode;\n readonly redirect?: RequestRedirect;\n readonly referrer?: string;\n readonly integrity?: string;\n readonly referrerPolicy?: ReferrerPolicy;\n readonly transferCache?: {includeHeaders?: string[]} | boolean;\n readonly timeout?: number;\n}`;\n\n/**\n * Code templates for reusable observe option helpers emitted into generated files.\n */\nexport const HTTP_CLIENT_OBSERVE_OPTIONS_TEMPLATE = `type HttpClientBodyOptions = HttpClientOptions & {\n readonly observe?: 'body';\n};\n\ntype HttpClientEventOptions = HttpClientOptions & {\n readonly observe: 'events';\n};\n\ntype HttpClientResponseOptions = HttpClientOptions & {\n readonly observe: 'response';\n};\n\ntype HttpClientObserveOptions = HttpClientOptions & {\n readonly observe?: 'body' | 'events' | 'response';\n};`;\n\n/**\n * Code template for the `ThirdParameter` utility type used with custom mutators.\n */\nexport const THIRD_PARAMETER_TEMPLATE = `// eslint-disable-next-line\n type ThirdParameter<T extends (...args: never[]) => unknown> = T extends (\n config: unknown,\n httpClient: unknown,\n args: infer P,\n) => unknown\n ? P\n : never;`;\n","import {\n camel,\n DefaultTag,\n type GeneratorVerbOptions,\n getAngularFilteredParamsHelperBody,\n getDefaultContentType,\n isBoolean,\n isObject,\n type NormalizedOutputOptions,\n pascal,\n type ResReqTypesValue,\n sanitize,\n type Verbs,\n} from '@orval/core';\n\nimport {\n HTTP_CLIENT_OBSERVE_OPTIONS_TEMPLATE,\n HTTP_CLIENT_OPTIONS_TEMPLATE,\n THIRD_PARAMETER_TEMPLATE,\n} from './types';\n\nexport type ClientOverride = 'httpClient' | 'httpResource' | 'both';\n\nconst PRIMITIVE_TYPE_VALUES = [\n 'string',\n 'number',\n 'boolean',\n 'void',\n 'unknown',\n] as const;\n\nexport type PrimitiveType = (typeof PRIMITIVE_TYPE_VALUES)[number];\n\nexport const PRIMITIVE_TYPES = new Set(PRIMITIVE_TYPE_VALUES);\n\nconst PRIMITIVE_TYPE_LOOKUP = {\n string: true,\n number: true,\n boolean: true,\n void: true,\n unknown: true,\n} as const satisfies Record<PrimitiveType, true>;\n\n/**\n * Narrows a schema type string to the primitive set supported by the Angular\n * generators' query/header helpers.\n */\nexport const isPrimitiveType = (t: string | undefined): t is PrimitiveType =>\n t != undefined &&\n Object.prototype.hasOwnProperty.call(PRIMITIVE_TYPE_LOOKUP, t);\n\n/**\n * Indicates whether the configured schema output target is Zod-based.\n */\nexport const isZodSchemaOutput = (output: NormalizedOutputOptions): boolean =>\n isObject(output.schemas) && output.schemas.type === 'zod';\n\n/**\n * Removes `null` and `undefined` from a value in a type-safe way.\n */\nexport const isDefined = <T>(v: T | null | undefined): v is T => v != undefined;\n\n/**\n * Maps a schema type name to its Zod output-type reference (`${typeName}Output`).\n */\nexport const getSchemaOutputTypeRef = (typeName: string): string =>\n `${typeName}Output`;\n\n/**\n * Converts an operation/tag title into the generated Angular service class name.\n */\nexport const generateAngularTitle = (title: string) => {\n const sanTitle = sanitize(title);\n return `${pascal(sanTitle)}Service`;\n};\n\n/**\n * Builds the opening of an @Injectable Angular service class.\n * Shared between httpClient-only mode and the mutation section of httpResource mode.\n */\nexport const buildServiceClassOpen = ({\n title,\n isRequestOptions,\n isMutator,\n isGlobalMutator,\n provideIn,\n hasQueryParams,\n}: {\n title: string;\n isRequestOptions: boolean;\n isMutator: boolean;\n isGlobalMutator: boolean;\n provideIn: string | boolean | undefined;\n hasQueryParams: boolean;\n}): string => {\n const provideInValue = provideIn\n ? `{ providedIn: '${isBoolean(provideIn) ? 'root' : provideIn}' }`\n : '';\n\n return `\n${\n isRequestOptions && !isGlobalMutator\n ? `${HTTP_CLIENT_OPTIONS_TEMPLATE}\n\n${HTTP_CLIENT_OBSERVE_OPTIONS_TEMPLATE}\n\n${hasQueryParams ? getAngularFilteredParamsHelperBody() : ''}`\n : ''\n}\n\n${isRequestOptions && isMutator ? THIRD_PARAMETER_TEMPLATE : ''}\n\n@Injectable(${provideInValue})\nexport class ${title} {\n private readonly http = inject(HttpClient);\n`;\n};\n\n/**\n * Registry that maps operationName → full route (with baseUrl).\n *\n * Populated during client builder calls (which receive the full route via\n * GeneratorOptions.route) and read during header/footer builder calls\n * (which only receive verbOptions without routes).\n *\n * This avoids monkey-patching verbOptions with a non-standard `fullRoute` property.\n */\nexport const createRouteRegistry = () => {\n const routes = new Map<string, string>();\n\n return {\n reset() {\n routes.clear();\n },\n set(operationName: string, route: string) {\n routes.set(operationName, route);\n },\n get(operationName: string, fallback: string): string {\n return routes.get(operationName) ?? fallback;\n },\n };\n};\n/**\n * Returns only the operations that belong to the current tag output.\n *\n * In `tags` / `tags-split` mode the writer may route untagged operations into\n * the implicit `default` bucket. When a generated tag file targets that bucket\n * we also include operations whose original tag list was empty; a literal\n * user-defined `default` tag is treated like any other tag unless untagged\n * operations are present in the same output.\n */\nexport const getRelevantVerbOptionsForTag = (\n verbOptions: Record<string, GeneratorVerbOptions>,\n tag?: string,\n): GeneratorVerbOptions[] => {\n const allVerbOptions = Object.values(verbOptions);\n if (!tag) return allVerbOptions;\n\n const camelTag = camel(tag);\n const includeUntaggedOperations =\n tag === DefaultTag &&\n allVerbOptions.some((verbOption) => verbOption.tags.length === 0);\n\n return allVerbOptions.filter(\n (verbOption) =>\n verbOption.tags.some((currentTag) => camel(currentTag) === camelTag) ||\n (includeUntaggedOperations && verbOption.tags.length === 0),\n );\n};\n\nexport const createReturnTypesRegistry = () => {\n const returnTypesToWrite = new Map<string, string>();\n\n return {\n reset() {\n returnTypesToWrite.clear();\n },\n set(operationName: string, typeDefinition: string) {\n returnTypesToWrite.set(operationName, typeDefinition);\n },\n getFooter(operationNames: string[]) {\n const collected: string[] = [];\n for (const operationName of operationNames) {\n const value = returnTypesToWrite.get(operationName);\n if (value) {\n collected.push(value);\n }\n }\n return collected.join('\\n');\n },\n };\n};\n\n/**\n * Determines whether an operation should be generated as an `httpResource()`\n * (retrieval) or as an `HttpClient` method in a service class (mutation).\n *\n * Resolution order:\n * 1. **Per-operation override** — `override.operations.<operationId>.angular.client`\n * in the orval config. `httpResource` forces retrieval, `httpClient` forces mutation.\n * 2. **HTTP verb** — absent a per-operation override, `GET` is treated as a retrieval.\n * 3. **Name heuristic** — For `POST`, if the operationName starts with a\n * retrieval-like prefix (search, list, find, query, get, fetch, lookup)\n * it is treated as a retrieval. This handles common patterns like\n * `POST /search` or `POST /graphql` with query-style operation names.\n *\n * If the heuristic misclassifies an operation, users can override it\n * per-operation in their orval config:\n *\n * ```ts\n * override: {\n * operations: {\n * myPostSearch: { angular: { retrievalClient: 'httpResource' } },\n * getOrCreateUser: { angular: { retrievalClient: 'httpClient' } },\n * }\n * }\n * ```\n */\nexport function isRetrievalVerb(\n verb: Verbs,\n operationName?: string,\n clientOverride?: ClientOverride,\n): boolean {\n // Per-operation override takes precedence\n if (clientOverride === 'httpResource') return true;\n if (clientOverride === 'httpClient') return false;\n\n // Absent a per-operation override, GET is treated as a retrieval\n if (verb === 'get') return true;\n\n // POST with a retrieval-like operation name\n if (verb === 'post' && operationName) {\n const lower = operationName.toLowerCase();\n return /^(search|list|find|query|get|fetch|lookup|filter)/.test(lower);\n }\n return false;\n}\n\nexport function isMutationVerb(\n verb: Verbs,\n operationName?: string,\n clientOverride?: ClientOverride,\n): boolean {\n return !isRetrievalVerb(verb, operationName, clientOverride);\n}\n\n/**\n * Selects the preferred success payload type for Angular `httpResource`\n * generation, favouring JSON responses and otherwise falling back to the\n * generator's default content-type rules.\n */\nexport function getDefaultSuccessType(\n successTypes: ResReqTypesValue[],\n fallback: string,\n) {\n const uniqueContentTypes = [\n ...new Set(successTypes.map((t) => t.contentType).filter(Boolean)),\n ];\n const jsonContentType = uniqueContentTypes.find((contentType) =>\n contentType.includes('json'),\n );\n const defaultContentType =\n jsonContentType ??\n (uniqueContentTypes.length > 1\n ? getDefaultContentType(uniqueContentTypes)\n : (uniqueContentTypes[0] ?? 'application/json'));\n const defaultType = successTypes.find(\n (t) => t.contentType === defaultContentType,\n );\n\n return {\n contentType: defaultContentType,\n value: defaultType?.value ?? fallback,\n };\n}\n","import {\n buildAngularParamsFilterExpression,\n type ClientBuilder,\n type ClientDependenciesBuilder,\n type ClientFooterBuilder,\n type ClientHeaderBuilder,\n type ContextSpec,\n generateBodyOptions,\n generateFormDataAndUrlEncodedFunction,\n generateMutatorConfig,\n generateMutatorRequestOptions,\n generateOptions,\n generateVerbImports,\n type GeneratorVerbOptions,\n getAngularFilteredParamsHelperBody,\n getDefaultContentType,\n getEnumImplementation,\n getIsBodyVerb,\n type GetterProp,\n GetterPropType,\n isBoolean,\n pascal,\n toObjectString,\n} from '@orval/core';\n\nimport { ANGULAR_HTTP_CLIENT_DEPENDENCIES } from './constants';\nimport {\n HTTP_CLIENT_OBSERVE_OPTIONS_TEMPLATE,\n HTTP_CLIENT_OPTIONS_TEMPLATE,\n THIRD_PARAMETER_TEMPLATE,\n} from './types';\nimport {\n createReturnTypesRegistry,\n getRelevantVerbOptionsForTag,\n getSchemaOutputTypeRef,\n isPrimitiveType,\n isZodSchemaOutput,\n} from './utils';\n\n/**\n * Narrowed context for `generateHttpClientImplementation`.\n *\n * The implementation only reads `context.output`, so callers don't need\n * to supply a full `ContextSpec` (which also requires `target`, `workspace`,\n * `spec`, etc.).\n *\n * @remarks\n * This keeps the call sites lightweight when `http-resource.ts` delegates\n * mutation generation back to the shared `HttpClient` implementation builder.\n */\nexport interface HttpClientGeneratorContext {\n route: string;\n context: Pick<ContextSpec, 'output'>;\n}\n\n// NOTE: Module-level singleton — reset() is called at the start of each\n// header builder invocation (generateAngularHeader). Must stay in sync with\n// the generation lifecycle.\nconst returnTypesRegistry = createReturnTypesRegistry();\n\nconst hasSchemaImport = (\n imports: readonly { name: string }[],\n typeName: string | undefined,\n): boolean =>\n typeName != undefined && imports.some((imp) => imp.name === typeName);\n\nconst getSchemaValueRef = (typeName: string): string =>\n typeName === 'Error' ? 'ErrorSchema' : typeName;\n\n/**\n * Partition props into the three buckets used by per-content-type overload\n * rendering: required non-body params, body params, and optional non-body\n * params. The body always sits between the required and optional non-body\n * params so that the per-content-type overloads can insert a required\n * `accept` literal immediately after the body without violating TS1016\n * (required parameter cannot follow an optional one).\n */\nconst partitionPropsForMultiContent = (\n props: readonly GetterProp[],\n): {\n requiredNonBody: GetterProp[];\n body: GetterProp[];\n optionalNonBody: GetterProp[];\n} => {\n const requiredNonBody: GetterProp[] = [];\n const body: GetterProp[] = [];\n const optionalNonBody: GetterProp[] = [];\n for (const p of props) {\n if (p.type === GetterPropType.BODY) {\n body.push(p);\n } else if (p.required && !p.default) {\n requiredNonBody.push(p);\n } else {\n optionalNonBody.push(p);\n }\n }\n return { requiredNonBody, body, optionalNonBody };\n};\n\nconst getContentTypeReturnType = (\n contentType: string | undefined,\n value: string,\n): string => {\n if (!contentType) return value;\n if (contentType.includes('json') || contentType.includes('+json')) {\n return value;\n }\n if (contentType.startsWith('text/') || contentType.includes('xml')) {\n return 'string';\n }\n return 'Blob';\n};\n\n/**\n * Returns the dependency list required by the Angular `HttpClient` generator.\n *\n * These imports are consumed by Orval's generic dependency-import emitter when\n * composing the generated Angular client file.\n *\n * @returns The Angular `HttpClient` dependency descriptors used during import generation.\n */\nexport const getAngularDependencies: ClientDependenciesBuilder = () => [\n ...ANGULAR_HTTP_CLIENT_DEPENDENCIES,\n];\n\n/**\n * Builds the generated TypeScript helper name used for multi-content-type\n * `Accept` header unions.\n *\n * Example: `listPets` -> `ListPetsAccept`.\n *\n * @returns A PascalCase helper type/const name for the operation's `Accept` values.\n */\nexport const getAcceptHelperName = (operationName: string) =>\n `${pascal(operationName)}Accept`;\n\n/**\n * Collects the distinct successful response content types for a single\n * operation.\n *\n * The Angular generators use this to decide whether they need `Accept`\n * overloads or content-type-specific branching logic.\n *\n * @returns A de-duplicated list of response content types, excluding empty entries.\n */\nexport const getUniqueContentTypes = (\n successTypes: GeneratorVerbOptions['response']['types']['success'],\n) => [...new Set(successTypes.map((t) => t.contentType).filter(Boolean))];\n\nconst toAcceptHelperKey = (contentType: string): string =>\n contentType\n .replaceAll(/[^A-Za-z0-9]+/g, '_')\n .replaceAll(/^_+|_+$/g, '')\n .toLowerCase();\n\nconst buildAcceptHelper = (\n operationName: string,\n contentTypes: string[],\n output: ContextSpec['output'],\n): string => {\n const acceptHelperName = getAcceptHelperName(operationName);\n const unionValue = contentTypes\n .map((contentType) => `'${contentType}'`)\n .join(' | ');\n const names = contentTypes.map((contentType) =>\n toAcceptHelperKey(contentType),\n );\n const implementation = getEnumImplementation(\n unionValue,\n names,\n undefined,\n output.override.namingConvention.enum,\n );\n\n return `export type ${acceptHelperName} = typeof ${acceptHelperName}[keyof typeof ${acceptHelperName}];\n\nexport const ${acceptHelperName} = {\n${implementation}} as const;`;\n};\n\n/**\n * Builds the shared `Accept` helper declarations for all operations in the\n * current Angular generation scope.\n *\n * @remarks\n * Helpers are emitted only for operations with more than one successful\n * response content type.\n *\n * @returns Concatenated type/const declarations or an empty string when no helpers are needed.\n */\nexport const buildAcceptHelpers = (\n verbOptions: readonly GeneratorVerbOptions[],\n output: ContextSpec['output'],\n): string =>\n verbOptions\n .flatMap((verbOption) => {\n const contentTypes = getUniqueContentTypes(\n verbOption.response.types.success,\n );\n if (contentTypes.length <= 1) return [];\n\n return [\n buildAcceptHelper(verbOption.operationName, contentTypes, output),\n ];\n })\n .join('\\n\\n');\n\n/**\n * Generates the static header section for Angular `HttpClient` output.\n *\n * Depending on the current generation options this may include:\n * - reusable request option helper types\n * - filtered query-param helper utilities\n * - mutator support types\n * - `Accept` helper unions/constants for multi-content-type operations\n * - the `@Injectable()` service class shell\n *\n * @returns A string containing the prelude and service class opening for the generated file.\n */\nexport const generateAngularHeader: ClientHeaderBuilder = ({\n title,\n isRequestOptions,\n isMutator,\n isGlobalMutator,\n provideIn,\n verbOptions,\n tag,\n output,\n}) => {\n returnTypesRegistry.reset();\n\n const relevantVerbs = getRelevantVerbOptionsForTag(verbOptions, tag);\n // Only emit the shared `filterParams` helper when at least one operation in\n // this file will actually call it. If every operation with queryParams has\n // its own `paramsFilter` mutator, the helper would be dead code.\n const hasBuiltInFilteredQueryParams = relevantVerbs.some(\n (v) => v.queryParams && !v.paramsFilter,\n );\n const acceptHelpers = buildAcceptHelpers(relevantVerbs, output);\n\n return `\n${\n isRequestOptions && !isGlobalMutator\n ? `${HTTP_CLIENT_OPTIONS_TEMPLATE}\n\n${HTTP_CLIENT_OBSERVE_OPTIONS_TEMPLATE}\n\n${hasBuiltInFilteredQueryParams ? getAngularFilteredParamsHelperBody() : ''}`\n : ''\n}\n\n${isRequestOptions && isMutator ? THIRD_PARAMETER_TEMPLATE : ''}\n\n${acceptHelpers}\n\n@Injectable(${provideIn ? `{ providedIn: '${isBoolean(provideIn) ? 'root' : provideIn}' }` : ''})\nexport class ${title} {\n private readonly http = inject(HttpClient);\n`;\n};\n\n/**\n * Generates the closing section for Angular `HttpClient` output.\n *\n * @remarks\n * Besides closing the generated service class, this appends any collected\n * `ClientResult` aliases registered while individual operations were emitted.\n *\n * @returns The footer text for the generated Angular client file.\n */\nexport const generateAngularFooter: ClientFooterBuilder = ({\n operationNames,\n}) => {\n let footer = '};\\n\\n';\n\n const returnTypes = returnTypesRegistry.getFooter(operationNames);\n if (returnTypes) {\n footer += `${returnTypes}\\n`;\n }\n\n return footer;\n};\n\n/**\n * Generates the Angular `HttpClient` method implementation for a single\n * OpenAPI operation.\n *\n * This function is responsible for:\n * - method signatures and overloads\n * - observe-mode branching\n * - multi-content-type `Accept` handling\n * - mutator integration\n * - runtime Zod validation hooks for Angular output\n * - registering the operation's `ClientResult` alias for footer emission\n *\n * @remarks\n * This is the central implementation builder shared by the dedicated\n * `httpClient` mode and the mutation side of Angular `both` / `httpResource`\n * generation.\n *\n * @returns The complete TypeScript method declaration and implementation for the operation.\n */\nexport const generateHttpClientImplementation = (\n {\n headers,\n queryParams,\n operationName,\n response,\n mutator,\n body,\n props,\n verb,\n override,\n formData,\n formUrlEncoded,\n paramsSerializer,\n paramsFilter,\n }: GeneratorVerbOptions,\n { route, context }: HttpClientGeneratorContext,\n) => {\n const isRequestOptions = override.requestOptions !== false;\n const isFormData = !override.formData.disabled;\n const isFormUrlEncoded = override.formUrlEncoded !== false;\n const isExactOptionalPropertyTypes =\n !!context.output.tsconfig?.compilerOptions?.exactOptionalPropertyTypes;\n const bodyForm = generateFormDataAndUrlEncodedFunction({\n formData,\n formUrlEncoded,\n body,\n isFormData,\n isFormUrlEncoded,\n });\n\n const dataType = response.definition.success || 'unknown';\n const isPrimitive = isPrimitiveType(dataType);\n const hasSchema = hasSchemaImport(response.imports, dataType);\n const isZodOutput = isZodSchemaOutput(context.output);\n const shouldValidateResponse =\n override.angular.runtimeValidation &&\n isZodOutput &&\n !isPrimitive &&\n hasSchema;\n const parsedDataType = shouldValidateResponse\n ? getSchemaOutputTypeRef(dataType)\n : dataType;\n const getGeneratedResponseType = (\n value: string,\n contentType: string | undefined,\n ): string => {\n if (\n override.angular.runtimeValidation &&\n isZodOutput &&\n !!contentType &&\n (contentType.includes('json') || contentType.includes('+json')) &&\n !isPrimitiveType(value) &&\n hasSchemaImport(response.imports, value)\n ) {\n return getSchemaOutputTypeRef(value);\n }\n\n return getContentTypeReturnType(contentType, value);\n };\n const resultAliasType = mutator\n ? dataType\n : response.types.success.length <= 1\n ? parsedDataType\n : [\n ...new Set(\n response.types.success.map(({ value, contentType }) =>\n getGeneratedResponseType(value, contentType),\n ),\n ),\n ].join(' | ') || parsedDataType;\n const schemaValueRef = shouldValidateResponse\n ? getSchemaValueRef(dataType)\n : dataType;\n // When Zod runtime validation is enabled the emitted method signature exposes\n // `parsedDataType` (e.g. `PetsOutput`) directly instead of a caller-overridable\n // `TData` generic. Casting `Schema.parse(data)` to `TData` is unsound because\n // `TData` can be widened/narrowed by callers while the runtime value is always\n // `PetsOutput`. We therefore drop the cast on the validation path and let the\n // inferred return type flow naturally.\n const validationPipe = shouldValidateResponse\n ? `.pipe(map(data => ${schemaValueRef}.parse(data)))`\n : '';\n const responseValidationPipe = shouldValidateResponse\n ? `.pipe(map(response => response.clone({ body: ${schemaValueRef}.parse(response.body) })))`\n : '';\n const eventValidationPipe = shouldValidateResponse\n ? `.pipe(map(event => event instanceof AngularHttpResponse ? event.clone({ body: ${schemaValueRef}.parse(event.body) }) : event))`\n : '';\n\n returnTypesRegistry.set(\n operationName,\n `export type ${pascal(\n operationName,\n )}ClientResult = NonNullable<${resultAliasType}>`,\n );\n\n if (mutator) {\n const mutatorConfig = generateMutatorConfig({\n route,\n body,\n headers,\n queryParams,\n response,\n verb,\n isFormData,\n isFormUrlEncoded,\n hasSignal: false,\n isExactOptionalPropertyTypes,\n isAngular: true,\n paramsFilter,\n });\n\n const requestOptions = isRequestOptions\n ? generateMutatorRequestOptions(\n override.requestOptions,\n mutator.hasThirdArg,\n )\n : '';\n\n const propsImplementation =\n mutator.bodyTypeName && body.definition\n ? toObjectString(props, 'implementation').replace(\n new RegExp(String.raw`(\\\\w*):\\\\s?${body.definition}`),\n `$1: ${mutator.bodyTypeName}<${body.definition}>`,\n )\n : toObjectString(props, 'implementation');\n\n return ` ${operationName}<TData = ${dataType}>(\\n ${propsImplementation}\\n ${\n isRequestOptions && mutator.hasThirdArg\n ? `options?: ThirdParameter<typeof ${mutator.name}>`\n : ''\n }) {${bodyForm}\n return ${mutator.name}<TData>(\n ${mutatorConfig},\n this.http,\n ${requestOptions});\n }\n `;\n }\n\n const optionsBase = {\n route,\n body,\n headers,\n queryParams,\n response,\n verb,\n requestOptions: override.requestOptions,\n isFormData,\n isFormUrlEncoded,\n paramsSerializer,\n paramsSerializerOptions: override.paramsSerializerOptions,\n paramsFilter,\n isAngular: true,\n isExactOptionalPropertyTypes,\n hasSignal: false,\n } as const;\n\n const propsDefinition = toObjectString(props, 'definition');\n\n const successTypes = response.types.success;\n const uniqueContentTypes = getUniqueContentTypes(successTypes);\n const hasMultipleContentTypes = uniqueContentTypes.length > 1;\n const acceptTypeName = hasMultipleContentTypes\n ? getAcceptHelperName(operationName)\n : undefined;\n\n const needsObserveBranching = isRequestOptions && !hasMultipleContentTypes;\n const angularParamsRef = queryParams ? 'filteredParams' : undefined;\n\n let paramsDeclaration = '';\n if (angularParamsRef && queryParams) {\n const filterExpr = buildAngularParamsFilterExpression({\n paramsExpression: isRequestOptions\n ? '{...params, ...options?.params}'\n : 'params ?? {}',\n requiredNullableParamKeys: queryParams.requiredNullableKeys ?? [],\n preserveRequiredNullables: !!paramsSerializer,\n // Only pass non-primitive params through the built-in `filterParams`\n // when a `paramsSerializer` can legally consume the raw object/array.\n // Without one, Angular's `HttpParams` would stringify it to\n // `[object Object]` and the helper's `unknown` return type is not\n // assignable to `HttpClient`'s params — so keep them filtered out.\n // The `paramsFilter` branch bypasses the built-in helper entirely.\n nonPrimitiveKeys: paramsSerializer\n ? (queryParams.nonPrimitiveKeys ?? [])\n : [],\n paramsFilter,\n // Request-options path uses the shared `filterParams` helper emitted in\n // the file header; the non-request-options path inlines an IIFE.\n useSharedHelper: isRequestOptions,\n });\n paramsDeclaration = paramsSerializer\n ? `const ${angularParamsRef} = ${paramsSerializer.name}(${filterExpr});\\n\\n `\n : `const ${angularParamsRef} = ${filterExpr};\\n\\n `;\n }\n\n const optionsInput = {\n ...optionsBase,\n ...(angularParamsRef ? { angularParamsRef } : {}),\n } as const;\n\n const options = generateOptions(optionsInput);\n\n const defaultContentType = hasMultipleContentTypes\n ? (successTypes.find(\n ({ contentType }) =>\n !!contentType &&\n (contentType.includes('json') || contentType.includes('+json')),\n )?.contentType ?? getDefaultContentType(uniqueContentTypes))\n : (uniqueContentTypes[0] ?? 'application/json');\n\n const jsonSuccessValues = [\n ...new Set(\n successTypes\n .filter(\n ({ contentType }) =>\n !!contentType &&\n (contentType.includes('json') || contentType.includes('+json')),\n )\n .map(({ value }) => value),\n ),\n ];\n\n const jsonReturnType =\n jsonSuccessValues.length > 0 ? jsonSuccessValues.join(' | ') : 'unknown';\n const parsedJsonReturnType =\n jsonSuccessValues.length === 1 &&\n override.angular.runtimeValidation &&\n isZodOutput &&\n !isPrimitiveType(jsonSuccessValues[0]) &&\n hasSchemaImport(response.imports, jsonSuccessValues[0])\n ? getSchemaOutputTypeRef(jsonSuccessValues[0])\n : jsonReturnType;\n\n let jsonValidationPipe = shouldValidateResponse\n ? `.pipe(map(data => ${schemaValueRef}.parse(data)))`\n : '';\n if (\n hasMultipleContentTypes &&\n !shouldValidateResponse &&\n override.angular.runtimeValidation &&\n isZodOutput &&\n jsonSuccessValues.length === 1\n ) {\n const jsonType = jsonSuccessValues[0];\n const jsonIsPrimitive = isPrimitiveType(jsonType);\n const jsonHasSchema = hasSchemaImport(response.imports, jsonType);\n if (!jsonIsPrimitive && jsonHasSchema) {\n const jsonSchemaRef = getSchemaValueRef(jsonType);\n jsonValidationPipe = `.pipe(map(data => ${jsonSchemaRef}.parse(data)))`;\n }\n }\n\n const textSuccessTypes = successTypes.filter(\n ({ contentType, value }) =>\n !!contentType &&\n (contentType.startsWith('text/') ||\n contentType.includes('xml') ||\n value === 'string'),\n );\n const blobSuccessTypes = successTypes.filter(\n ({ contentType }) =>\n !!contentType &&\n !contentType.includes('json') &&\n !contentType.includes('+json') &&\n !contentType.startsWith('text/') &&\n !contentType.includes('xml'),\n );\n const multiReturnMembers = [\n parsedJsonReturnType,\n ...(textSuccessTypes.length > 0 ? ['string'] : []),\n ...(blobSuccessTypes.length > 0 ? ['Blob'] : []),\n ];\n const uniqueMultiReturnMembers = [...new Set(multiReturnMembers)];\n const refinedMultiImplementationReturnType = `Observable<${uniqueMultiReturnMembers.join(' | ')}>`;\n\n const observeOptions = needsObserveBranching\n ? {\n body: generateOptions({ ...optionsInput, angularObserve: 'body' }),\n events: generateOptions({ ...optionsInput, angularObserve: 'events' }),\n response: generateOptions({\n ...optionsInput,\n angularObserve: 'response',\n }),\n }\n : undefined;\n\n const isModelType =\n dataType !== 'Blob' && dataType !== 'string' && dataType !== 'ArrayBuffer';\n // When the response goes through a Zod runtime validation pipe the runtime\n // value is fixed to `parsedDataType` (e.g. `PetsOutput`), so we avoid\n // exposing a caller-overridable `<TData>` generic on that path.\n const hasTDataGeneric =\n isModelType && !hasMultipleContentTypes && !shouldValidateResponse;\n let functionName = operationName;\n if (hasTDataGeneric) {\n functionName += `<TData = ${parsedDataType}>`;\n }\n\n let contentTypeOverloads = '';\n if (hasMultipleContentTypes && isRequestOptions) {\n const {\n requiredNonBody: requiredNonBodyProps,\n body: bodyProps,\n optionalNonBody: optionalNonBodyProps,\n } = partitionPropsForMultiContent(props);\n const requiredNonBodyPart = requiredNonBodyProps\n .map((p) => p.definition)\n .join(',\\n ');\n const bodyPart = bodyProps.map((p) => p.definition).join(',\\n ');\n // Per-content-type overloads have a required `accept` literal after the body.\n // TS1016 forbids required params after optional ones, so optional body params\n // are rendered as positionally required (`name: Type | undefined`) here.\n // The `?` is removed via an identifier-anchored replacement so we only\n // affect the parameter's own optional marker, never a `?:` that may appear\n // elsewhere in the type (e.g. mapped or conditional types).\n const bodyOverloadPart = bodyProps\n .map((p) => {\n const optionalMarker = `${p.name}?:`;\n if (!p.required && p.definition.startsWith(optionalMarker)) {\n const required = `${p.name}:${p.definition.slice(optionalMarker.length)}`;\n return /\\bundefined\\b/.test(required)\n ? required\n : `${required} | undefined`;\n }\n return p.definition;\n })\n .join(',\\n ');\n const optionalNonBodyPart = optionalNonBodyProps\n .map((p) => p.definition)\n .join(',\\n ');\n const branchOverloads = successTypes\n .filter(({ contentType }) => !!contentType)\n .map(({ contentType, value }) => {\n const returnType = getGeneratedResponseType(value, contentType);\n const overloadParams = [\n requiredNonBodyPart,\n bodyOverloadPart,\n `accept: '${contentType}'`,\n optionalNonBodyPart,\n ]\n .filter(Boolean)\n .join(',\\n ');\n\n return `${operationName}(${overloadParams}, options?: HttpClientOptions): Observable<${returnType}>;`;\n })\n .join('\\n ');\n const allParams = [\n requiredNonBodyPart,\n bodyPart,\n `accept?: ${acceptTypeName ?? 'string'}`,\n optionalNonBodyPart,\n ]\n .filter(Boolean)\n .join(',\\n ');\n contentTypeOverloads = `${branchOverloads}\\n ${operationName}(${allParams}, options?: HttpClientOptions): ${refinedMultiImplementationReturnType};`;\n }\n\n const observeOverloads =\n isRequestOptions && !hasMultipleContentTypes\n ? `${functionName}(${propsDefinition} options?: HttpClientBodyOptions): Observable<${hasTDataGeneric ? 'TData' : parsedDataType}>;\\n ${functionName}(${propsDefinition} options?: HttpClientEventOptions): Observable<HttpEvent<${hasTDataGeneric ? 'TData' : parsedDataType}>>;\\n ${functionName}(${propsDefinition} options?: HttpClientResponseOptions): Observable<AngularHttpResponse<${hasTDataGeneric ? 'TData' : parsedDataType}>>;`\n : '';\n\n const overloads = contentTypeOverloads || observeOverloads;\n\n const observableDataType = hasTDataGeneric ? 'TData' : parsedDataType;\n const singleImplementationReturnType = isRequestOptions\n ? `Observable<${observableDataType} | HttpEvent<${observableDataType}> | AngularHttpResponse<${observableDataType}>>`\n : `Observable<${observableDataType}>`;\n\n if (hasMultipleContentTypes) {\n const bodyIdentifier = generateBodyOptions(\n body,\n isFormData,\n isFormUrlEncoded,\n );\n const deleteBodyOption =\n verb === 'delete' && bodyIdentifier ? `body: ${bodyIdentifier}` : '';\n const buildOptionsObject = (responseType: string) => `{\n ...options,\n responseType: '${responseType}',\n headers,\n ${angularParamsRef ? `params: ${angularParamsRef},` : ''}\n ${deleteBodyOption ? `${deleteBodyOption},` : ''}\n }`;\n const buildHttpClientCall = (typeArg: string, optionsObject: string) =>\n getIsBodyVerb(verb) && verb !== 'delete'\n ? `this.http.${verb}${typeArg}(\\`${route}\\`, ${bodyIdentifier ?? 'undefined'}, ${optionsObject})`\n : `this.http.${verb}${typeArg}(\\`${route}\\`, ${optionsObject})`;\n\n const {\n requiredNonBody: requiredNonBodyImplProps,\n body: bodyImplProps,\n optionalNonBody: optionalNonBodyImplProps,\n } = partitionPropsForMultiContent(props);\n const requiredNonBodyImplPart = requiredNonBodyImplProps\n .map((p) => p.implementation)\n .join(',\\n ');\n const bodyImplPart = bodyImplProps\n .map((p) => p.implementation)\n .join(',\\n ');\n const optionalNonBodyImplPart = optionalNonBodyImplProps\n .map((p) => p.implementation)\n .join(',\\n ');\n const allParams = [\n requiredNonBodyImplPart,\n bodyImplPart,\n `accept: ${acceptTypeName ?? 'string'} = '${defaultContentType}'`,\n optionalNonBodyImplPart,\n ]\n .filter(Boolean)\n .join(',\\n ');\n\n return ` ${overloads}\n ${operationName}(\n ${allParams},\n ${isRequestOptions ? 'options?: HttpClientOptions' : ''}\n ): ${refinedMultiImplementationReturnType} {${bodyForm}\n ${paramsDeclaration}const headers = options?.headers instanceof HttpHeaders\n ? options.headers.set('Accept', accept)\n : { ...(options?.headers ?? {}), Accept: accept };\n\n if (accept.includes('json') || accept.includes('+json')) {\n return ${buildHttpClientCall(`<${parsedJsonReturnType}>`, buildOptionsObject('json'))}${jsonValidationPipe};\n } else if (accept.startsWith('text/') || accept.includes('xml')) {\n return ${buildHttpClientCall('', buildOptionsObject('text'))} as Observable<any>;\n }${\n blobSuccessTypes.length > 0\n ? ` else {\n return ${buildHttpClientCall('', buildOptionsObject('blob'))} as Observable<Blob>;\n }`\n : `\n\n return ${buildHttpClientCall(`<${parsedJsonReturnType}>`, buildOptionsObject('json'))}${jsonValidationPipe};`\n }\n }\n`;\n }\n\n // Angular's HttpClient overloads conflict when both a type generic and an\n // injected `responseType` (e.g. `'blob'` / `'text'`) are present — omit the\n // generic and cast instead. JSON primitives still need `<string>` (etc.) because\n // they use the default JSON overload without a custom `responseType`.\n const hasInjectedResponseType = (optionsArgument: string) =>\n typeof optionsArgument === 'string' &&\n /\\bresponseType:\\s*['\"]/.test(optionsArgument);\n const httpCallExpr = (\n optionsArgument: string,\n observeKind: 'body' | 'events' | 'response',\n ) => {\n if (hasInjectedResponseType(optionsArgument)) {\n const castType =\n observeKind === 'events'\n ? `HttpEvent<${observableDataType}>`\n : observeKind === 'response'\n ? `AngularHttpResponse<${observableDataType}>`\n : observableDataType;\n return `this.http.${verb}(${optionsArgument}) as Observable<${castType}>`;\n }\n\n return `this.http.${verb}<${observableDataType}>(${optionsArgument})`;\n };\n const observeImplementation = isRequestOptions\n ? `${paramsDeclaration}if (options?.observe === 'events') {\n return ${httpCallExpr(observeOptions?.events ?? options, 'events')}${eventValidationPipe};\n }\n\n if (options?.observe === 'response') {\n return ${httpCallExpr(observeOptions?.response ?? options, 'response')}${responseValidationPipe};\n }\n\n return ${httpCallExpr(observeOptions?.body ?? options, 'body')}${validationPipe};`\n : `return ${httpCallExpr(options, 'body')}${validationPipe};`;\n\n return ` ${overloads}\n ${functionName}(\n ${toObjectString(props, 'implementation')} ${\n isRequestOptions ? `options?: HttpClientObserveOptions` : ''\n }): ${singleImplementationReturnType} {${bodyForm}\n ${observeImplementation}\n }\n`;\n};\n\n/**\n * Orval client builder entry point for Angular `HttpClient` output.\n *\n * It normalizes imports needed for runtime validation, delegates the actual\n * method implementation to `generateHttpClientImplementation`, and returns the\n * generated code plus imports for the current operation.\n *\n * @returns The generated implementation fragment and imports for one operation.\n */\nexport const generateAngular: ClientBuilder = (verbOptions, options) => {\n const isZodOutput = isZodSchemaOutput(options.context.output);\n const responseType = verbOptions.response.definition.success;\n const isPrimitiveResponse = isPrimitiveType(responseType);\n const shouldUseRuntimeValidation =\n verbOptions.override.angular.runtimeValidation && isZodOutput;\n\n const normalizedVerbOptions = (() => {\n if (!shouldUseRuntimeValidation) return verbOptions;\n\n let result: GeneratorVerbOptions = {\n ...verbOptions,\n response: {\n ...verbOptions.response,\n imports: verbOptions.response.imports.map((imp) => ({\n ...imp,\n values: true,\n })),\n },\n };\n\n if (\n !isPrimitiveResponse &&\n hasSchemaImport(result.response.imports, responseType)\n ) {\n result = {\n ...result,\n response: {\n ...result.response,\n imports: [\n ...result.response.imports.map((imp) =>\n imp.name === responseType ? { ...imp, values: true } : imp,\n ),\n { name: getSchemaOutputTypeRef(responseType) },\n ],\n },\n };\n }\n\n const successTypes = result.response.types.success;\n const uniqueContentTypes = [\n ...new Set(successTypes.map((t) => t.contentType).filter(Boolean)),\n ];\n if (uniqueContentTypes.length > 1) {\n const jsonSchemaNames = [\n ...new Set(\n successTypes\n .filter(\n ({ contentType }) =>\n !!contentType &&\n (contentType.includes('json') || contentType.includes('+json')),\n )\n .map(({ value }) => value),\n ),\n ];\n if (jsonSchemaNames.length === 1) {\n const jsonType = jsonSchemaNames[0];\n const jsonIsPrimitive = isPrimitiveType(jsonType);\n if (\n !jsonIsPrimitive &&\n hasSchemaImport(result.response.imports, jsonType)\n ) {\n result = {\n ...result,\n response: {\n ...result.response,\n imports: [\n ...result.response.imports.map((imp) =>\n imp.name === jsonType ? { ...imp, values: true } : imp,\n ),\n { name: getSchemaOutputTypeRef(jsonType) },\n ],\n },\n };\n }\n }\n }\n\n return result;\n })();\n\n const implementation = generateHttpClientImplementation(\n normalizedVerbOptions,\n options,\n );\n\n const imports = [\n ...generateVerbImports(normalizedVerbOptions),\n ...(implementation.includes('.pipe(map(')\n ? [{ name: 'map', values: true, importPath: 'rxjs' }]\n : []),\n ];\n\n return { implementation, imports };\n};\n\n/**\n * Returns the footer aliases collected for the provided operation names.\n *\n * The Angular generators use these aliases to expose stable `ClientResult`\n * helper types such as `ListPetsClientResult`.\n *\n * @returns Concatenated `ClientResult` aliases for the requested operation names.\n */\nexport const getHttpClientReturnTypes = (operationNames: string[]) =>\n returnTypesRegistry.getFooter(operationNames);\n\n/**\n * Clears the module-level return type registry used during Angular client\n * generation.\n *\n * This must be called at the start of each generation pass to avoid leaking\n * aliases across files or tags.\n *\n * @returns Nothing.\n */\nexport const resetHttpClientReturnTypes = () => {\n returnTypesRegistry.reset();\n};\n\nexport { generateAngularTitle } from './utils';\n","import {\n buildAngularParamsFilterExpression,\n type ClientBuilder,\n type ClientDependenciesBuilder,\n type ClientExtraFilesBuilder,\n type ClientFooterBuilder,\n type ClientHeaderBuilder,\n type ContextSpec,\n conventionName,\n escapeRegExp,\n generateDependencyImports,\n generateFormDataAndUrlEncodedFunction,\n generateMutatorImports,\n type GeneratorDependency,\n type GeneratorImport,\n type GeneratorVerbOptions,\n getAngularFilteredParamsHelperBody,\n getFileInfo,\n getFullRoute,\n GetterPropType,\n isObject,\n isSyntheticDefaultImportsAllow,\n jsDoc,\n kebab,\n type NormalizedOutputOptions,\n type OpenApiInfoObject,\n OutputMode,\n pascal,\n type ResReqTypesValue,\n toObjectString,\n upath,\n} from '@orval/core';\n\nimport {\n ANGULAR_HTTP_CLIENT_DEPENDENCIES,\n ANGULAR_HTTP_RESOURCE_DEPENDENCIES,\n} from './constants';\nimport {\n buildAcceptHelpers,\n generateHttpClientImplementation,\n getAcceptHelperName,\n getHttpClientReturnTypes,\n getUniqueContentTypes,\n type HttpClientGeneratorContext,\n resetHttpClientReturnTypes,\n} from './http-client';\nimport {\n buildServiceClassOpen,\n type ClientOverride,\n createReturnTypesRegistry,\n createRouteRegistry,\n getDefaultSuccessType,\n getRelevantVerbOptionsForTag,\n getSchemaOutputTypeRef,\n isMutationVerb,\n isPrimitiveType,\n isRetrievalVerb,\n isZodSchemaOutput,\n} from './utils';\n\n/**\n * Reads the per-operation angular client override from the orval config.\n *\n * Mirrors the pattern used by `@orval/query` for `operationQueryOptions`:\n * ```ts\n * override: {\n * operations: {\n * myPostSearch: { angular: { retrievalClient: 'httpResource' } },\n * }\n * }\n * ```\n */\ninterface AngularOperationOverride {\n readonly client?: ClientOverride;\n readonly httpResource?: AngularHttpResourceOptionsConfig;\n}\n\ninterface AngularHttpResourceOptionsConfig {\n defaultValue?: unknown;\n debugName?: string;\n injector?: string;\n equal?: string;\n}\n\nconst isAngularHttpResourceOptions = (\n value: unknown,\n): value is AngularHttpResourceOptionsConfig =>\n value === undefined ||\n (isObject(value) &&\n (value.defaultValue === undefined ||\n typeof value.defaultValue === 'string' ||\n typeof value.defaultValue === 'number' ||\n typeof value.defaultValue === 'boolean' ||\n value.defaultValue === null ||\n Array.isArray(value.defaultValue) ||\n isObject(value.defaultValue)) &&\n (value.debugName === undefined || typeof value.debugName === 'string') &&\n (value.injector === undefined || typeof value.injector === 'string') &&\n (value.equal === undefined || typeof value.equal === 'string'));\n\nconst isAngularOperationOverride = (\n value: unknown,\n): value is AngularOperationOverride =>\n value !== undefined &&\n typeof value === 'object' &&\n value !== null &&\n (!('client' in value) ||\n value.client === 'httpClient' ||\n value.client === 'httpResource' ||\n value.client === 'both') &&\n (!('httpResource' in value) ||\n isAngularHttpResourceOptions(value.httpResource));\n\nconst getClientOverride = (\n verbOption: GeneratorVerbOptions,\n): ClientOverride | undefined => {\n const angular =\n verbOption.override.operations[verbOption.operationId]?.angular;\n\n return isAngularOperationOverride(angular) ? angular.client : undefined;\n};\n\n/**\n * Resolves the effective `httpResource` option override for an operation.\n *\n * Operation-level configuration takes precedence over the global\n * `override.angular.httpResource` block while still inheriting unspecified\n * values from the global configuration.\n *\n * @returns The merged resource options for the operation, or `undefined` when no override exists.\n */\nconst getHttpResourceOverride = (\n verbOption: GeneratorVerbOptions,\n output: NormalizedOutputOptions,\n): AngularHttpResourceOptionsConfig | undefined => {\n const operationAngular =\n verbOption.override.operations[verbOption.operationId]?.angular;\n const operationOverride = isAngularOperationOverride(operationAngular)\n ? operationAngular.httpResource\n : undefined;\n const angularOverride = output.override.angular as unknown;\n const globalOverride =\n isObject(angularOverride) &&\n 'httpResource' in angularOverride &&\n isAngularHttpResourceOptions(angularOverride.httpResource)\n ? angularOverride.httpResource\n : undefined;\n\n if (globalOverride === undefined) return operationOverride;\n if (operationOverride === undefined) return globalOverride;\n\n return {\n ...globalOverride,\n ...operationOverride,\n };\n};\n\n// NOTE: Module-level singletons — reset() is called by the header builder\n// (generateAngularHttpResourceHeader) at the start of each generation pass.\nconst resourceReturnTypesRegistry = createReturnTypesRegistry();\n\n/** @internal Exported for testing only */\nexport const routeRegistry = createRouteRegistry();\n\nconst getVerbOptionsRecord = (\n verbOptions: readonly GeneratorVerbOptions[],\n): Record<string, GeneratorVerbOptions> =>\n Object.fromEntries(\n verbOptions.map((verbOption) => [verbOption.operationId, verbOption]),\n );\n\nconst getPrimaryTag = (verbOption: GeneratorVerbOptions): string =>\n kebab(verbOption.tags[0] ?? 'default');\n\nconst hasRetrievalOperations = (\n verbOptions: Record<string, GeneratorVerbOptions>,\n): boolean =>\n Object.values(verbOptions).some((verbOption) =>\n isRetrievalVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n );\n\nconst getHeader = (\n option: false | ((info: OpenApiInfoObject) => string | string[]),\n info: OpenApiInfoObject | undefined,\n): string => {\n if (!option || !info) {\n return '';\n }\n\n const header = option(info);\n\n return Array.isArray(header) ? jsDoc({ description: header }) : header;\n};\n\nconst mergeDependencies = (\n deps: GeneratorDependency[],\n): GeneratorDependency[] => {\n const merged = new Map<\n string,\n { exports: GeneratorImport[]; dependency: string }\n >();\n\n for (const dep of deps) {\n const existing = merged.get(dep.dependency);\n if (!existing) {\n merged.set(dep.dependency, {\n exports: [...dep.exports],\n dependency: dep.dependency,\n });\n continue;\n }\n\n for (const exp of dep.exports) {\n if (\n !existing.exports.some(\n (current) => current.name === exp.name && current.alias === exp.alias,\n )\n ) {\n existing.exports.push(exp);\n }\n }\n }\n\n return [...merged.values()];\n};\n\nconst cloneDependencies = (\n deps: readonly GeneratorDependency[],\n): GeneratorDependency[] =>\n deps.map((dep) => ({\n ...dep,\n exports: [...dep.exports],\n }));\n\n/**\n * Returns the merged dependency list required when Angular `httpResource`\n * output coexists with Angular `HttpClient` service generation.\n *\n * This is used for pure `httpResource` mode as well as mixed generation paths\n * that still need Angular common HTTP symbols and service helpers.\n *\n * @returns The de-duplicated dependency descriptors for Angular resource generation.\n */\nexport const getAngularHttpResourceDependencies: ClientDependenciesBuilder =\n () =>\n mergeDependencies([\n ...ANGULAR_HTTP_CLIENT_DEPENDENCIES,\n ...ANGULAR_HTTP_RESOURCE_DEPENDENCIES,\n ]);\n\n/**\n * Returns only the dependencies required by standalone generated resource\n * files, such as the sibling `*.resource.ts` output used in `both` mode.\n *\n * @returns The dependency descriptors required by resource-only files.\n */\nexport const getAngularHttpResourceOnlyDependencies: ClientDependenciesBuilder =\n () => cloneDependencies(ANGULAR_HTTP_RESOURCE_DEPENDENCIES);\n\nconst isResponseText = (\n contentType: string | undefined,\n dataType: string,\n): boolean => {\n if (dataType === 'string') return true;\n if (!contentType) return false;\n return contentType.startsWith('text/') || contentType.includes('xml');\n};\n\nconst isResponseArrayBuffer = (contentType: string | undefined): boolean => {\n if (!contentType) return false;\n return (\n contentType.includes('application/octet-stream') ||\n contentType.includes('application/pdf')\n );\n};\n\nconst isResponseBlob = (\n contentType: string | undefined,\n isBlob: boolean,\n): boolean => {\n if (isBlob) return true;\n if (!contentType) return false;\n return contentType.startsWith('image/') || contentType.includes('blob');\n};\n\ntype HttpResourceFactoryName =\n | 'httpResource'\n | 'httpResource.text'\n | 'httpResource.arrayBuffer'\n | 'httpResource.blob';\n\nconst HTTP_RESOURCE_OPTIONS_TYPE_NAME = 'OrvalHttpResourceOptions';\n\nconst getHttpResourceFactory = (\n response: { readonly isBlob: boolean },\n contentType: string | undefined,\n dataType: string,\n): HttpResourceFactoryName => {\n if (isResponseText(contentType, dataType)) return 'httpResource.text';\n if (isResponseBlob(contentType, response.isBlob)) return 'httpResource.blob';\n if (isResponseArrayBuffer(contentType)) return 'httpResource.arrayBuffer';\n return 'httpResource';\n};\n\nconst getHttpResourceRawType = (factory: HttpResourceFactoryName): string => {\n switch (factory) {\n case 'httpResource.text': {\n return 'string';\n }\n case 'httpResource.arrayBuffer': {\n return 'ArrayBuffer';\n }\n case 'httpResource.blob': {\n return 'Blob';\n }\n default: {\n return 'unknown';\n }\n }\n};\n\nconst getTypeWithoutDefault = (definition: string): string => {\n const match = /^([^:]+):\\s*(.+)$/.exec(definition);\n if (!match) return definition;\n return match[2].replace(/\\s*=\\s*.*$/, '').trim();\n};\n\nconst getDefaultValueFromImplementation = (\n implementation: string,\n): string | undefined => {\n const match = /=\\s*(.+)$/.exec(implementation);\n return match ? match[1].trim() : undefined;\n};\n\ninterface SignalProp {\n readonly definition: string;\n readonly implementation: string;\n}\n\nconst withSignal = (\n prop: GeneratorVerbOptions['props'][number],\n options: { readonly hasDefault?: boolean } = {},\n): SignalProp => {\n const type = getTypeWithoutDefault(prop.definition);\n const derivedDefault =\n getDefaultValueFromImplementation(prop.implementation) !== undefined ||\n prop.default !== undefined;\n const hasDefault = options.hasDefault ?? derivedDefault;\n const nameMatch = /^([^:]+):/.exec(prop.definition);\n const namePart = nameMatch ? nameMatch[1] : prop.name;\n const hasOptionalMark = namePart.includes('?');\n const optional = prop.required && !hasDefault && !hasOptionalMark ? '' : '?';\n const definition = `${prop.name}${optional}: Signal<${type}>`;\n\n return {\n definition,\n implementation: definition,\n };\n};\n\nconst buildSignalProps = (\n props: GeneratorVerbOptions['props'],\n params: GeneratorVerbOptions['params'],\n): GeneratorVerbOptions['props'] => {\n const paramDefaults = new Map<string, boolean>();\n for (const param of params) {\n const hasDefault =\n getDefaultValueFromImplementation(param.implementation) !== undefined ||\n param.default !== undefined;\n paramDefaults.set(param.name, hasDefault);\n }\n\n return props.map((prop) => {\n switch (prop.type) {\n case GetterPropType.NAMED_PATH_PARAMS: {\n return {\n ...prop,\n name: 'pathParams',\n definition: `pathParams: Signal<${prop.schema.name}>`,\n implementation: `pathParams: Signal<${prop.schema.name}>`,\n };\n }\n case GetterPropType.PARAM:\n case GetterPropType.QUERY_PARAM:\n case GetterPropType.BODY:\n case GetterPropType.HEADER: {\n const hasDefault =\n prop.type === GetterPropType.PARAM\n ? (paramDefaults.get(prop.name) ?? false)\n : undefined;\n const signalProp = withSignal(prop, { hasDefault });\n return {\n ...prop,\n definition: signalProp.definition,\n implementation: signalProp.implementation,\n };\n }\n default: {\n return prop;\n }\n }\n });\n};\n\nconst applySignalRoute = (\n route: string,\n params: GeneratorVerbOptions['params'],\n useNamedParams: boolean,\n): string => {\n let updatedRoute = route;\n for (const param of params) {\n const template = '${' + param.name + '}';\n const defaultValue = getDefaultValueFromImplementation(\n param.implementation,\n );\n let replacement: string;\n if (useNamedParams) {\n replacement =\n defaultValue === undefined\n ? '${pathParams().' + param.name + '}'\n : '${pathParams()?.' + param.name + ' ?? ' + defaultValue + '}';\n } else {\n replacement =\n defaultValue === undefined\n ? '${' + param.name + '()}'\n : '${' + param.name + '?.() ?? ' + defaultValue + '}';\n }\n updatedRoute = updatedRoute.replaceAll(template, replacement);\n }\n return updatedRoute;\n};\n\ninterface ResourceRequest {\n readonly bodyForm: string;\n readonly request: string;\n readonly isUrlOnly: boolean;\n}\n\nconst buildResourceRequest = (\n {\n verb,\n body,\n headers,\n queryParams,\n paramsSerializer,\n paramsFilter,\n override,\n formData,\n formUrlEncoded,\n }: GeneratorVerbOptions,\n route: string,\n): ResourceRequest => {\n const isFormData = !override.formData.disabled;\n const isFormUrlEncoded = override.formUrlEncoded !== false;\n\n const bodyForm = generateFormDataAndUrlEncodedFunction({\n formData,\n formUrlEncoded,\n body,\n isFormData,\n isFormUrlEncoded,\n });\n\n const hasFormData = isFormData && body.formData;\n const hasFormUrlEncoded = isFormUrlEncoded && body.formUrlEncoded;\n\n const bodyAccess = body.definition\n ? body.isOptional\n ? `${body.implementation}?.()`\n : `${body.implementation}()`\n : undefined;\n const bodyValue = hasFormData\n ? 'formData'\n : hasFormUrlEncoded\n ? 'formUrlEncoded'\n : bodyAccess;\n\n const paramsAccess = queryParams ? 'params?.()' : undefined;\n const headersAccess = headers ? 'headers?.()' : undefined;\n const filteredParamsValue = paramsAccess\n ? buildAngularParamsFilterExpression({\n paramsExpression: `${paramsAccess} ?? {}`,\n requiredNullableParamKeys: queryParams?.requiredNullableKeys ?? [],\n preserveRequiredNullables: !!paramsSerializer,\n // Only pass non-primitive params through the built-in `filterParams`\n // when a `paramsSerializer` can legally consume the raw object/array.\n // Without one, the helper's `unknown` return type is not assignable\n // to `HttpClient`'s params, so keep them filtered out. The\n // `paramsFilter` branch bypasses the built-in helper entirely.\n nonPrimitiveKeys: paramsSerializer\n ? (queryParams?.nonPrimitiveKeys ?? [])\n : [],\n paramsFilter,\n useSharedHelper: true,\n })\n : undefined;\n const paramsValue = paramsAccess\n ? paramsSerializer\n ? `params?.() ? ${paramsSerializer.name}(${filteredParamsValue}) : undefined`\n : filteredParamsValue\n : undefined;\n\n const isGet = verb === 'get';\n const hasExtras = !isGet || !!bodyValue || !!paramsValue || !!headersAccess;\n const isUrlOnly = !hasExtras && !bodyForm;\n\n const requestLines = [\n `url: \\`${route}\\``,\n isGet ? undefined : `method: '${verb.toUpperCase()}'`,\n bodyValue ? `body: ${bodyValue}` : undefined,\n paramsValue ? `params: ${paramsValue}` : undefined,\n headersAccess ? `headers: ${headersAccess}` : undefined,\n ].filter(Boolean);\n\n const request = isUrlOnly\n ? `\\`${route}\\``\n : `({\\n ${requestLines.join(',\\n ')}\\n })`;\n\n return {\n bodyForm,\n request,\n isUrlOnly,\n };\n};\n\nconst getHttpResourceResponseImports = (\n response: GeneratorVerbOptions['response'],\n): GeneratorImport[] => {\n const successDefinition = response.definition.success;\n if (!successDefinition) return [];\n\n return response.imports.filter((imp) => {\n const name = imp.alias ?? imp.name;\n const pattern = new RegExp(String.raw`\\b${escapeRegExp(name)}\\b`, 'g');\n return pattern.test(successDefinition);\n });\n};\n\nconst getHttpResourceVerbImports = (\n verbOptions: GeneratorVerbOptions,\n output: NormalizedOutputOptions,\n): GeneratorImport[] => {\n const { response, body, queryParams, props, headers, params } = verbOptions;\n const responseImports = isZodSchemaOutput(output)\n ? [\n ...getHttpResourceResponseImports(response).map((imp) => ({\n ...imp,\n values: true,\n })),\n ...getHttpResourceResponseImports(response)\n .filter((imp) => !isPrimitiveType(imp.name))\n .map((imp) => ({ name: getSchemaOutputTypeRef(imp.name) })),\n ]\n : getHttpResourceResponseImports(response);\n\n return [\n ...responseImports,\n ...body.imports,\n ...props.flatMap((prop) =>\n prop.type === GetterPropType.NAMED_PATH_PARAMS\n ? [{ name: prop.schema.name }]\n : [],\n ),\n ...(queryParams ? [{ name: queryParams.schema.name }] : []),\n ...(headers ? [{ name: headers.schema.name }] : []),\n ...params.flatMap<GeneratorImport>(({ imports }) => imports),\n { name: 'map', values: true, importPath: 'rxjs' },\n ];\n};\n\nconst getParseExpression = (\n response: {\n readonly imports: readonly { name: string; isZodSchema?: boolean }[];\n readonly definition: { readonly success?: string };\n },\n factory: HttpResourceFactoryName,\n output: NormalizedOutputOptions,\n responseTypeOverride?: string,\n): string | undefined => {\n if (factory !== 'httpResource') return undefined;\n\n // Explicit isZodSchema flag on imports (forward-compatible)\n const zodSchema = response.imports.find((imp) => imp.isZodSchema);\n if (zodSchema) return `${zodSchema.name}.parse`;\n\n // Check if runtime validation is disabled\n if (!output.override.angular.runtimeValidation) return undefined;\n\n // Auto-detect: when schemas.type === 'zod', use the response type as the schema name\n if (!isZodSchemaOutput(output)) return undefined;\n\n const responseType = responseTypeOverride ?? response.definition.success;\n if (!responseType) return undefined;\n if (isPrimitiveType(responseType)) return undefined;\n\n // Verify a matching import exists (the response type name resolves to a zod schema)\n const hasMatchingImport = response.imports.some(\n (imp) => imp.name === responseType,\n );\n if (!hasMatchingImport) return undefined;\n\n return `${responseType}.parse`;\n};\n\n/**\n * Builds the literal option entries that Orval injects into generated\n * `httpResource()` calls.\n *\n * This merges user-supplied generator configuration such as `defaultValue` or\n * `debugName` with automatically derived runtime-validation hooks like\n * `parse: Schema.parse`.\n *\n * @returns The option entries plus metadata about whether a configured default value exists.\n */\nconst buildHttpResourceOptionsLiteral = (\n verbOption: GeneratorVerbOptions,\n factory: HttpResourceFactoryName,\n output: NormalizedOutputOptions,\n responseTypeOverride?: string,\n): { entries: string[]; hasDefaultValue: boolean } => {\n const override = getHttpResourceOverride(verbOption, output);\n const parseExpression = getParseExpression(\n verbOption.response,\n factory,\n output,\n responseTypeOverride,\n );\n\n const defaultValueLiteral =\n override?.defaultValue === undefined\n ? undefined\n : JSON.stringify(override.defaultValue);\n\n const optionEntries = [\n parseExpression ? `parse: ${parseExpression}` : undefined,\n defaultValueLiteral ? `defaultValue: ${defaultValueLiteral}` : undefined,\n override?.debugName === undefined\n ? undefined\n : `debugName: ${JSON.stringify(override.debugName)}`,\n override?.injector ? `injector: ${override.injector}` : undefined,\n override?.equal ? `equal: ${override.equal}` : undefined,\n ].filter((value): value is string => value !== undefined);\n\n return {\n entries: optionEntries,\n hasDefaultValue: defaultValueLiteral !== undefined,\n };\n};\n\nconst appendArgument = (args: string, argument: string): string => {\n const normalizedArgs = args.trim().replace(/,\\s*$/, '');\n\n return normalizedArgs.length > 0\n ? `${normalizedArgs},\n ${argument}`\n : argument;\n};\n\nconst normalizeOptionalParametersForRequiredTrailingArg = (\n args: string,\n): string =>\n args.replaceAll(/(\\w+)\\?:\\s*([^,\\n]+)(,?)/g, '$1: $2 | undefined$3');\n\nconst buildHttpResourceOptionsArgument = (\n valueType: string,\n rawType: string,\n options: { readonly requiresDefaultValue: boolean },\n omitParse = false,\n): string => {\n const baseType = `${HTTP_RESOURCE_OPTIONS_TYPE_NAME}<${valueType}, ${rawType}${omitParse ? ', true' : ''}>`;\n return options.requiresDefaultValue\n ? `options: ${baseType} & { defaultValue: NoInfer<${valueType}> }`\n : `options?: ${baseType}`;\n};\n\nconst buildHttpResourceOptionsExpression = (\n configuredEntries: readonly string[],\n): string | undefined => {\n if (configuredEntries.length === 0) {\n return 'options';\n }\n\n return `{\n ...(options ?? {}),\n ${configuredEntries.join(',\\n ')}\n }`;\n};\n\nconst buildHttpResourceFunctionSignatures = (\n resourceName: string,\n args: string,\n valueType: string,\n rawType: string,\n hasConfiguredDefaultValue: boolean,\n omitParse = false,\n): string => {\n if (hasConfiguredDefaultValue) {\n return `export function ${resourceName}(${appendArgument(\n args,\n buildHttpResourceOptionsArgument(\n valueType,\n rawType,\n {\n requiresDefaultValue: false,\n },\n omitParse,\n ),\n )}): HttpResourceRef<${valueType}>`;\n }\n\n const overloadArgs = appendArgument(\n normalizeOptionalParametersForRequiredTrailingArg(args),\n buildHttpResourceOptionsArgument(\n valueType,\n rawType,\n {\n requiresDefaultValue: true,\n },\n omitParse,\n ),\n );\n const implementationArgs = appendArgument(\n args,\n buildHttpResourceOptionsArgument(\n valueType,\n rawType,\n {\n requiresDefaultValue: false,\n },\n omitParse,\n ),\n );\n\n return `export function ${resourceName}(${overloadArgs}): HttpResourceRef<${valueType}>;\nexport function ${resourceName}(${implementationArgs}): HttpResourceRef<${valueType} | undefined>`;\n};\n\n/**\n * Generates a single Angular `httpResource` helper function for an operation.\n *\n * The generated output handles signal-wrapped parameters, route interpolation,\n * request-body construction, content-type branching, runtime validation, and\n * optional mutator integration when the mutator is compatible with standalone\n * resource functions.\n *\n * @remarks\n * This function emits overloads when content negotiation or caller-supplied\n * `defaultValue` support requires multiple signatures.\n *\n * @returns A string containing the complete generated resource helper.\n */\nconst buildHttpResourceFunction = (\n verbOption: GeneratorVerbOptions,\n route: string,\n output: NormalizedOutputOptions,\n): string => {\n const { operationName, response, props, params, mutator } = verbOption;\n\n const dataType = response.definition.success || 'unknown';\n const omitParse = isZodSchemaOutput(output);\n const responseSchemaImports = getHttpResourceResponseImports(response);\n const hasResponseSchemaImport = responseSchemaImports.some(\n (imp) => imp.name === dataType,\n );\n const resourceName = `${operationName}Resource`;\n const parsedDataType =\n omitParse &&\n output.override.angular.runtimeValidation &&\n !isPrimitiveType(dataType) &&\n hasResponseSchemaImport\n ? getSchemaOutputTypeRef(dataType)\n : dataType;\n const successTypes = response.types.success;\n const overallReturnType =\n successTypes.length <= 1\n ? parsedDataType\n : [\n ...new Set(\n successTypes.map((type) =>\n getHttpResourceGeneratedResponseType(\n type.value,\n type.contentType,\n responseSchemaImports,\n output,\n ),\n ),\n ),\n ].join(' | ') || parsedDataType;\n resourceReturnTypesRegistry.set(\n operationName,\n `export type ${pascal(\n operationName,\n )}ResourceResult = NonNullable<${overallReturnType}>`,\n );\n const uniqueContentTypes = getUniqueContentTypes(successTypes);\n const defaultSuccess = getDefaultSuccessType(successTypes, dataType);\n const jsonContentType = successTypes.find((type) =>\n type.contentType.includes('json'),\n )?.contentType;\n const preferredContentType = jsonContentType ?? defaultSuccess.contentType;\n const resourceFactory = getHttpResourceFactory(\n response,\n preferredContentType,\n dataType,\n );\n\n const hasNamedParams = props.some(\n (prop) => prop.type === GetterPropType.NAMED_PATH_PARAMS,\n );\n const signalRoute = applySignalRoute(route, params, hasNamedParams);\n\n const signalProps = buildSignalProps(props, params);\n const args = toObjectString(signalProps, 'implementation');\n\n const { bodyForm, request, isUrlOnly } = buildResourceRequest(\n verbOption,\n signalRoute,\n );\n\n if (uniqueContentTypes.length > 1) {\n const defaultContentType = jsonContentType ?? defaultSuccess.contentType;\n const acceptTypeName = getAcceptHelperName(operationName);\n const requiredProps = signalProps.filter(\n (_, index) => props[index]?.required && !props[index]?.default,\n );\n const optionalProps = signalProps.filter(\n (_, index) => !props[index]?.required || props[index]?.default,\n );\n const requiredPart = requiredProps\n .map((prop) => prop.implementation)\n .join(',\\n ');\n const optionalPart = optionalProps\n .map((prop) => prop.implementation)\n .join(',\\n ');\n const getBranchReturnType = (type: ResReqTypesValue) =>\n getHttpResourceGeneratedResponseType(\n type.value,\n type.contentType,\n responseSchemaImports,\n output,\n );\n const unionReturnType = [\n ...new Set(\n successTypes\n .filter((type) => type.contentType)\n .map((type) => getBranchReturnType(type)),\n ),\n ].join(' | ');\n const getBranchRawType = (type: ResReqTypesValue): string =>\n getHttpResourceRawType(\n getHttpResourceFactory(response, type.contentType, type.value),\n );\n // Per-branch options types (one per distinct content-type branch).\n // Deduped so text-like content types (text/plain, application/xml) that\n // share the same factory don't produce duplicate union members.\n const branchOptionsTypes = [\n ...new Set(\n successTypes\n .filter((type) => type.contentType)\n .map((type) =>\n buildBranchOptionsType(\n getBranchReturnType(type),\n getBranchRawType(type),\n omitParse,\n ),\n ),\n ),\n ];\n // The implementation signature accepts the union of branch option types.\n // This keeps each overload's narrow `options` assignable to the\n // implementation signature (required for TS overload compatibility) while\n // preventing mismatched `defaultValue`/`parse` across content types.\n const implementationOptionsType = branchOptionsTypes.join(' | ');\n // Per-accept overloads pin `options` to the branch-specific value/raw\n // types so `defaultValue` / `parse` type-check against the actual content\n // type — e.g. passing a `string` default to the `application/json`\n // overload is now a type error.\n const branchOverloads = successTypes\n .filter((type) => type.contentType)\n .map((type) => {\n const returnType = getBranchReturnType(type);\n const overloadArgs = [\n requiredPart,\n `accept: '${type.contentType}'`,\n optionalPart,\n `options?: ${buildBranchOptionsType(returnType, getBranchRawType(type), omitParse)}`,\n ]\n .filter(Boolean)\n .join(',\\n ');\n\n return `export function ${resourceName}(${overloadArgs}): HttpResourceRef<${returnType} | undefined>;`;\n })\n .join('\\n');\n const implementationArgsWithDefault = [\n requiredPart,\n `accept: ${acceptTypeName} = '${defaultContentType}'`,\n optionalPart,\n `options?: ${implementationOptionsType}`,\n ]\n .filter(Boolean)\n .join(',\\n ');\n\n const getBranchOptions = (type?: ResReqTypesValue) => {\n if (!type) {\n return `options as ${buildBranchOptionsType(unionReturnType, 'unknown', omitParse)}`;\n }\n\n const factory = getHttpResourceFactory(\n response,\n type.contentType,\n type.value,\n );\n const branchOptions = buildHttpResourceOptionsLiteral(\n verbOption,\n factory,\n output,\n type.value,\n );\n const branchOptionsExpression = buildHttpResourceOptionsExpression(\n branchOptions.entries,\n );\n\n return `${branchOptionsExpression ?? 'options'} as unknown as ${buildBranchOptionsType(\n getBranchReturnType(type),\n getHttpResourceRawType(factory),\n omitParse,\n )}`;\n };\n\n const jsonType = successTypes.find(\n (type) =>\n type.contentType.includes('json') || type.contentType.includes('+json'),\n );\n const textType = successTypes.find((type) =>\n isResponseText(type.contentType, type.value),\n );\n const arrayBufferType = successTypes.find((type) =>\n isResponseArrayBuffer(type.contentType),\n );\n const blobType = successTypes.find((type) =>\n isResponseBlob(type.contentType, response.isBlob),\n );\n\n // Fallback path for unknown accept values must match the branch the\n // default `accept` argument targets — pick the success type whose content\n // type is `defaultContentType`, then fall back to the remaining branches\n // in the same priority order as the runtime dispatch above.\n const fallbackType =\n successTypes.find((type) => type.contentType === defaultContentType) ??\n jsonType ??\n textType ??\n arrayBufferType ??\n blobType;\n\n const buildFallbackReturn = (type: ResReqTypesValue): string => {\n const factory = getHttpResourceFactory(\n response,\n type.contentType,\n type.value,\n );\n const returnType =\n factory === 'httpResource'\n ? getBranchReturnType(type)\n : getHttpResourceRawType(factory);\n return `return ${factory}<${returnType}>(() => ({\n ...normalizedRequest,\n headers,\n }), ${getBranchOptions(type)});`;\n };\n\n const fallbackReturn = fallbackType\n ? buildFallbackReturn(fallbackType)\n : `return httpResource<${parsedDataType}>(() => ({\n ...normalizedRequest,\n headers,\n }), ${getBranchOptions()});`;\n\n // Default-accept overload (when `accept` is omitted): narrow `options` to\n // the branch the runtime falls back to, so callers that skip `accept`\n // still get branch-specific typing instead of the broad options union.\n const defaultOverloadOptionsType = fallbackType\n ? buildBranchOptionsType(\n getBranchReturnType(fallbackType),\n getBranchRawType(fallbackType),\n omitParse,\n )\n : implementationOptionsType;\n const defaultOverloadReturnType = fallbackType\n ? getBranchReturnType(fallbackType)\n : unionReturnType;\n const defaultOverloadArgs = [\n requiredPart,\n optionalPart,\n `options?: ${defaultOverloadOptionsType}`,\n ]\n .filter(Boolean)\n .join(',\\n ');\n\n const normalizeRequest = isUrlOnly\n ? `const normalizedRequest: HttpResourceRequest = { url: request };`\n : `const normalizedRequest: HttpResourceRequest = request;`;\n\n return `/**\n * @experimental httpResource is experimental (Angular v19.2+)\n */\n${branchOverloads}\nexport function ${resourceName}(\n ${defaultOverloadArgs}\n ): HttpResourceRef<${defaultOverloadReturnType} | undefined>;\nexport function ${resourceName}(\n ${implementationArgsWithDefault}\n): HttpResourceRef<${unionReturnType} | undefined> {\n ${bodyForm ? `${bodyForm};` : ''}\n const request = ${request};\n ${normalizeRequest}\n const headers = normalizedRequest.headers instanceof HttpHeaders\n ? normalizedRequest.headers.set('Accept', accept)\n : { ...(normalizedRequest.headers ?? {}), Accept: accept };\n\n if (accept.includes('json') || accept.includes('+json')) {\n return httpResource<${jsonType ? getBranchReturnType(jsonType) : parsedDataType}>(() => ({\n ...normalizedRequest,\n headers,\n }), ${getBranchOptions(jsonType)});\n }\n\n if (accept.startsWith('text/') || accept.includes('xml')) {\n return httpResource.text<string>(() => ({\n ...normalizedRequest,\n headers,\n }), ${getBranchOptions(textType)});\n }\n\n ${\n arrayBufferType\n ? `if (accept.includes('octet-stream') || accept.includes('pdf')) {\n return httpResource.arrayBuffer<ArrayBuffer>(() => ({\n ...normalizedRequest,\n headers,\n }), ${getBranchOptions(arrayBufferType)});\n }\n\n `\n : ''\n }${fallbackReturn}\n}\n`;\n }\n\n const resourceOptions = buildHttpResourceOptionsLiteral(\n verbOption,\n resourceFactory,\n output,\n );\n const rawType = getHttpResourceRawType(resourceFactory);\n const resourceValueType = resourceOptions.hasDefaultValue\n ? parsedDataType\n : `${parsedDataType} | undefined`;\n const functionSignatures = buildHttpResourceFunctionSignatures(\n resourceName,\n args,\n parsedDataType,\n rawType,\n resourceOptions.hasDefaultValue,\n omitParse,\n );\n const implementationArgs = appendArgument(\n args,\n buildHttpResourceOptionsArgument(\n parsedDataType,\n rawType,\n {\n requiresDefaultValue: false,\n },\n omitParse,\n ),\n );\n const optionsExpression = buildHttpResourceOptionsExpression(\n resourceOptions.entries,\n );\n const resourceCallOptions = optionsExpression ? `, ${optionsExpression}` : '';\n\n // HttpClient-style mutators expect (config, httpClient) — incompatible with\n // standalone httpResource functions which have no HttpClient instance.\n // Only apply mutators that accept a single argument (request config only).\n const isResourceCompatibleMutator =\n mutator !== undefined && !mutator.hasSecondArg;\n const returnExpression = isResourceCompatibleMutator\n ? `${mutator.name}(request)`\n : 'request';\n\n if (isUrlOnly && !isResourceCompatibleMutator) {\n return `/**\n * @experimental httpResource is experimental (Angular v19.2+)\n */\n${functionSignatures};\nexport function ${resourceName}(${implementationArgs}): HttpResourceRef<${resourceValueType}> {\n return ${resourceFactory}<${parsedDataType}>(() => ${request}${resourceCallOptions});\n}\n`;\n }\n\n return `/**\n * @experimental httpResource is experimental (Angular v19.2+)\n */\n${functionSignatures};\nexport function ${resourceName}(${implementationArgs}): HttpResourceRef<${resourceValueType}> {\n return ${resourceFactory}<${parsedDataType}>(() => {\n ${bodyForm ? `${bodyForm};` : ''}\n const request = ${request};\n return ${returnExpression};\n }${resourceCallOptions});\n}\n`;\n};\n\nconst buildHttpResourceOptionsUtilities = (omitParse: boolean): string => `\nexport type ${HTTP_RESOURCE_OPTIONS_TYPE_NAME}<TValue, TRaw = unknown, TOmitParse extends boolean = ${omitParse}> = TOmitParse extends true\n ? Omit<HttpResourceOptions<TValue, TRaw>, 'parse'>\n : HttpResourceOptions<TValue, TRaw>;\n`;\n\nconst getContentTypeReturnType = (\n contentType: string | undefined,\n value: string,\n): string => {\n if (!contentType) return value;\n if (contentType.includes('json') || contentType.includes('+json')) {\n return value;\n }\n if (contentType.startsWith('text/') || contentType.includes('xml')) {\n return 'string';\n }\n if (isResponseArrayBuffer(contentType)) {\n return 'ArrayBuffer';\n }\n return 'Blob';\n};\n\nconst getHttpResourceGeneratedResponseType = (\n value: string,\n contentType: string | undefined,\n responseImports: readonly { name: string }[],\n output: NormalizedOutputOptions,\n): string => {\n if (\n isZodSchemaOutput(output) &&\n output.override.angular.runtimeValidation &&\n !!contentType &&\n (contentType.includes('json') || contentType.includes('+json')) &&\n !isPrimitiveType(value) &&\n responseImports.some((imp) => imp.name === value)\n ) {\n return getSchemaOutputTypeRef(value);\n }\n\n return getContentTypeReturnType(contentType, value);\n};\n\nconst buildBranchOptionsType = (\n valueType: string,\n rawType: string,\n omitParse: boolean,\n) =>\n `${HTTP_RESOURCE_OPTIONS_TYPE_NAME}<${valueType}, ${rawType}${omitParse ? ', true' : ''}>`;\n\nconst buildResourceStateUtilities = (): string => `\n/**\n * Utility type for httpResource results with status tracking.\n * Inspired by @angular-architects/ngrx-toolkit withResource pattern.\n *\n * Uses \\`globalThis.Error\\` to avoid collision with API model types named \\`Error\\`.\n */\nexport interface ResourceState<T> {\n readonly value: Signal<T | undefined>;\n readonly status: Signal<ResourceStatus>;\n readonly error: Signal<globalThis.Error | undefined>;\n readonly isLoading: Signal<boolean>;\n readonly hasValue: () => boolean;\n readonly reload: () => boolean;\n}\n\n/**\n * Wraps an HttpResourceRef to expose a consistent ResourceState interface.\n * Useful when integrating with NgRx SignalStore via withResource().\n */\nexport function toResourceState<T>(ref: HttpResourceRef<T>): ResourceState<T> {\n return {\n value: ref.value,\n status: ref.status,\n error: ref.error,\n isLoading: ref.isLoading,\n hasValue: () => ref.hasValue(),\n reload: () => ref.reload(),\n };\n}\n`;\n\n/**\n * Generates the header section for Angular `httpResource` output.\n *\n * @remarks\n * Resource functions are emitted in the header phase because their final shape\n * depends on the full set of operations in scope, including generated `Accept`\n * helpers and any shared mutation service methods.\n *\n * @returns The generated header, resource helpers, optional mutation service class, and resource result aliases.\n */\nexport const generateHttpResourceHeader: ClientHeaderBuilder = ({\n title,\n isRequestOptions,\n isMutator,\n isGlobalMutator,\n provideIn,\n output,\n verbOptions,\n tag,\n}) => {\n resetHttpClientReturnTypes();\n resourceReturnTypesRegistry.reset();\n\n // When the output is emitted per-tag (modes: `tags`, `tags-split`) each file\n // must only reference operations that belong to the current tag — otherwise\n // the shared header duplicates helpers across every tag file and pulls in\n // type names the file-local `imports` filter never sees, producing missing\n // schema imports in the generated output.\n const relevantVerbOptions = getRelevantVerbOptionsForTag(verbOptions, tag);\n\n const retrievals = relevantVerbOptions.filter((verbOption) =>\n isRetrievalVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n );\n // Emit the shared `filterParams` helper only when at least one retrieval\n // with query params lacks its own `paramsFilter` mutator — otherwise the\n // helper would be dead code.\n const hasBuiltInFilteredQueryParams = retrievals.some(\n (verbOption) => !!verbOption.queryParams && !verbOption.paramsFilter,\n );\n const filterParamsHelper = hasBuiltInFilteredQueryParams\n ? `\\n${getAngularFilteredParamsHelperBody()}\\n`\n : '';\n const resources = retrievals\n .map((verbOption) => {\n const fullRoute = routeRegistry.get(\n verbOption.operationName,\n verbOption.route,\n );\n return buildHttpResourceFunction(verbOption, fullRoute, output);\n })\n .join('\\n');\n const resourceTypes = resourceReturnTypesRegistry.getFooter(\n retrievals.map((verbOption) => verbOption.operationName),\n );\n\n const mutations = relevantVerbOptions.filter((verbOption) =>\n isMutationVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n );\n const acceptHelpers = buildAcceptHelpers(\n [...retrievals, ...mutations],\n output,\n );\n // Mutations need the built-in helper only when at least one mutation lacks\n // its own `paramsFilter`. If the resource section already emits the helper\n // for retrievals, we suppress the mutation-side emission to avoid duplication.\n const hasMutationBuiltInFilteredQueryParams = mutations.some(\n (verbOption) => !!verbOption.queryParams && !verbOption.paramsFilter,\n );\n\n const mutationImplementation = mutations\n .map((verbOption) => {\n const fullRoute = routeRegistry.get(\n verbOption.operationName,\n verbOption.route,\n );\n const generatorOptions: HttpClientGeneratorContext = {\n route: fullRoute,\n context: { output },\n };\n\n return generateHttpClientImplementation(verbOption, generatorOptions);\n })\n .join('\\n');\n\n const classImplementation = mutationImplementation\n ? `\n${buildServiceClassOpen({\n title,\n isRequestOptions,\n isMutator,\n isGlobalMutator,\n provideIn,\n hasQueryParams:\n hasMutationBuiltInFilteredQueryParams && !hasBuiltInFilteredQueryParams,\n})}\n${mutationImplementation}\n};\n`\n : '';\n\n return `${buildHttpResourceOptionsUtilities(isZodSchemaOutput(output))}${filterParamsHelper}${acceptHelpers ? `${acceptHelpers}\\n\\n` : ''}${resources}${classImplementation}${resourceTypes ? `\\n${resourceTypes}\\n` : ''}`;\n};\n\n/**\n * Generates the footer for Angular `httpResource` output.\n *\n * The footer appends any registered `ClientResult` aliases coming from shared\n * `HttpClient` mutation methods and the resource-state helper utilities emitted\n * for generated Angular resources.\n *\n * @returns The footer text for the generated Angular resource file.\n */\nexport const generateHttpResourceFooter: ClientFooterBuilder = ({\n operationNames,\n}) => {\n const clientTypes = getHttpClientReturnTypes(operationNames);\n const utilities = buildResourceStateUtilities();\n\n return `${clientTypes ? `${clientTypes}\\n` : ''}${utilities}`;\n};\n\n/**\n * Per-operation builder used during Angular `httpResource` generation.\n *\n * Unlike the `HttpClient` builder, the actual implementation body is emitted in\n * the header phase after all operations are known. This function mainly records\n * the resolved route and returns the imports required by the current operation.\n *\n * @returns An empty implementation plus the imports required by the operation.\n */\nexport const generateHttpResourceClient: ClientBuilder = (\n verbOptions,\n options,\n) => {\n routeRegistry.set(verbOptions.operationName, options.route);\n const imports = getHttpResourceVerbImports(\n verbOptions,\n options.context.output,\n );\n\n return { implementation: '\\n', imports };\n};\n\nconst buildHttpResourceFile = (\n verbOptions: Record<string, GeneratorVerbOptions>,\n output: NormalizedOutputOptions,\n context: ContextSpec,\n) => {\n resourceReturnTypesRegistry.reset();\n\n const retrievals = Object.values(verbOptions).filter((verbOption) =>\n isRetrievalVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n );\n\n // Emit the shared `filterParams` helper only when at least one retrieval\n // with query params lacks its own `paramsFilter` mutator — otherwise the\n // helper would be dead code.\n const hasBuiltInFilteredQueryParams = retrievals.some(\n (verbOption) => !!verbOption.queryParams && !verbOption.paramsFilter,\n );\n const filterParamsHelper = hasBuiltInFilteredQueryParams\n ? `\\n${getAngularFilteredParamsHelperBody()}\\n`\n : '';\n\n const resources = retrievals\n .map((verbOption) => {\n const fullRoute = getFullRoute(\n verbOption.route,\n context.spec.servers,\n output.baseUrl,\n );\n return buildHttpResourceFunction(verbOption, fullRoute, output);\n })\n .join('\\n');\n\n const resourceTypes = resourceReturnTypesRegistry.getFooter(\n Object.values(verbOptions).map((verbOption) => verbOption.operationName),\n );\n const utilities = buildResourceStateUtilities();\n const acceptHelpers = buildAcceptHelpers(retrievals, output);\n\n return `${buildHttpResourceOptionsUtilities(isZodSchemaOutput(output))}${filterParamsHelper}${acceptHelpers ? `${acceptHelpers}\\n\\n` : ''}${resources}\\n${resourceTypes ? `${resourceTypes}\\n` : ''}${utilities}`;\n};\n\nconst buildSchemaImportDependencies = (\n output: NormalizedOutputOptions,\n imports: GeneratorImport[],\n relativeSchemasPath: string,\n) => {\n const isZod = isZodSchemaOutput(output);\n const uniqueImports = [\n ...new Map(imports.map((imp) => [imp.name, imp])).values(),\n ];\n\n if (!output.schemas) {\n return [\n {\n exports: isZod\n ? uniqueImports.map((imp) => ({ ...imp, values: true }))\n : uniqueImports,\n dependency: relativeSchemasPath,\n },\n ];\n }\n\n if (!output.indexFiles) {\n return [...uniqueImports].map((imp) => {\n const baseName = imp.schemaName ?? imp.name;\n const name = conventionName(baseName, output.namingConvention);\n const suffix = isZod ? '.zod' : '';\n const importExtension = output.fileExtension.replace(/\\.ts$/, '');\n return {\n exports: isZod ? [{ ...imp, values: true }] : [imp],\n dependency: upath.joinSafe(\n relativeSchemasPath,\n `${name}${suffix}${importExtension}`,\n ),\n };\n });\n }\n\n if (isZod) {\n return [\n {\n exports: uniqueImports.map((imp) => ({ ...imp, values: true })),\n dependency: relativeSchemasPath,\n },\n ];\n }\n\n return [\n {\n exports: uniqueImports,\n dependency: relativeSchemasPath,\n },\n ];\n};\n\nconst getHttpResourceExtraFilePath = (\n output: NormalizedOutputOptions,\n tag?: string,\n): string => {\n const { extension, dirname, filename } = getFileInfo(output.target, {\n extension: output.fileExtension,\n });\n\n switch (output.mode) {\n case OutputMode.TAGS: {\n const normalizedTag = kebab(tag ?? 'default');\n return upath.joinSafe(dirname, `${normalizedTag}.resource${extension}`);\n }\n case OutputMode.TAGS_SPLIT: {\n const normalizedTag = kebab(tag ?? 'default');\n return upath.joinSafe(\n dirname,\n normalizedTag,\n `${normalizedTag}.resource${extension}`,\n );\n }\n default: {\n return upath.joinSafe(dirname, `${filename}.resource${extension}`);\n }\n }\n};\n\nconst getHttpResourceRelativeSchemasPath = (\n output: NormalizedOutputOptions,\n outputPath: string,\n): string => {\n const schemasPath =\n typeof output.schemas === 'string' ? output.schemas : output.schemas?.path;\n\n if (schemasPath) {\n return upath.getRelativeImportPath(\n outputPath,\n getFileInfo(schemasPath).dirname,\n );\n }\n\n const { dirname, filename, extension } = getFileInfo(output.target, {\n extension: output.fileExtension,\n });\n return upath.getRelativeImportPath(\n outputPath,\n upath.joinSafe(dirname, `${filename}.schemas${extension}`),\n output.fileExtension !== '.ts',\n );\n};\n\nconst buildHttpResourceExtraFile = (\n verbOptions: Record<string, GeneratorVerbOptions>,\n outputPath: string,\n output: NormalizedOutputOptions,\n context: ContextSpec,\n header: string,\n) => {\n const implementation = buildHttpResourceFile(verbOptions, output, context);\n const schemaImports = buildSchemaImportDependencies(\n output,\n Object.values(verbOptions)\n .filter((verbOption) =>\n isRetrievalVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n )\n .flatMap((verbOption) => getHttpResourceVerbImports(verbOption, output)),\n getHttpResourceRelativeSchemasPath(output, outputPath),\n );\n\n const dependencies = getAngularHttpResourceOnlyDependencies(false, false);\n const importImplementation = generateDependencyImports(\n implementation,\n [...schemaImports, ...dependencies],\n context.projectName,\n !!output.schemas,\n isSyntheticDefaultImportsAllow(output.tsconfig),\n );\n\n const mutators = Object.values(verbOptions)\n .filter((verbOption) =>\n isRetrievalVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n )\n .flatMap((verbOption) => {\n // Only include mutators that are compatible with httpResource (single-arg).\n // HttpClient mutators that require (config, httpClient) are skipped.\n const resourceMutator =\n verbOption.mutator && !verbOption.mutator.hasSecondArg\n ? verbOption.mutator\n : undefined;\n\n return [\n resourceMutator,\n verbOption.formData,\n verbOption.formUrlEncoded,\n verbOption.paramsSerializer,\n verbOption.paramsFilter,\n ].filter(\n (value): value is NonNullable<typeof value> => value !== undefined,\n );\n });\n\n const mutatorImports =\n mutators.length > 0\n ? generateMutatorImports({\n mutators,\n oneMore: output.mode === OutputMode.TAGS_SPLIT,\n })\n : '';\n\n return {\n content: `${header}${importImplementation}${mutatorImports}${implementation}`,\n path: outputPath,\n };\n};\n\n/**\n * Generates the extra sibling resource files used by Angular `both` mode.\n *\n * @remarks\n * The main generated file keeps the `HttpClient` service class while retrieval\n * resources are emitted into `*.resource.ts` so consumers can opt into both\n * access patterns without mixing the generated surfaces. In tag-based output\n * modes this emits one sibling resource file per generated tag file.\n *\n * @returns One or more extra file descriptors representing generated resource files.\n */\nexport const generateHttpResourceExtraFiles: ClientExtraFilesBuilder = (\n verbOptions,\n output,\n context,\n) => {\n const header = getHeader(output.override.header, context.spec.info);\n\n if (!hasRetrievalOperations(verbOptions)) {\n return Promise.resolve([]);\n }\n\n if (\n output.mode === OutputMode.TAGS ||\n output.mode === OutputMode.TAGS_SPLIT\n ) {\n const groupedVerbOptions = new Map<\n string,\n Record<string, GeneratorVerbOptions>\n >();\n\n for (const verbOption of Object.values(verbOptions)) {\n const tag = getPrimaryTag(verbOption);\n const currentGroup = groupedVerbOptions.get(tag) ?? {};\n currentGroup[verbOption.operationId] = verbOption;\n groupedVerbOptions.set(tag, currentGroup);\n }\n\n return Promise.resolve(\n [...groupedVerbOptions.entries()]\n .filter(([, tagVerbOptions]) => hasRetrievalOperations(tagVerbOptions))\n .map(([tag, tagVerbOptions]) =>\n buildHttpResourceExtraFile(\n tagVerbOptions,\n getHttpResourceExtraFilePath(output, tag),\n output,\n context,\n header,\n ),\n ),\n );\n }\n\n return Promise.resolve([\n buildHttpResourceExtraFile(\n getVerbOptionsRecord(getRelevantVerbOptionsForTag(verbOptions)),\n getHttpResourceExtraFilePath(output),\n output,\n context,\n header,\n ),\n ]);\n};\n\nexport { generateAngularTitle } from './utils';\n","import type { AngularOptions, ClientGeneratorsBuilder } from '@orval/core';\n\nimport {\n generateAngular,\n generateAngularFooter,\n generateAngularHeader,\n generateAngularTitle,\n getAngularDependencies,\n} from './http-client';\nimport {\n generateHttpResourceClient,\n generateHttpResourceExtraFiles,\n generateHttpResourceFooter,\n generateHttpResourceHeader,\n getAngularHttpResourceDependencies,\n} from './http-resource';\n\nexport * from './constants';\nexport * from './http-client';\nexport * from './http-resource';\nexport * from './types';\nexport * from './utils';\n\nconst httpClientBuilder: ClientGeneratorsBuilder = {\n client: generateAngular,\n header: generateAngularHeader,\n dependencies: getAngularDependencies,\n footer: generateAngularFooter,\n title: generateAngularTitle,\n};\n\nconst httpResourceBuilder: ClientGeneratorsBuilder = {\n client: generateHttpResourceClient,\n header: generateHttpResourceHeader,\n dependencies: getAngularHttpResourceDependencies,\n footer: generateHttpResourceFooter,\n title: generateAngularTitle,\n};\n\nconst bothClientBuilder: ClientGeneratorsBuilder = {\n ...httpClientBuilder,\n extraFiles: generateHttpResourceExtraFiles,\n};\n\nexport const builder = () => (options?: AngularOptions) => {\n switch (options?.client) {\n case 'httpResource': {\n return httpResourceBuilder;\n }\n case 'both': {\n return bothClientBuilder;\n }\n default: {\n return httpClientBuilder;\n }\n }\n};\n\nexport default builder;\n"],"mappings":";;AAEA,MAAa,mCAAmC;CAC9C;EACE,SAAS;GACP;IAAE,MAAM;IAAc,QAAQ;IAAM;GACpC;IAAE,MAAM;IAAe,QAAQ;IAAM;GACrC,EAAE,MAAM,cAAc;GACtB,EAAE,MAAM,eAAe;GACvB;IAAE,MAAM;IAAgB,OAAO;IAAuB,QAAQ;IAAM;GACpE,EAAE,MAAM,aAAa;GACtB;EACD,YAAY;EACb;CACD;EACE,SAAS,CACP;GAAE,MAAM;GAAc,QAAQ;GAAM,EACpC;GAAE,MAAM;GAAU,QAAQ;GAAM,CACjC;EACD,YAAY;EACb;CACD;EACE,SAAS,CAAC;GAAE,MAAM;GAAc,QAAQ;GAAM,CAAC;EAC/C,YAAY;EACb;CACF;AAED,MAAa,qCAAqC,CAChD;CACE,SAAS;EACP;GAAE,MAAM;GAAgB,QAAQ;GAAM;EACtC,EAAE,MAAM,uBAAuB;EAC/B,EAAE,MAAM,mBAAmB;EAC3B,EAAE,MAAM,uBAAuB;EAC/B;GAAE,MAAM;GAAe,QAAQ;GAAM;EACrC,EAAE,MAAM,cAAc;EACtB,EAAE,MAAM,eAAe;EACxB;CACD,YAAY;CACb,EACD;CACE,SAAS,CAAC,EAAE,MAAM,UAAU,EAAE,EAAE,MAAM,kBAAkB,CAAC;CACzD,YAAY;CACb,CACF;;;;;;;;;;;;;AClCD,MAAa,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;AAwB5C,MAAa,uCAAuC;;;;;;;;;;;;;;;;;;AAmBpD,MAAa,2BAA2B;;;;;;;;ACpBxC,MAAa,kBAAkB,IAAI,IAVL;CAC5B;CACA;CACA;CACA;CACA;CACD,CAI4D;AAE7D,MAAM,wBAAwB;CAC5B,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,MAAM;CACN,SAAS;CACV;;;;;AAMD,MAAa,mBAAmB,MAC9B,KAAK,KAAA,KACL,OAAO,U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,QAAQ;CACR,QAAQ;CACR,cAAc;CACd,QAAQ;CACR,OAAO;CACR;AAED,MAAM,oBAA6C;CACjD,GAAG;CACH,YAAY;CACb;AAED,MAAa,iBAAiB,YAA6B;AACzD,SAAQ,SAAS,QAAjB;EACE,KAAK,eACH,QAAO;EAET,KAAK,OACH,QAAO;EAET,QACE,QAAO"}
1
+ {"version":3,"file":"index.mjs","names":["getContentTypeReturnType"],"sources":["../src/constants.ts","../src/types.ts","../src/utils.ts","../src/http-client.ts","../src/http-resource.ts","../src/index.ts"],"sourcesContent":["import type { GeneratorDependency } from '@orval/core';\n\nexport const ANGULAR_HTTP_CLIENT_DEPENDENCIES = [\n {\n exports: [\n { name: 'HttpClient', values: true },\n { name: 'HttpHeaders', values: true },\n { name: 'HttpParams' },\n { name: 'HttpContext' },\n { name: 'HttpResponse', alias: 'AngularHttpResponse', values: true }, // alias to prevent naming conflict with msw\n { name: 'HttpEvent' },\n ],\n dependency: '@angular/common/http',\n },\n {\n exports: [\n { name: 'Injectable', values: true },\n { name: 'inject', values: true },\n ],\n dependency: '@angular/core',\n },\n {\n exports: [{ name: 'Observable', values: true }],\n dependency: 'rxjs',\n },\n] as const satisfies readonly GeneratorDependency[];\n\nexport const ANGULAR_HTTP_RESOURCE_DEPENDENCIES = [\n {\n exports: [\n { name: 'httpResource', values: true },\n { name: 'HttpResourceOptions' },\n { name: 'HttpResourceRef' },\n { name: 'HttpResourceRequest' },\n { name: 'HttpHeaders', values: true },\n { name: 'HttpParams' },\n { name: 'HttpContext' },\n ],\n dependency: '@angular/common/http',\n },\n {\n exports: [{ name: 'Signal' }, { name: 'ResourceStatus' }],\n dependency: '@angular/core',\n },\n] as const satisfies readonly GeneratorDependency[];\n","/**\n * Code template for the `HttpClientOptions` interface emitted into generated files.\n *\n * This is NOT an import of Angular's type — Angular's HttpClient methods accept\n * inline option objects, not a single unified interface. Orval generates this\n * convenience wrapper so users have a single referenceable type.\n *\n * Properties sourced from Angular HttpClient public API (angular/angular\n * packages/common/http/src/client.ts).\n */\nexport const HTTP_CLIENT_OPTIONS_TEMPLATE = `interface HttpClientOptions {\n readonly headers?: HttpHeaders | Record<string, string | string[]>;\n readonly context?: HttpContext;\n readonly params?:\n | HttpParams\n | Record<string, string | number | boolean | Array<string | number | boolean>>;\n readonly reportProgress?: boolean;\n readonly withCredentials?: boolean;\n readonly credentials?: RequestCredentials;\n readonly keepalive?: boolean;\n readonly priority?: RequestPriority;\n readonly cache?: RequestCache;\n readonly mode?: RequestMode;\n readonly redirect?: RequestRedirect;\n readonly referrer?: string;\n readonly integrity?: string;\n readonly referrerPolicy?: ReferrerPolicy;\n readonly transferCache?: {includeHeaders?: string[]} | boolean;\n readonly timeout?: number;\n}`;\n\n/**\n * Code templates for reusable observe option helpers emitted into generated files.\n */\nexport const HTTP_CLIENT_OBSERVE_OPTIONS_TEMPLATE = `type HttpClientBodyOptions = HttpClientOptions & {\n readonly observe?: 'body';\n};\n\ntype HttpClientEventOptions = HttpClientOptions & {\n readonly observe: 'events';\n};\n\ntype HttpClientResponseOptions = HttpClientOptions & {\n readonly observe: 'response';\n};\n\ntype HttpClientObserveOptions = HttpClientOptions & {\n readonly observe?: 'body' | 'events' | 'response';\n};`;\n\n/**\n * Code template for the `ThirdParameter` utility type used with custom mutators.\n */\nexport const THIRD_PARAMETER_TEMPLATE = `// eslint-disable-next-line\n type ThirdParameter<T extends (...args: never[]) => unknown> = T extends (\n config: unknown,\n httpClient: unknown,\n args: infer P,\n) => unknown\n ? P\n : never;`;\n","import {\n camel,\n DefaultTag,\n type GeneratorVerbOptions,\n getAngularFilteredParamsHelperBody,\n getDefaultContentType,\n isBoolean,\n isObject,\n type NormalizedOutputOptions,\n pascal,\n type ResReqTypesValue,\n sanitize,\n type Verbs,\n} from '@orval/core';\n\nimport {\n HTTP_CLIENT_OBSERVE_OPTIONS_TEMPLATE,\n HTTP_CLIENT_OPTIONS_TEMPLATE,\n THIRD_PARAMETER_TEMPLATE,\n} from './types';\n\nexport type ClientOverride = 'httpClient' | 'httpResource' | 'both';\n\nconst PRIMITIVE_TYPE_VALUES = [\n 'string',\n 'number',\n 'boolean',\n 'void',\n 'unknown',\n] as const;\n\nexport type PrimitiveType = (typeof PRIMITIVE_TYPE_VALUES)[number];\n\nexport const PRIMITIVE_TYPES = new Set(PRIMITIVE_TYPE_VALUES);\n\nconst PRIMITIVE_TYPE_LOOKUP = {\n string: true,\n number: true,\n boolean: true,\n void: true,\n unknown: true,\n} as const satisfies Record<PrimitiveType, true>;\n\n/**\n * Narrows a schema type string to the primitive set supported by the Angular\n * generators' query/header helpers.\n */\nexport const isPrimitiveType = (t: string | undefined): t is PrimitiveType =>\n t != undefined &&\n Object.prototype.hasOwnProperty.call(PRIMITIVE_TYPE_LOOKUP, t);\n\n/**\n * Indicates whether the configured schema output target is Zod-based.\n */\nexport const isZodSchemaOutput = (output: NormalizedOutputOptions): boolean =>\n isObject(output.schemas) && output.schemas.type === 'zod';\n\n/**\n * Removes `null` and `undefined` from a value in a type-safe way.\n */\nexport const isDefined = <T>(v: T | null | undefined): v is T => v != undefined;\n\n/**\n * Maps a schema type name to its Zod output-type reference (`${typeName}Output`).\n */\nexport const getSchemaOutputTypeRef = (typeName: string): string =>\n `${typeName}Output`;\n\n/**\n * Converts an operation/tag title into the generated Angular service class name.\n */\nexport const generateAngularTitle = (title: string) => {\n const sanTitle = sanitize(title);\n return `${pascal(sanTitle)}Service`;\n};\n\n/**\n * Builds the opening of an @Injectable Angular service class.\n * Shared between httpClient-only mode and the mutation section of httpResource mode.\n */\nexport const buildServiceClassOpen = ({\n title,\n isRequestOptions,\n isMutator,\n isGlobalMutator,\n provideIn,\n hasQueryParams,\n}: {\n title: string;\n isRequestOptions: boolean;\n isMutator: boolean;\n isGlobalMutator: boolean;\n provideIn: string | boolean | undefined;\n hasQueryParams: boolean;\n}): string => {\n const provideInValue = provideIn\n ? `{ providedIn: '${isBoolean(provideIn) ? 'root' : provideIn}' }`\n : '';\n\n return `\n${\n isRequestOptions && !isGlobalMutator\n ? `${HTTP_CLIENT_OPTIONS_TEMPLATE}\n\n${HTTP_CLIENT_OBSERVE_OPTIONS_TEMPLATE}\n\n${hasQueryParams ? getAngularFilteredParamsHelperBody() : ''}`\n : ''\n}\n\n${isRequestOptions && isMutator ? THIRD_PARAMETER_TEMPLATE : ''}\n\n@Injectable(${provideInValue})\nexport class ${title} {\n private readonly http = inject(HttpClient);\n`;\n};\n\n/**\n * Registry that maps operationName → full route (with baseUrl).\n *\n * Populated during client builder calls (which receive the full route via\n * GeneratorOptions.route) and read during header/footer builder calls\n * (which only receive verbOptions without routes).\n *\n * This avoids monkey-patching verbOptions with a non-standard `fullRoute` property.\n */\nexport const createRouteRegistry = () => {\n const routes = new Map<string, string>();\n\n return {\n reset() {\n routes.clear();\n },\n set(operationName: string, route: string) {\n routes.set(operationName, route);\n },\n get(operationName: string, fallback: string): string {\n return routes.get(operationName) ?? fallback;\n },\n };\n};\n/**\n * Returns only the operations that belong to the current tag output.\n *\n * In `tags` / `tags-split` mode the writer may route untagged operations into\n * the implicit `default` bucket. When a generated tag file targets that bucket\n * we also include operations whose original tag list was empty; a literal\n * user-defined `default` tag is treated like any other tag unless untagged\n * operations are present in the same output.\n */\nexport const getRelevantVerbOptionsForTag = (\n verbOptions: Record<string, GeneratorVerbOptions>,\n tag?: string,\n): GeneratorVerbOptions[] => {\n const allVerbOptions = Object.values(verbOptions);\n if (!tag) return allVerbOptions;\n\n const camelTag = camel(tag);\n const includeUntaggedOperations =\n tag === DefaultTag &&\n allVerbOptions.some((verbOption) => verbOption.tags.length === 0);\n\n return allVerbOptions.filter(\n (verbOption) =>\n verbOption.tags.some((currentTag) => camel(currentTag) === camelTag) ||\n (includeUntaggedOperations && verbOption.tags.length === 0),\n );\n};\n\nexport const createReturnTypesRegistry = () => {\n const returnTypesToWrite = new Map<string, string>();\n\n return {\n reset() {\n returnTypesToWrite.clear();\n },\n set(operationName: string, typeDefinition: string) {\n returnTypesToWrite.set(operationName, typeDefinition);\n },\n getFooter(operationNames: string[]) {\n const collected: string[] = [];\n for (const operationName of operationNames) {\n const value = returnTypesToWrite.get(operationName);\n if (value) {\n collected.push(value);\n }\n }\n return collected.join('\\n');\n },\n };\n};\n\n/**\n * Determines whether an operation should be generated as an `httpResource()`\n * (retrieval) or as an `HttpClient` method in a service class (mutation).\n *\n * Resolution order:\n * 1. **Per-operation override** — `override.operations.<operationId>.angular.client`\n * in the orval config. `httpResource` forces retrieval, `httpClient` forces mutation.\n * 2. **HTTP verb** — absent a per-operation override, `GET` is treated as a retrieval.\n * 3. **Name heuristic** — For `POST`, if the operationName starts with a\n * retrieval-like prefix (search, list, find, query, get, fetch, lookup)\n * it is treated as a retrieval. This handles common patterns like\n * `POST /search` or `POST /graphql` with query-style operation names.\n *\n * If the heuristic misclassifies an operation, users can override it\n * per-operation in their orval config:\n *\n * ```ts\n * override: {\n * operations: {\n * myPostSearch: { angular: { retrievalClient: 'httpResource' } },\n * getOrCreateUser: { angular: { retrievalClient: 'httpClient' } },\n * }\n * }\n * ```\n */\nexport function isRetrievalVerb(\n verb: Verbs,\n operationName?: string,\n clientOverride?: ClientOverride,\n): boolean {\n // Per-operation override takes precedence\n if (clientOverride === 'httpResource') return true;\n if (clientOverride === 'httpClient') return false;\n\n // Absent a per-operation override, GET is treated as a retrieval\n if (verb === 'get') return true;\n\n // POST with a retrieval-like operation name\n if (verb === 'post' && operationName) {\n const lower = operationName.toLowerCase();\n return /^(search|list|find|query|get|fetch|lookup|filter)/.test(lower);\n }\n return false;\n}\n\nexport function isMutationVerb(\n verb: Verbs,\n operationName?: string,\n clientOverride?: ClientOverride,\n): boolean {\n return !isRetrievalVerb(verb, operationName, clientOverride);\n}\n\n/**\n * Selects the preferred success payload type for Angular `httpResource`\n * generation, favouring JSON responses and otherwise falling back to the\n * generator's default content-type rules.\n */\nexport function getDefaultSuccessType(\n successTypes: ResReqTypesValue[],\n fallback: string,\n) {\n const uniqueContentTypes = [\n ...new Set(successTypes.map((t) => t.contentType).filter(Boolean)),\n ];\n const jsonContentType = uniqueContentTypes.find((contentType) =>\n contentType.includes('json'),\n );\n const defaultContentType =\n jsonContentType ??\n (uniqueContentTypes.length > 1\n ? getDefaultContentType(uniqueContentTypes)\n : (uniqueContentTypes[0] ?? 'application/json'));\n const defaultType = successTypes.find(\n (t) => t.contentType === defaultContentType,\n );\n\n return {\n contentType: defaultContentType,\n value: defaultType?.value ?? fallback,\n };\n}\n","import {\n buildAngularParamsFilterExpression,\n type ClientBuilder,\n type ClientDependenciesBuilder,\n type ClientFooterBuilder,\n type ClientHeaderBuilder,\n type ContextSpec,\n generateBodyOptions,\n generateFormDataAndUrlEncodedFunction,\n generateMutatorConfig,\n generateMutatorRequestOptions,\n generateOptions,\n generateVerbImports,\n type GeneratorVerbOptions,\n getAngularFilteredParamsHelperBody,\n getDefaultContentType,\n getEnumImplementation,\n getIsBodyVerb,\n type GetterProp,\n GetterPropType,\n isBoolean,\n makeRouteSafe,\n pascal,\n toObjectString,\n} from '@orval/core';\n\nimport { ANGULAR_HTTP_CLIENT_DEPENDENCIES } from './constants';\nimport {\n HTTP_CLIENT_OBSERVE_OPTIONS_TEMPLATE,\n HTTP_CLIENT_OPTIONS_TEMPLATE,\n THIRD_PARAMETER_TEMPLATE,\n} from './types';\nimport {\n createReturnTypesRegistry,\n getRelevantVerbOptionsForTag,\n getSchemaOutputTypeRef,\n isPrimitiveType,\n isZodSchemaOutput,\n} from './utils';\n\n/**\n * Narrowed context for `generateHttpClientImplementation`.\n *\n * The implementation only reads `context.output`, so callers don't need\n * to supply a full `ContextSpec` (which also requires `target`, `workspace`,\n * `spec`, etc.).\n *\n * @remarks\n * This keeps the call sites lightweight when `http-resource.ts` delegates\n * mutation generation back to the shared `HttpClient` implementation builder.\n */\nexport interface HttpClientGeneratorContext {\n route: string;\n context: Pick<ContextSpec, 'output'>;\n}\n\n// NOTE: Module-level singleton — reset() is called at the start of each\n// header builder invocation (generateAngularHeader). Must stay in sync with\n// the generation lifecycle.\nconst returnTypesRegistry = createReturnTypesRegistry();\n\nconst hasSchemaImport = (\n imports: readonly { name: string }[],\n typeName: string | undefined,\n): boolean =>\n typeName != undefined && imports.some((imp) => imp.name === typeName);\n\nconst getSchemaValueRef = (typeName: string): string =>\n typeName === 'Error' ? 'ErrorSchema' : typeName;\n\n/**\n * Partition props into the three buckets used by per-content-type overload\n * rendering: required non-body params, body params, and optional non-body\n * params. The body always sits between the required and optional non-body\n * params so that the per-content-type overloads can insert a required\n * `accept` literal immediately after the body without violating TS1016\n * (required parameter cannot follow an optional one).\n */\nconst partitionPropsForMultiContent = (\n props: readonly GetterProp[],\n): {\n requiredNonBody: GetterProp[];\n body: GetterProp[];\n optionalNonBody: GetterProp[];\n} => {\n const requiredNonBody: GetterProp[] = [];\n const body: GetterProp[] = [];\n const optionalNonBody: GetterProp[] = [];\n for (const p of props) {\n if (p.type === GetterPropType.BODY) {\n body.push(p);\n } else if (p.required && !p.default) {\n requiredNonBody.push(p);\n } else {\n optionalNonBody.push(p);\n }\n }\n return { requiredNonBody, body, optionalNonBody };\n};\n\nconst getContentTypeReturnType = (\n contentType: string | undefined,\n value: string,\n): string => {\n if (!contentType) return value;\n if (contentType.includes('json') || contentType.includes('+json')) {\n return value;\n }\n if (contentType.startsWith('text/') || contentType.includes('xml')) {\n return 'string';\n }\n return 'Blob';\n};\n\n/**\n * Returns the dependency list required by the Angular `HttpClient` generator.\n *\n * These imports are consumed by Orval's generic dependency-import emitter when\n * composing the generated Angular client file.\n *\n * @returns The Angular `HttpClient` dependency descriptors used during import generation.\n */\nexport const getAngularDependencies: ClientDependenciesBuilder = () => [\n ...ANGULAR_HTTP_CLIENT_DEPENDENCIES,\n];\n\n/**\n * Builds the generated TypeScript helper name used for multi-content-type\n * `Accept` header unions.\n *\n * Example: `listPets` -> `ListPetsAccept`.\n *\n * @returns A PascalCase helper type/const name for the operation's `Accept` values.\n */\nexport const getAcceptHelperName = (operationName: string) =>\n `${pascal(operationName)}Accept`;\n\n/**\n * Collects the distinct successful response content types for a single\n * operation.\n *\n * The Angular generators use this to decide whether they need `Accept`\n * overloads or content-type-specific branching logic.\n *\n * @returns A de-duplicated list of response content types, excluding empty entries.\n */\nexport const getUniqueContentTypes = (\n successTypes: GeneratorVerbOptions['response']['types']['success'],\n) => [...new Set(successTypes.map((t) => t.contentType).filter(Boolean))];\n\nconst toAcceptHelperKey = (contentType: string): string =>\n contentType\n .replaceAll(/[^A-Za-z0-9]+/g, '_')\n .replaceAll(/^_+|_+$/g, '')\n .toLowerCase();\n\nconst buildAcceptHelper = (\n operationName: string,\n contentTypes: string[],\n output: ContextSpec['output'],\n): string => {\n const acceptHelperName = getAcceptHelperName(operationName);\n const unionValue = contentTypes\n .map((contentType) => `'${contentType}'`)\n .join(' | ');\n const names = contentTypes.map((contentType) =>\n toAcceptHelperKey(contentType),\n );\n const implementation = getEnumImplementation(\n unionValue,\n names,\n undefined,\n output.override.namingConvention.enum,\n );\n\n return `export type ${acceptHelperName} = typeof ${acceptHelperName}[keyof typeof ${acceptHelperName}];\n\nexport const ${acceptHelperName} = {\n${implementation}} as const;`;\n};\n\n/**\n * Builds the shared `Accept` helper declarations for all operations in the\n * current Angular generation scope.\n *\n * @remarks\n * Helpers are emitted only for operations with more than one successful\n * response content type.\n *\n * @returns Concatenated type/const declarations or an empty string when no helpers are needed.\n */\nexport const buildAcceptHelpers = (\n verbOptions: readonly GeneratorVerbOptions[],\n output: ContextSpec['output'],\n): string =>\n verbOptions\n .flatMap((verbOption) => {\n const contentTypes = getUniqueContentTypes(\n verbOption.response.types.success,\n );\n if (contentTypes.length <= 1) return [];\n\n return [\n buildAcceptHelper(verbOption.operationName, contentTypes, output),\n ];\n })\n .join('\\n\\n');\n\n/**\n * Generates the static header section for Angular `HttpClient` output.\n *\n * Depending on the current generation options this may include:\n * - reusable request option helper types\n * - filtered query-param helper utilities\n * - mutator support types\n * - `Accept` helper unions/constants for multi-content-type operations\n * - the `@Injectable()` service class shell\n *\n * @returns A string containing the prelude and service class opening for the generated file.\n */\nexport const generateAngularHeader: ClientHeaderBuilder = ({\n title,\n isRequestOptions,\n isMutator,\n isGlobalMutator,\n provideIn,\n verbOptions,\n tag,\n output,\n}) => {\n returnTypesRegistry.reset();\n\n const relevantVerbs = getRelevantVerbOptionsForTag(verbOptions, tag);\n // Only emit the shared `filterParams` helper when at least one operation in\n // this file will actually call it. If every operation with queryParams has\n // its own `paramsFilter` mutator, the helper would be dead code.\n const hasBuiltInFilteredQueryParams = relevantVerbs.some(\n (v) => v.queryParams && !v.paramsFilter,\n );\n const acceptHelpers = buildAcceptHelpers(relevantVerbs, output);\n\n return `\n${\n isRequestOptions && !isGlobalMutator\n ? `${HTTP_CLIENT_OPTIONS_TEMPLATE}\n\n${HTTP_CLIENT_OBSERVE_OPTIONS_TEMPLATE}\n\n${hasBuiltInFilteredQueryParams ? getAngularFilteredParamsHelperBody() : ''}`\n : ''\n}\n\n${isRequestOptions && isMutator ? THIRD_PARAMETER_TEMPLATE : ''}\n\n${acceptHelpers}\n\n@Injectable(${provideIn ? `{ providedIn: '${isBoolean(provideIn) ? 'root' : provideIn}' }` : ''})\nexport class ${title} {\n private readonly http = inject(HttpClient);\n`;\n};\n\n/**\n * Generates the closing section for Angular `HttpClient` output.\n *\n * @remarks\n * Besides closing the generated service class, this appends any collected\n * `ClientResult` aliases registered while individual operations were emitted.\n *\n * @returns The footer text for the generated Angular client file.\n */\nexport const generateAngularFooter: ClientFooterBuilder = ({\n operationNames,\n}) => {\n let footer = '};\\n\\n';\n\n const returnTypes = returnTypesRegistry.getFooter(operationNames);\n if (returnTypes) {\n footer += `${returnTypes}\\n`;\n }\n\n return footer;\n};\n\n/**\n * Generates the Angular `HttpClient` method implementation for a single\n * OpenAPI operation.\n *\n * This function is responsible for:\n * - method signatures and overloads\n * - observe-mode branching\n * - multi-content-type `Accept` handling\n * - mutator integration\n * - runtime Zod validation hooks for Angular output\n * - registering the operation's `ClientResult` alias for footer emission\n *\n * @remarks\n * This is the central implementation builder shared by the dedicated\n * `httpClient` mode and the mutation side of Angular `both` / `httpResource`\n * generation.\n *\n * @returns The complete TypeScript method declaration and implementation for the operation.\n */\nexport const generateHttpClientImplementation = (\n {\n headers,\n queryParams,\n operationName,\n response,\n mutator,\n body,\n props,\n verb,\n override,\n formData,\n formUrlEncoded,\n paramsSerializer,\n paramsFilter,\n }: GeneratorVerbOptions,\n { route: _route, context }: HttpClientGeneratorContext,\n) => {\n // Opt-in URL-encoding of path parameters (`urlEncodeParameters`), applied once\n // at the single point the route enters this builder so the mutator config and\n // every inline interpolation below stay consistent. `makeRouteSafe` is not\n // idempotent — applying it more than once double-encodes — so it must run here\n // exactly once and nowhere downstream.\n let route = _route;\n if (context.output.urlEncodeParameters) {\n route = makeRouteSafe(route);\n }\n\n const isRequestOptions = override.requestOptions !== false;\n const isFormData = !override.formData.disabled;\n const isFormUrlEncoded = override.formUrlEncoded !== false;\n const isExactOptionalPropertyTypes =\n !!context.output.tsconfig?.compilerOptions?.exactOptionalPropertyTypes;\n const bodyForm = generateFormDataAndUrlEncodedFunction({\n formData,\n formUrlEncoded,\n body,\n isFormData,\n isFormUrlEncoded,\n });\n\n const dataType = response.definition.success || 'unknown';\n const isPrimitive = isPrimitiveType(dataType);\n const hasSchema = hasSchemaImport(response.imports, dataType);\n const isZodOutput = isZodSchemaOutput(context.output);\n const shouldValidateResponse =\n override.angular.runtimeValidation &&\n isZodOutput &&\n !isPrimitive &&\n hasSchema;\n const parsedDataType = shouldValidateResponse\n ? getSchemaOutputTypeRef(dataType)\n : dataType;\n const getGeneratedResponseType = (\n value: string,\n contentType: string | undefined,\n ): string => {\n if (\n override.angular.runtimeValidation &&\n isZodOutput &&\n !!contentType &&\n (contentType.includes('json') || contentType.includes('+json')) &&\n !isPrimitiveType(value) &&\n hasSchemaImport(response.imports, value)\n ) {\n return getSchemaOutputTypeRef(value);\n }\n\n return getContentTypeReturnType(contentType, value);\n };\n const resultAliasType = mutator\n ? dataType\n : response.types.success.length <= 1\n ? parsedDataType\n : [\n ...new Set(\n response.types.success.map(({ value, contentType }) =>\n getGeneratedResponseType(value, contentType),\n ),\n ),\n ].join(' | ') || parsedDataType;\n const schemaValueRef = shouldValidateResponse\n ? getSchemaValueRef(dataType)\n : dataType;\n // When Zod runtime validation is enabled the emitted method signature exposes\n // `parsedDataType` (e.g. `PetsOutput`) directly instead of a caller-overridable\n // `TData` generic. Casting `Schema.parse(data)` to `TData` is unsound because\n // `TData` can be widened/narrowed by callers while the runtime value is always\n // `PetsOutput`. We therefore drop the cast on the validation path and let the\n // inferred return type flow naturally.\n const validationPipe = shouldValidateResponse\n ? `.pipe(map(data => ${schemaValueRef}.parse(data)))`\n : '';\n const responseValidationPipe = shouldValidateResponse\n ? `.pipe(map(response => response.clone({ body: ${schemaValueRef}.parse(response.body) })))`\n : '';\n const eventValidationPipe = shouldValidateResponse\n ? `.pipe(map(event => event instanceof AngularHttpResponse ? event.clone({ body: ${schemaValueRef}.parse(event.body) }) : event))`\n : '';\n\n returnTypesRegistry.set(\n operationName,\n `export type ${pascal(\n operationName,\n )}ClientResult = NonNullable<${resultAliasType}>`,\n );\n\n if (mutator) {\n const mutatorConfig = generateMutatorConfig({\n route,\n body,\n headers,\n queryParams,\n response,\n verb,\n isFormData,\n isFormUrlEncoded,\n hasSignal: false,\n isExactOptionalPropertyTypes,\n isAngular: true,\n paramsFilter,\n });\n\n const requestOptions = isRequestOptions\n ? generateMutatorRequestOptions(\n override.requestOptions,\n mutator.hasThirdArg,\n )\n : '';\n\n const propsImplementation =\n mutator.bodyTypeName && body.definition\n ? toObjectString(props, 'implementation').replace(\n new RegExp(String.raw`(\\\\w*):\\\\s?${body.definition}`),\n `$1: ${mutator.bodyTypeName}<${body.definition}>`,\n )\n : toObjectString(props, 'implementation');\n\n return ` ${operationName}<TData = ${dataType}>(\\n ${propsImplementation}\\n ${\n isRequestOptions && mutator.hasThirdArg\n ? `options?: ThirdParameter<typeof ${mutator.name}>`\n : ''\n }) {${bodyForm}\n return ${mutator.name}<TData>(\n ${mutatorConfig},\n this.http,\n ${requestOptions});\n }\n `;\n }\n\n const optionsBase = {\n route,\n body,\n headers,\n queryParams,\n response,\n verb,\n requestOptions: override.requestOptions,\n isFormData,\n isFormUrlEncoded,\n paramsSerializer,\n paramsSerializerOptions: override.paramsSerializerOptions,\n paramsFilter,\n isAngular: true,\n isExactOptionalPropertyTypes,\n hasSignal: false,\n } as const;\n\n const propsDefinition = toObjectString(props, 'definition');\n\n const successTypes = response.types.success;\n const uniqueContentTypes = getUniqueContentTypes(successTypes);\n const hasMultipleContentTypes = uniqueContentTypes.length > 1;\n const acceptTypeName = hasMultipleContentTypes\n ? getAcceptHelperName(operationName)\n : undefined;\n\n const needsObserveBranching = isRequestOptions && !hasMultipleContentTypes;\n const angularParamsRef = queryParams ? 'filteredParams' : undefined;\n\n let paramsDeclaration = '';\n if (angularParamsRef && queryParams) {\n const filterExpr = buildAngularParamsFilterExpression({\n paramsExpression: isRequestOptions\n ? '{...params, ...options?.params}'\n : 'params ?? {}',\n requiredNullableParamKeys: queryParams.requiredNullableKeys ?? [],\n preserveRequiredNullables: !!paramsSerializer,\n // Only pass non-primitive params through the built-in `filterParams`\n // when a `paramsSerializer` can legally consume the raw object/array.\n // Without one, Angular's `HttpParams` would stringify it to\n // `[object Object]` and the helper's `unknown` return type is not\n // assignable to `HttpClient`'s params — so keep them filtered out.\n // The `paramsFilter` branch bypasses the built-in helper entirely.\n nonPrimitiveKeys: paramsSerializer\n ? (queryParams.nonPrimitiveKeys ?? [])\n : [],\n paramsFilter,\n // Request-options path uses the shared `filterParams` helper emitted in\n // the file header; the non-request-options path inlines an IIFE.\n useSharedHelper: isRequestOptions,\n });\n paramsDeclaration = paramsSerializer\n ? `const ${angularParamsRef} = ${paramsSerializer.name}(${filterExpr});\\n\\n `\n : `const ${angularParamsRef} = ${filterExpr};\\n\\n `;\n }\n\n const optionsInput = {\n ...optionsBase,\n ...(angularParamsRef ? { angularParamsRef } : {}),\n } as const;\n\n const options = generateOptions(optionsInput);\n\n const defaultContentType = hasMultipleContentTypes\n ? (successTypes.find(\n ({ contentType }) =>\n !!contentType &&\n (contentType.includes('json') || contentType.includes('+json')),\n )?.contentType ?? getDefaultContentType(uniqueContentTypes))\n : (uniqueContentTypes[0] ?? 'application/json');\n\n const jsonSuccessValues = [\n ...new Set(\n successTypes\n .filter(\n ({ contentType }) =>\n !!contentType &&\n (contentType.includes('json') || contentType.includes('+json')),\n )\n .map(({ value }) => value),\n ),\n ];\n\n const jsonReturnType =\n jsonSuccessValues.length > 0 ? jsonSuccessValues.join(' | ') : 'unknown';\n const parsedJsonReturnType =\n jsonSuccessValues.length === 1 &&\n override.angular.runtimeValidation &&\n isZodOutput &&\n !isPrimitiveType(jsonSuccessValues[0]) &&\n hasSchemaImport(response.imports, jsonSuccessValues[0])\n ? getSchemaOutputTypeRef(jsonSuccessValues[0])\n : jsonReturnType;\n\n let jsonValidationPipe = shouldValidateResponse\n ? `.pipe(map(data => ${schemaValueRef}.parse(data)))`\n : '';\n if (\n hasMultipleContentTypes &&\n !shouldValidateResponse &&\n override.angular.runtimeValidation &&\n isZodOutput &&\n jsonSuccessValues.length === 1\n ) {\n const jsonType = jsonSuccessValues[0];\n const jsonIsPrimitive = isPrimitiveType(jsonType);\n const jsonHasSchema = hasSchemaImport(response.imports, jsonType);\n if (!jsonIsPrimitive && jsonHasSchema) {\n const jsonSchemaRef = getSchemaValueRef(jsonType);\n jsonValidationPipe = `.pipe(map(data => ${jsonSchemaRef}.parse(data)))`;\n }\n }\n\n const textSuccessTypes = successTypes.filter(\n ({ contentType, value }) =>\n !!contentType &&\n (contentType.startsWith('text/') ||\n contentType.includes('xml') ||\n value === 'string'),\n );\n const blobSuccessTypes = successTypes.filter(\n ({ contentType }) =>\n !!contentType &&\n !contentType.includes('json') &&\n !contentType.includes('+json') &&\n !contentType.startsWith('text/') &&\n !contentType.includes('xml'),\n );\n const multiReturnMembers = [\n parsedJsonReturnType,\n ...(textSuccessTypes.length > 0 ? ['string'] : []),\n ...(blobSuccessTypes.length > 0 ? ['Blob'] : []),\n ];\n const uniqueMultiReturnMembers = [...new Set(multiReturnMembers)];\n const refinedMultiImplementationReturnType = `Observable<${uniqueMultiReturnMembers.join(' | ')}>`;\n\n const observeOptions = needsObserveBranching\n ? {\n body: generateOptions({ ...optionsInput, angularObserve: 'body' }),\n events: generateOptions({ ...optionsInput, angularObserve: 'events' }),\n response: generateOptions({\n ...optionsInput,\n angularObserve: 'response',\n }),\n }\n : undefined;\n\n const isModelType =\n dataType !== 'Blob' && dataType !== 'string' && dataType !== 'ArrayBuffer';\n // When the response goes through a Zod runtime validation pipe the runtime\n // value is fixed to `parsedDataType` (e.g. `PetsOutput`), so we avoid\n // exposing a caller-overridable `<TData>` generic on that path.\n const hasTDataGeneric =\n isModelType && !hasMultipleContentTypes && !shouldValidateResponse;\n let functionName = operationName;\n if (hasTDataGeneric) {\n functionName += `<TData = ${parsedDataType}>`;\n }\n\n let contentTypeOverloads = '';\n if (hasMultipleContentTypes && isRequestOptions) {\n const {\n requiredNonBody: requiredNonBodyProps,\n body: bodyProps,\n optionalNonBody: optionalNonBodyProps,\n } = partitionPropsForMultiContent(props);\n const requiredNonBodyPart = requiredNonBodyProps\n .map((p) => p.definition)\n .join(',\\n ');\n const bodyPart = bodyProps.map((p) => p.definition).join(',\\n ');\n // Per-content-type overloads have a required `accept` literal after the body.\n // TS1016 forbids required params after optional ones, so optional body params\n // are rendered as positionally required (`name: Type | undefined`) here.\n // The `?` is removed via an identifier-anchored replacement so we only\n // affect the parameter's own optional marker, never a `?:` that may appear\n // elsewhere in the type (e.g. mapped or conditional types).\n const bodyOverloadPart = bodyProps\n .map((p) => {\n const optionalMarker = `${p.name}?:`;\n if (!p.required && p.definition.startsWith(optionalMarker)) {\n const required = `${p.name}:${p.definition.slice(optionalMarker.length)}`;\n return /\\bundefined\\b/.test(required)\n ? required\n : `${required} | undefined`;\n }\n return p.definition;\n })\n .join(',\\n ');\n const optionalNonBodyPart = optionalNonBodyProps\n .map((p) => p.definition)\n .join(',\\n ');\n const branchOverloads = successTypes\n .filter(({ contentType }) => !!contentType)\n .map(({ contentType, value }) => {\n const returnType = getGeneratedResponseType(value, contentType);\n const overloadParams = [\n requiredNonBodyPart,\n bodyOverloadPart,\n `accept: '${contentType}'`,\n optionalNonBodyPart,\n ]\n .filter(Boolean)\n .join(',\\n ');\n\n return `${operationName}(${overloadParams}, options?: HttpClientOptions): Observable<${returnType}>;`;\n })\n .join('\\n ');\n const allParams = [\n requiredNonBodyPart,\n bodyPart,\n `accept?: ${acceptTypeName ?? 'string'}`,\n optionalNonBodyPart,\n ]\n .filter(Boolean)\n .join(',\\n ');\n contentTypeOverloads = `${branchOverloads}\\n ${operationName}(${allParams}, options?: HttpClientOptions): ${refinedMultiImplementationReturnType};`;\n }\n\n const observeOverloads =\n isRequestOptions && !hasMultipleContentTypes\n ? `${functionName}(${propsDefinition} options?: HttpClientBodyOptions): Observable<${hasTDataGeneric ? 'TData' : parsedDataType}>;\\n ${functionName}(${propsDefinition} options?: HttpClientEventOptions): Observable<HttpEvent<${hasTDataGeneric ? 'TData' : parsedDataType}>>;\\n ${functionName}(${propsDefinition} options?: HttpClientResponseOptions): Observable<AngularHttpResponse<${hasTDataGeneric ? 'TData' : parsedDataType}>>;`\n : '';\n\n const overloads = contentTypeOverloads || observeOverloads;\n\n const observableDataType = hasTDataGeneric ? 'TData' : parsedDataType;\n const singleImplementationReturnType = isRequestOptions\n ? `Observable<${observableDataType} | HttpEvent<${observableDataType}> | AngularHttpResponse<${observableDataType}>>`\n : `Observable<${observableDataType}>`;\n\n if (hasMultipleContentTypes) {\n const bodyIdentifier = generateBodyOptions(\n body,\n isFormData,\n isFormUrlEncoded,\n );\n const deleteBodyOption =\n verb === 'delete' && bodyIdentifier ? `body: ${bodyIdentifier}` : '';\n const buildOptionsObject = (responseType: string) => `{\n ...options,\n responseType: '${responseType}',\n headers,\n ${angularParamsRef ? `params: ${angularParamsRef},` : ''}\n ${deleteBodyOption ? `${deleteBodyOption},` : ''}\n }`;\n const buildHttpClientCall = (typeArg: string, optionsObject: string) =>\n getIsBodyVerb(verb) && verb !== 'delete'\n ? `this.http.${verb}${typeArg}(\\`${route}\\`, ${bodyIdentifier ?? 'undefined'}, ${optionsObject})`\n : `this.http.${verb}${typeArg}(\\`${route}\\`, ${optionsObject})`;\n\n const {\n requiredNonBody: requiredNonBodyImplProps,\n body: bodyImplProps,\n optionalNonBody: optionalNonBodyImplProps,\n } = partitionPropsForMultiContent(props);\n const requiredNonBodyImplPart = requiredNonBodyImplProps\n .map((p) => p.implementation)\n .join(',\\n ');\n const bodyImplPart = bodyImplProps\n .map((p) => p.implementation)\n .join(',\\n ');\n const optionalNonBodyImplPart = optionalNonBodyImplProps\n .map((p) => p.implementation)\n .join(',\\n ');\n const allParams = [\n requiredNonBodyImplPart,\n bodyImplPart,\n `accept: ${acceptTypeName ?? 'string'} = '${defaultContentType}'`,\n optionalNonBodyImplPart,\n ]\n .filter(Boolean)\n .join(',\\n ');\n\n return ` ${overloads}\n ${operationName}(\n ${allParams},\n ${isRequestOptions ? 'options?: HttpClientOptions' : ''}\n ): ${refinedMultiImplementationReturnType} {${bodyForm}\n ${paramsDeclaration}const headers = options?.headers instanceof HttpHeaders\n ? options.headers.set('Accept', accept)\n : { ...(options?.headers ?? {}), Accept: accept };\n\n if (accept.includes('json') || accept.includes('+json')) {\n return ${buildHttpClientCall(`<${parsedJsonReturnType}>`, buildOptionsObject('json'))}${jsonValidationPipe};\n } else if (accept.startsWith('text/') || accept.includes('xml')) {\n return ${buildHttpClientCall('', buildOptionsObject('text'))} as Observable<any>;\n }${\n blobSuccessTypes.length > 0\n ? ` else {\n return ${buildHttpClientCall('', buildOptionsObject('blob'))} as Observable<Blob>;\n }`\n : `\n\n return ${buildHttpClientCall(`<${parsedJsonReturnType}>`, buildOptionsObject('json'))}${jsonValidationPipe};`\n }\n }\n`;\n }\n\n // Angular's HttpClient overloads conflict when both a type generic and an\n // injected `responseType` (e.g. `'blob'` / `'text'`) are present — omit the\n // generic and cast instead. JSON primitives still need `<string>` (etc.) because\n // they use the default JSON overload without a custom `responseType`.\n const hasInjectedResponseType = (optionsArgument: string) =>\n typeof optionsArgument === 'string' &&\n /\\bresponseType:\\s*['\"]/.test(optionsArgument);\n const httpCallExpr = (\n optionsArgument: string,\n observeKind: 'body' | 'events' | 'response',\n ) => {\n if (hasInjectedResponseType(optionsArgument)) {\n const castType =\n observeKind === 'events'\n ? `HttpEvent<${observableDataType}>`\n : observeKind === 'response'\n ? `AngularHttpResponse<${observableDataType}>`\n : observableDataType;\n return `this.http.${verb}(${optionsArgument}) as Observable<${castType}>`;\n }\n\n return `this.http.${verb}<${observableDataType}>(${optionsArgument})`;\n };\n const observeImplementation = isRequestOptions\n ? `${paramsDeclaration}if (options?.observe === 'events') {\n return ${httpCallExpr(observeOptions?.events ?? options, 'events')}${eventValidationPipe};\n }\n\n if (options?.observe === 'response') {\n return ${httpCallExpr(observeOptions?.response ?? options, 'response')}${responseValidationPipe};\n }\n\n return ${httpCallExpr(observeOptions?.body ?? options, 'body')}${validationPipe};`\n : `return ${httpCallExpr(options, 'body')}${validationPipe};`;\n\n return ` ${overloads}\n ${functionName}(\n ${toObjectString(props, 'implementation')} ${\n isRequestOptions ? `options?: HttpClientObserveOptions` : ''\n }): ${singleImplementationReturnType} {${bodyForm}\n ${observeImplementation}\n }\n`;\n};\n\n/**\n * Orval client builder entry point for Angular `HttpClient` output.\n *\n * It normalizes imports needed for runtime validation, delegates the actual\n * method implementation to `generateHttpClientImplementation`, and returns the\n * generated code plus imports for the current operation.\n *\n * @returns The generated implementation fragment and imports for one operation.\n */\nexport const generateAngular: ClientBuilder = (verbOptions, options) => {\n const isZodOutput = isZodSchemaOutput(options.context.output);\n const responseType = verbOptions.response.definition.success;\n const isPrimitiveResponse = isPrimitiveType(responseType);\n const shouldUseRuntimeValidation =\n verbOptions.override.angular.runtimeValidation && isZodOutput;\n\n const normalizedVerbOptions = (() => {\n if (!shouldUseRuntimeValidation) return verbOptions;\n\n let result: GeneratorVerbOptions = {\n ...verbOptions,\n response: {\n ...verbOptions.response,\n imports: verbOptions.response.imports.map((imp) => ({\n ...imp,\n values: true,\n })),\n },\n };\n\n if (\n !isPrimitiveResponse &&\n hasSchemaImport(result.response.imports, responseType)\n ) {\n result = {\n ...result,\n response: {\n ...result.response,\n imports: [\n ...result.response.imports.map((imp) =>\n imp.name === responseType ? { ...imp, values: true } : imp,\n ),\n { name: getSchemaOutputTypeRef(responseType) },\n ],\n },\n };\n }\n\n const successTypes = result.response.types.success;\n const uniqueContentTypes = [\n ...new Set(successTypes.map((t) => t.contentType).filter(Boolean)),\n ];\n if (uniqueContentTypes.length > 1) {\n const jsonSchemaNames = [\n ...new Set(\n successTypes\n .filter(\n ({ contentType }) =>\n !!contentType &&\n (contentType.includes('json') || contentType.includes('+json')),\n )\n .map(({ value }) => value),\n ),\n ];\n if (jsonSchemaNames.length === 1) {\n const jsonType = jsonSchemaNames[0];\n const jsonIsPrimitive = isPrimitiveType(jsonType);\n if (\n !jsonIsPrimitive &&\n hasSchemaImport(result.response.imports, jsonType)\n ) {\n result = {\n ...result,\n response: {\n ...result.response,\n imports: [\n ...result.response.imports.map((imp) =>\n imp.name === jsonType ? { ...imp, values: true } : imp,\n ),\n { name: getSchemaOutputTypeRef(jsonType) },\n ],\n },\n };\n }\n }\n }\n\n return result;\n })();\n\n const implementation = generateHttpClientImplementation(\n normalizedVerbOptions,\n options,\n );\n\n const imports = [\n ...generateVerbImports(normalizedVerbOptions),\n ...(implementation.includes('.pipe(map(')\n ? [{ name: 'map', values: true, importPath: 'rxjs' }]\n : []),\n ];\n\n return { implementation, imports };\n};\n\n/**\n * Returns the footer aliases collected for the provided operation names.\n *\n * The Angular generators use these aliases to expose stable `ClientResult`\n * helper types such as `ListPetsClientResult`.\n *\n * @returns Concatenated `ClientResult` aliases for the requested operation names.\n */\nexport const getHttpClientReturnTypes = (operationNames: string[]) =>\n returnTypesRegistry.getFooter(operationNames);\n\n/**\n * Clears the module-level return type registry used during Angular client\n * generation.\n *\n * This must be called at the start of each generation pass to avoid leaking\n * aliases across files or tags.\n *\n * @returns Nothing.\n */\nexport const resetHttpClientReturnTypes = () => {\n returnTypesRegistry.reset();\n};\n\nexport { generateAngularTitle } from './utils';\n","import {\n buildAngularParamsFilterExpression,\n type ClientBuilder,\n type ClientDependenciesBuilder,\n type ClientExtraFilesBuilder,\n type ClientFooterBuilder,\n type ClientHeaderBuilder,\n type ContextSpec,\n conventionName,\n escapeRegExp,\n generateDependencyImports,\n generateFormDataAndUrlEncodedFunction,\n generateMutatorImports,\n type GeneratorDependency,\n type GeneratorImport,\n type GeneratorVerbOptions,\n getAngularFilteredParamsHelperBody,\n getFileInfo,\n getFullRoute,\n GetterPropType,\n isObject,\n isSyntheticDefaultImportsAllow,\n jsDoc,\n kebab,\n makeRouteSafe,\n type NormalizedOutputOptions,\n type OpenApiInfoObject,\n OutputMode,\n pascal,\n type ResReqTypesValue,\n toObjectString,\n upath,\n} from '@orval/core';\n\nimport {\n ANGULAR_HTTP_CLIENT_DEPENDENCIES,\n ANGULAR_HTTP_RESOURCE_DEPENDENCIES,\n} from './constants';\nimport {\n buildAcceptHelpers,\n generateHttpClientImplementation,\n getAcceptHelperName,\n getHttpClientReturnTypes,\n getUniqueContentTypes,\n type HttpClientGeneratorContext,\n resetHttpClientReturnTypes,\n} from './http-client';\nimport {\n buildServiceClassOpen,\n type ClientOverride,\n createReturnTypesRegistry,\n createRouteRegistry,\n getDefaultSuccessType,\n getRelevantVerbOptionsForTag,\n getSchemaOutputTypeRef,\n isMutationVerb,\n isPrimitiveType,\n isRetrievalVerb,\n isZodSchemaOutput,\n} from './utils';\n\n/**\n * Reads the per-operation angular client override from the orval config.\n *\n * Mirrors the pattern used by `@orval/query` for `operationQueryOptions`:\n * ```ts\n * override: {\n * operations: {\n * myPostSearch: { angular: { retrievalClient: 'httpResource' } },\n * }\n * }\n * ```\n */\ninterface AngularOperationOverride {\n readonly client?: ClientOverride;\n readonly httpResource?: AngularHttpResourceOptionsConfig;\n}\n\ninterface AngularHttpResourceOptionsConfig {\n defaultValue?: unknown;\n debugName?: string;\n injector?: string;\n equal?: string;\n}\n\nconst isAngularHttpResourceOptions = (\n value: unknown,\n): value is AngularHttpResourceOptionsConfig =>\n value === undefined ||\n (isObject(value) &&\n (value.defaultValue === undefined ||\n typeof value.defaultValue === 'string' ||\n typeof value.defaultValue === 'number' ||\n typeof value.defaultValue === 'boolean' ||\n value.defaultValue === null ||\n Array.isArray(value.defaultValue) ||\n isObject(value.defaultValue)) &&\n (value.debugName === undefined || typeof value.debugName === 'string') &&\n (value.injector === undefined || typeof value.injector === 'string') &&\n (value.equal === undefined || typeof value.equal === 'string'));\n\nconst isAngularOperationOverride = (\n value: unknown,\n): value is AngularOperationOverride =>\n value !== undefined &&\n typeof value === 'object' &&\n value !== null &&\n (!('client' in value) ||\n value.client === 'httpClient' ||\n value.client === 'httpResource' ||\n value.client === 'both') &&\n (!('httpResource' in value) ||\n isAngularHttpResourceOptions(value.httpResource));\n\nconst getClientOverride = (\n verbOption: GeneratorVerbOptions,\n): ClientOverride | undefined => {\n const angular =\n verbOption.override.operations[verbOption.operationId]?.angular;\n\n return isAngularOperationOverride(angular) ? angular.client : undefined;\n};\n\n/**\n * Resolves the effective `httpResource` option override for an operation.\n *\n * Operation-level configuration takes precedence over the global\n * `override.angular.httpResource` block while still inheriting unspecified\n * values from the global configuration.\n *\n * @returns The merged resource options for the operation, or `undefined` when no override exists.\n */\nconst getHttpResourceOverride = (\n verbOption: GeneratorVerbOptions,\n output: NormalizedOutputOptions,\n): AngularHttpResourceOptionsConfig | undefined => {\n const operationAngular =\n verbOption.override.operations[verbOption.operationId]?.angular;\n const operationOverride = isAngularOperationOverride(operationAngular)\n ? operationAngular.httpResource\n : undefined;\n const angularOverride = output.override.angular as unknown;\n const globalOverride =\n isObject(angularOverride) &&\n 'httpResource' in angularOverride &&\n isAngularHttpResourceOptions(angularOverride.httpResource)\n ? angularOverride.httpResource\n : undefined;\n\n if (globalOverride === undefined) return operationOverride;\n if (operationOverride === undefined) return globalOverride;\n\n return {\n ...globalOverride,\n ...operationOverride,\n };\n};\n\n// NOTE: Module-level singletons — reset() is called by the header builder\n// (generateAngularHttpResourceHeader) at the start of each generation pass.\nconst resourceReturnTypesRegistry = createReturnTypesRegistry();\n\n/** @internal Exported for testing only */\nexport const routeRegistry = createRouteRegistry();\n\nconst getVerbOptionsRecord = (\n verbOptions: readonly GeneratorVerbOptions[],\n): Record<string, GeneratorVerbOptions> =>\n Object.fromEntries(\n verbOptions.map((verbOption) => [verbOption.operationId, verbOption]),\n );\n\nconst getPrimaryTag = (verbOption: GeneratorVerbOptions): string =>\n kebab(verbOption.tags[0] ?? 'default');\n\nconst hasRetrievalOperations = (\n verbOptions: Record<string, GeneratorVerbOptions>,\n): boolean =>\n Object.values(verbOptions).some((verbOption) =>\n isRetrievalVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n );\n\nconst getHeader = (\n option: false | ((info: OpenApiInfoObject) => string | string[]),\n info: OpenApiInfoObject | undefined,\n): string => {\n if (!option || !info) {\n return '';\n }\n\n const header = option(info);\n\n return Array.isArray(header) ? jsDoc({ description: header }) : header;\n};\n\nconst mergeDependencies = (\n deps: GeneratorDependency[],\n): GeneratorDependency[] => {\n const merged = new Map<\n string,\n { exports: GeneratorImport[]; dependency: string }\n >();\n\n for (const dep of deps) {\n const existing = merged.get(dep.dependency);\n if (!existing) {\n merged.set(dep.dependency, {\n exports: [...dep.exports],\n dependency: dep.dependency,\n });\n continue;\n }\n\n for (const exp of dep.exports) {\n if (\n !existing.exports.some(\n (current) => current.name === exp.name && current.alias === exp.alias,\n )\n ) {\n existing.exports.push(exp);\n }\n }\n }\n\n return [...merged.values()];\n};\n\nconst cloneDependencies = (\n deps: readonly GeneratorDependency[],\n): GeneratorDependency[] =>\n deps.map((dep) => ({\n ...dep,\n exports: [...dep.exports],\n }));\n\n/**\n * Returns the merged dependency list required when Angular `httpResource`\n * output coexists with Angular `HttpClient` service generation.\n *\n * This is used for pure `httpResource` mode as well as mixed generation paths\n * that still need Angular common HTTP symbols and service helpers.\n *\n * @returns The de-duplicated dependency descriptors for Angular resource generation.\n */\nexport const getAngularHttpResourceDependencies: ClientDependenciesBuilder =\n () =>\n mergeDependencies([\n ...ANGULAR_HTTP_CLIENT_DEPENDENCIES,\n ...ANGULAR_HTTP_RESOURCE_DEPENDENCIES,\n ]);\n\n/**\n * Returns only the dependencies required by standalone generated resource\n * files, such as the sibling `*.resource.ts` output used in `both` mode.\n *\n * @returns The dependency descriptors required by resource-only files.\n */\nexport const getAngularHttpResourceOnlyDependencies: ClientDependenciesBuilder =\n () => cloneDependencies(ANGULAR_HTTP_RESOURCE_DEPENDENCIES);\n\nconst isResponseText = (\n contentType: string | undefined,\n dataType: string,\n): boolean => {\n if (dataType === 'string') return true;\n if (!contentType) return false;\n return contentType.startsWith('text/') || contentType.includes('xml');\n};\n\nconst isResponseArrayBuffer = (contentType: string | undefined): boolean => {\n if (!contentType) return false;\n return (\n contentType.includes('application/octet-stream') ||\n contentType.includes('application/pdf')\n );\n};\n\nconst isResponseBlob = (\n contentType: string | undefined,\n isBlob: boolean,\n): boolean => {\n if (isBlob) return true;\n if (!contentType) return false;\n return contentType.startsWith('image/') || contentType.includes('blob');\n};\n\ntype HttpResourceFactoryName =\n | 'httpResource'\n | 'httpResource.text'\n | 'httpResource.arrayBuffer'\n | 'httpResource.blob';\n\nconst HTTP_RESOURCE_OPTIONS_TYPE_NAME = 'OrvalHttpResourceOptions';\n\nconst getHttpResourceFactory = (\n response: { readonly isBlob: boolean },\n contentType: string | undefined,\n dataType: string,\n): HttpResourceFactoryName => {\n if (isResponseText(contentType, dataType)) return 'httpResource.text';\n if (isResponseBlob(contentType, response.isBlob)) return 'httpResource.blob';\n if (isResponseArrayBuffer(contentType)) return 'httpResource.arrayBuffer';\n return 'httpResource';\n};\n\nconst getHttpResourceRawType = (factory: HttpResourceFactoryName): string => {\n switch (factory) {\n case 'httpResource.text': {\n return 'string';\n }\n case 'httpResource.arrayBuffer': {\n return 'ArrayBuffer';\n }\n case 'httpResource.blob': {\n return 'Blob';\n }\n default: {\n return 'unknown';\n }\n }\n};\n\nconst getTypeWithoutDefault = (definition: string): string => {\n const match = /^([^:]+):\\s*(.+)$/.exec(definition);\n if (!match) return definition;\n return match[2].replace(/\\s*=\\s*.*$/, '').trim();\n};\n\nconst getDefaultValueFromImplementation = (\n implementation: string,\n): string | undefined => {\n const match = /=\\s*(.+)$/.exec(implementation);\n return match ? match[1].trim() : undefined;\n};\n\ninterface SignalProp {\n readonly definition: string;\n readonly implementation: string;\n}\n\nconst withSignal = (\n prop: GeneratorVerbOptions['props'][number],\n options: { readonly hasDefault?: boolean } = {},\n): SignalProp => {\n const type = getTypeWithoutDefault(prop.definition);\n const derivedDefault =\n getDefaultValueFromImplementation(prop.implementation) !== undefined ||\n prop.default !== undefined;\n const hasDefault = options.hasDefault ?? derivedDefault;\n const nameMatch = /^([^:]+):/.exec(prop.definition);\n const namePart = nameMatch ? nameMatch[1] : prop.name;\n const hasOptionalMark = namePart.includes('?');\n const optional = prop.required && !hasDefault && !hasOptionalMark ? '' : '?';\n const definition = `${prop.name}${optional}: Signal<${type}>`;\n\n return {\n definition,\n implementation: definition,\n };\n};\n\nconst buildSignalProps = (\n props: GeneratorVerbOptions['props'],\n params: GeneratorVerbOptions['params'],\n): GeneratorVerbOptions['props'] => {\n const paramDefaults = new Map<string, boolean>();\n for (const param of params) {\n const hasDefault =\n getDefaultValueFromImplementation(param.implementation) !== undefined ||\n param.default !== undefined;\n paramDefaults.set(param.name, hasDefault);\n }\n\n return props.map((prop) => {\n switch (prop.type) {\n case GetterPropType.NAMED_PATH_PARAMS: {\n return {\n ...prop,\n name: 'pathParams',\n definition: `pathParams: Signal<${prop.schema.name}>`,\n implementation: `pathParams: Signal<${prop.schema.name}>`,\n };\n }\n case GetterPropType.PARAM:\n case GetterPropType.QUERY_PARAM:\n case GetterPropType.BODY:\n case GetterPropType.HEADER: {\n const hasDefault =\n prop.type === GetterPropType.PARAM\n ? (paramDefaults.get(prop.name) ?? false)\n : undefined;\n const signalProp = withSignal(prop, { hasDefault });\n return {\n ...prop,\n definition: signalProp.definition,\n implementation: signalProp.implementation,\n };\n }\n default: {\n return prop;\n }\n }\n });\n};\n\nconst applySignalRoute = (\n route: string,\n params: GeneratorVerbOptions['params'],\n useNamedParams: boolean,\n): string => {\n let updatedRoute = route;\n for (const param of params) {\n const template = '${' + param.name + '}';\n const defaultValue = getDefaultValueFromImplementation(\n param.implementation,\n );\n let replacement: string;\n if (useNamedParams) {\n replacement =\n defaultValue === undefined\n ? '${pathParams().' + param.name + '}'\n : '${pathParams()?.' + param.name + ' ?? ' + defaultValue + '}';\n } else {\n replacement =\n defaultValue === undefined\n ? '${' + param.name + '()}'\n : '${' + param.name + '?.() ?? ' + defaultValue + '}';\n }\n updatedRoute = updatedRoute.replaceAll(template, replacement);\n }\n return updatedRoute;\n};\n\ninterface ResourceRequest {\n readonly bodyForm: string;\n readonly request: string;\n readonly isUrlOnly: boolean;\n}\n\nconst buildResourceRequest = (\n {\n verb,\n body,\n headers,\n queryParams,\n paramsSerializer,\n paramsFilter,\n override,\n formData,\n formUrlEncoded,\n }: GeneratorVerbOptions,\n route: string,\n): ResourceRequest => {\n const isFormData = !override.formData.disabled;\n const isFormUrlEncoded = override.formUrlEncoded !== false;\n\n const bodyForm = generateFormDataAndUrlEncodedFunction({\n formData,\n formUrlEncoded,\n body,\n isFormData,\n isFormUrlEncoded,\n });\n\n const hasFormData = isFormData && body.formData;\n const hasFormUrlEncoded = isFormUrlEncoded && body.formUrlEncoded;\n\n const bodyAccess = body.definition\n ? body.isOptional\n ? `${body.implementation}?.()`\n : `${body.implementation}()`\n : undefined;\n const bodyValue = hasFormData\n ? 'formData'\n : hasFormUrlEncoded\n ? 'formUrlEncoded'\n : bodyAccess;\n\n const paramsAccess = queryParams ? 'params?.()' : undefined;\n const headersAccess = headers ? 'headers?.()' : undefined;\n const filteredParamsValue = paramsAccess\n ? buildAngularParamsFilterExpression({\n paramsExpression: `${paramsAccess} ?? {}`,\n requiredNullableParamKeys: queryParams?.requiredNullableKeys ?? [],\n preserveRequiredNullables: !!paramsSerializer,\n // Only pass non-primitive params through the built-in `filterParams`\n // when a `paramsSerializer` can legally consume the raw object/array.\n // Without one, the helper's `unknown` return type is not assignable\n // to `HttpClient`'s params, so keep them filtered out. The\n // `paramsFilter` branch bypasses the built-in helper entirely.\n nonPrimitiveKeys: paramsSerializer\n ? (queryParams?.nonPrimitiveKeys ?? [])\n : [],\n paramsFilter,\n useSharedHelper: true,\n })\n : undefined;\n const paramsValue = paramsAccess\n ? paramsSerializer\n ? `params?.() ? ${paramsSerializer.name}(${filteredParamsValue}) : undefined`\n : filteredParamsValue\n : undefined;\n\n const isGet = verb === 'get';\n const hasExtras = !isGet || !!bodyValue || !!paramsValue || !!headersAccess;\n const isUrlOnly = !hasExtras && !bodyForm;\n\n const requestLines = [\n `url: \\`${route}\\``,\n isGet ? undefined : `method: '${verb.toUpperCase()}'`,\n bodyValue ? `body: ${bodyValue}` : undefined,\n paramsValue ? `params: ${paramsValue}` : undefined,\n headersAccess ? `headers: ${headersAccess}` : undefined,\n ].filter(Boolean);\n\n const request = isUrlOnly\n ? `\\`${route}\\``\n : `({\\n ${requestLines.join(',\\n ')}\\n })`;\n\n return {\n bodyForm,\n request,\n isUrlOnly,\n };\n};\n\nconst getHttpResourceResponseImports = (\n response: GeneratorVerbOptions['response'],\n): GeneratorImport[] => {\n const successDefinition = response.definition.success;\n if (!successDefinition) return [];\n\n return response.imports.filter((imp) => {\n const name = imp.alias ?? imp.name;\n const pattern = new RegExp(String.raw`\\b${escapeRegExp(name)}\\b`, 'g');\n return pattern.test(successDefinition);\n });\n};\n\nconst getHttpResourceVerbImports = (\n verbOptions: GeneratorVerbOptions,\n output: NormalizedOutputOptions,\n): GeneratorImport[] => {\n const { response, body, queryParams, props, headers, params } = verbOptions;\n const responseImports = isZodSchemaOutput(output)\n ? [\n ...getHttpResourceResponseImports(response).map((imp) => ({\n ...imp,\n values: true,\n })),\n ...getHttpResourceResponseImports(response)\n .filter((imp) => !isPrimitiveType(imp.name))\n .map((imp) => ({ name: getSchemaOutputTypeRef(imp.name) })),\n ]\n : getHttpResourceResponseImports(response);\n\n return [\n ...responseImports,\n ...body.imports,\n ...props.flatMap((prop) =>\n prop.type === GetterPropType.NAMED_PATH_PARAMS\n ? [{ name: prop.schema.name }]\n : [],\n ),\n ...(queryParams ? [{ name: queryParams.schema.name }] : []),\n ...(headers ? [{ name: headers.schema.name }] : []),\n ...params.flatMap<GeneratorImport>(({ imports }) => imports),\n { name: 'map', values: true, importPath: 'rxjs' },\n ];\n};\n\nconst getParseExpression = (\n response: {\n readonly imports: readonly { name: string; isZodSchema?: boolean }[];\n readonly definition: { readonly success?: string };\n },\n factory: HttpResourceFactoryName,\n output: NormalizedOutputOptions,\n responseTypeOverride?: string,\n): string | undefined => {\n if (factory !== 'httpResource') return undefined;\n\n // Explicit isZodSchema flag on imports (forward-compatible)\n const zodSchema = response.imports.find((imp) => imp.isZodSchema);\n if (zodSchema) return `${zodSchema.name}.parse`;\n\n // Check if runtime validation is disabled\n if (!output.override.angular.runtimeValidation) return undefined;\n\n // Auto-detect: when schemas.type === 'zod', use the response type as the schema name\n if (!isZodSchemaOutput(output)) return undefined;\n\n const responseType = responseTypeOverride ?? response.definition.success;\n if (!responseType) return undefined;\n if (isPrimitiveType(responseType)) return undefined;\n\n // Verify a matching import exists (the response type name resolves to a zod schema)\n const hasMatchingImport = response.imports.some(\n (imp) => imp.name === responseType,\n );\n if (!hasMatchingImport) return undefined;\n\n return `${responseType}.parse`;\n};\n\n/**\n * Builds the literal option entries that Orval injects into generated\n * `httpResource()` calls.\n *\n * This merges user-supplied generator configuration such as `defaultValue` or\n * `debugName` with automatically derived runtime-validation hooks like\n * `parse: Schema.parse`.\n *\n * @returns The option entries plus metadata about whether a configured default value exists.\n */\nconst buildHttpResourceOptionsLiteral = (\n verbOption: GeneratorVerbOptions,\n factory: HttpResourceFactoryName,\n output: NormalizedOutputOptions,\n responseTypeOverride?: string,\n): { entries: string[]; hasDefaultValue: boolean } => {\n const override = getHttpResourceOverride(verbOption, output);\n const parseExpression = getParseExpression(\n verbOption.response,\n factory,\n output,\n responseTypeOverride,\n );\n\n const defaultValueLiteral =\n override?.defaultValue === undefined\n ? undefined\n : JSON.stringify(override.defaultValue);\n\n const optionEntries = [\n parseExpression ? `parse: ${parseExpression}` : undefined,\n defaultValueLiteral ? `defaultValue: ${defaultValueLiteral}` : undefined,\n override?.debugName === undefined\n ? undefined\n : `debugName: ${JSON.stringify(override.debugName)}`,\n override?.injector ? `injector: ${override.injector}` : undefined,\n override?.equal ? `equal: ${override.equal}` : undefined,\n ].filter((value): value is string => value !== undefined);\n\n return {\n entries: optionEntries,\n hasDefaultValue: defaultValueLiteral !== undefined,\n };\n};\n\nconst appendArgument = (args: string, argument: string): string => {\n const normalizedArgs = args.trim().replace(/,\\s*$/, '');\n\n return normalizedArgs.length > 0\n ? `${normalizedArgs},\n ${argument}`\n : argument;\n};\n\nconst normalizeOptionalParametersForRequiredTrailingArg = (\n args: string,\n): string =>\n args.replaceAll(/(\\w+)\\?:\\s*([^,\\n]+)(,?)/g, '$1: $2 | undefined$3');\n\nconst buildHttpResourceOptionsArgument = (\n valueType: string,\n rawType: string,\n options: { readonly requiresDefaultValue: boolean },\n omitParse = false,\n): string => {\n const baseType = `${HTTP_RESOURCE_OPTIONS_TYPE_NAME}<${valueType}, ${rawType}${omitParse ? ', true' : ''}>`;\n return options.requiresDefaultValue\n ? `options: ${baseType} & { defaultValue: NoInfer<${valueType}> }`\n : `options?: ${baseType}`;\n};\n\nconst buildHttpResourceOptionsExpression = (\n configuredEntries: readonly string[],\n): string | undefined => {\n if (configuredEntries.length === 0) {\n return 'options';\n }\n\n return `{\n ...(options ?? {}),\n ${configuredEntries.join(',\\n ')}\n }`;\n};\n\nconst buildHttpResourceFunctionSignatures = (\n resourceName: string,\n args: string,\n valueType: string,\n rawType: string,\n hasConfiguredDefaultValue: boolean,\n omitParse = false,\n): string => {\n if (hasConfiguredDefaultValue) {\n return `export function ${resourceName}(${appendArgument(\n args,\n buildHttpResourceOptionsArgument(\n valueType,\n rawType,\n {\n requiresDefaultValue: false,\n },\n omitParse,\n ),\n )}): HttpResourceRef<${valueType}>`;\n }\n\n const overloadArgs = appendArgument(\n normalizeOptionalParametersForRequiredTrailingArg(args),\n buildHttpResourceOptionsArgument(\n valueType,\n rawType,\n {\n requiresDefaultValue: true,\n },\n omitParse,\n ),\n );\n const implementationArgs = appendArgument(\n args,\n buildHttpResourceOptionsArgument(\n valueType,\n rawType,\n {\n requiresDefaultValue: false,\n },\n omitParse,\n ),\n );\n\n return `export function ${resourceName}(${overloadArgs}): HttpResourceRef<${valueType}>;\nexport function ${resourceName}(${implementationArgs}): HttpResourceRef<${valueType} | undefined>`;\n};\n\n/**\n * Generates a single Angular `httpResource` helper function for an operation.\n *\n * The generated output handles signal-wrapped parameters, route interpolation,\n * request-body construction, content-type branching, runtime validation, and\n * optional mutator integration when the mutator is compatible with standalone\n * resource functions.\n *\n * @remarks\n * This function emits overloads when content negotiation or caller-supplied\n * `defaultValue` support requires multiple signatures.\n *\n * @returns A string containing the complete generated resource helper.\n */\nconst buildHttpResourceFunction = (\n verbOption: GeneratorVerbOptions,\n route: string,\n output: NormalizedOutputOptions,\n): string => {\n const { operationName, response, props, params, mutator } = verbOption;\n\n const dataType = response.definition.success || 'unknown';\n const omitParse = isZodSchemaOutput(output);\n const responseSchemaImports = getHttpResourceResponseImports(response);\n const hasResponseSchemaImport = responseSchemaImports.some(\n (imp) => imp.name === dataType,\n );\n const resourceName = `${operationName}Resource`;\n const parsedDataType =\n omitParse &&\n output.override.angular.runtimeValidation &&\n !isPrimitiveType(dataType) &&\n hasResponseSchemaImport\n ? getSchemaOutputTypeRef(dataType)\n : dataType;\n const successTypes = response.types.success;\n const overallReturnType =\n successTypes.length <= 1\n ? parsedDataType\n : [\n ...new Set(\n successTypes.map((type) =>\n getHttpResourceGeneratedResponseType(\n type.value,\n type.contentType,\n responseSchemaImports,\n output,\n ),\n ),\n ),\n ].join(' | ') || parsedDataType;\n resourceReturnTypesRegistry.set(\n operationName,\n `export type ${pascal(\n operationName,\n )}ResourceResult = NonNullable<${overallReturnType}>`,\n );\n const uniqueContentTypes = getUniqueContentTypes(successTypes);\n const defaultSuccess = getDefaultSuccessType(successTypes, dataType);\n const jsonContentType = successTypes.find((type) =>\n type.contentType.includes('json'),\n )?.contentType;\n const preferredContentType = jsonContentType ?? defaultSuccess.contentType;\n const resourceFactory = getHttpResourceFactory(\n response,\n preferredContentType,\n dataType,\n );\n\n const hasNamedParams = props.some(\n (prop) => prop.type === GetterPropType.NAMED_PATH_PARAMS,\n );\n const signalRoute = applySignalRoute(route, params, hasNamedParams);\n // Opt-in URL-encoding of path parameters (`urlEncodeParameters`). Must run\n // AFTER `applySignalRoute`: that step matches the literal `${param}` template\n // to rewrite it to its signal form (e.g. `${param()}`), so encoding first\n // would stop the substitution from matching. Wrapping the already-rewritten\n // form yields `${encodeURIComponent(String(param()))}`, which is correct.\n const encodedRoute = output.urlEncodeParameters\n ? makeRouteSafe(signalRoute)\n : signalRoute;\n\n const signalProps = buildSignalProps(props, params);\n const args = toObjectString(signalProps, 'implementation');\n\n const { bodyForm, request, isUrlOnly } = buildResourceRequest(\n verbOption,\n encodedRoute,\n );\n\n if (uniqueContentTypes.length > 1) {\n const defaultContentType = jsonContentType ?? defaultSuccess.contentType;\n const acceptTypeName = getAcceptHelperName(operationName);\n const requiredProps = signalProps.filter(\n (_, index) => props[index]?.required && !props[index]?.default,\n );\n const optionalProps = signalProps.filter(\n (_, index) => !props[index]?.required || props[index]?.default,\n );\n const requiredPart = requiredProps\n .map((prop) => prop.implementation)\n .join(',\\n ');\n const optionalPart = optionalProps\n .map((prop) => prop.implementation)\n .join(',\\n ');\n const getBranchReturnType = (type: ResReqTypesValue) =>\n getHttpResourceGeneratedResponseType(\n type.value,\n type.contentType,\n responseSchemaImports,\n output,\n );\n const unionReturnType = [\n ...new Set(\n successTypes\n .filter((type) => type.contentType)\n .map((type) => getBranchReturnType(type)),\n ),\n ].join(' | ');\n const getBranchRawType = (type: ResReqTypesValue): string =>\n getHttpResourceRawType(\n getHttpResourceFactory(response, type.contentType, type.value),\n );\n // Per-branch options types (one per distinct content-type branch).\n // Deduped so text-like content types (text/plain, application/xml) that\n // share the same factory don't produce duplicate union members.\n const branchOptionsTypes = [\n ...new Set(\n successTypes\n .filter((type) => type.contentType)\n .map((type) =>\n buildBranchOptionsType(\n getBranchReturnType(type),\n getBranchRawType(type),\n omitParse,\n ),\n ),\n ),\n ];\n // The implementation signature accepts the union of branch option types.\n // This keeps each overload's narrow `options` assignable to the\n // implementation signature (required for TS overload compatibility) while\n // preventing mismatched `defaultValue`/`parse` across content types.\n const implementationOptionsType = branchOptionsTypes.join(' | ');\n // Per-accept overloads pin `options` to the branch-specific value/raw\n // types so `defaultValue` / `parse` type-check against the actual content\n // type — e.g. passing a `string` default to the `application/json`\n // overload is now a type error.\n const branchOverloads = successTypes\n .filter((type) => type.contentType)\n .map((type) => {\n const returnType = getBranchReturnType(type);\n const overloadArgs = [\n requiredPart,\n `accept: '${type.contentType}'`,\n optionalPart,\n `options?: ${buildBranchOptionsType(returnType, getBranchRawType(type), omitParse)}`,\n ]\n .filter(Boolean)\n .join(',\\n ');\n\n return `export function ${resourceName}(${overloadArgs}): HttpResourceRef<${returnType} | undefined>;`;\n })\n .join('\\n');\n const implementationArgsWithDefault = [\n requiredPart,\n `accept: ${acceptTypeName} = '${defaultContentType}'`,\n optionalPart,\n `options?: ${implementationOptionsType}`,\n ]\n .filter(Boolean)\n .join(',\\n ');\n\n const getBranchOptions = (type?: ResReqTypesValue) => {\n if (!type) {\n return `options as ${buildBranchOptionsType(unionReturnType, 'unknown', omitParse)}`;\n }\n\n const factory = getHttpResourceFactory(\n response,\n type.contentType,\n type.value,\n );\n const branchOptions = buildHttpResourceOptionsLiteral(\n verbOption,\n factory,\n output,\n type.value,\n );\n const branchOptionsExpression = buildHttpResourceOptionsExpression(\n branchOptions.entries,\n );\n\n return `${branchOptionsExpression ?? 'options'} as unknown as ${buildBranchOptionsType(\n getBranchReturnType(type),\n getHttpResourceRawType(factory),\n omitParse,\n )}`;\n };\n\n const jsonType = successTypes.find(\n (type) =>\n type.contentType.includes('json') || type.contentType.includes('+json'),\n );\n const textType = successTypes.find((type) =>\n isResponseText(type.contentType, type.value),\n );\n const arrayBufferType = successTypes.find((type) =>\n isResponseArrayBuffer(type.contentType),\n );\n const blobType = successTypes.find((type) =>\n isResponseBlob(type.contentType, response.isBlob),\n );\n\n // Fallback path for unknown accept values must match the branch the\n // default `accept` argument targets — pick the success type whose content\n // type is `defaultContentType`, then fall back to the remaining branches\n // in the same priority order as the runtime dispatch above.\n const fallbackType =\n successTypes.find((type) => type.contentType === defaultContentType) ??\n jsonType ??\n textType ??\n arrayBufferType ??\n blobType;\n\n const buildFallbackReturn = (type: ResReqTypesValue): string => {\n const factory = getHttpResourceFactory(\n response,\n type.contentType,\n type.value,\n );\n const returnType =\n factory === 'httpResource'\n ? getBranchReturnType(type)\n : getHttpResourceRawType(factory);\n return `return ${factory}<${returnType}>(() => ({\n ...normalizedRequest,\n headers,\n }), ${getBranchOptions(type)});`;\n };\n\n const fallbackReturn = fallbackType\n ? buildFallbackReturn(fallbackType)\n : `return httpResource<${parsedDataType}>(() => ({\n ...normalizedRequest,\n headers,\n }), ${getBranchOptions()});`;\n\n // Default-accept overload (when `accept` is omitted): narrow `options` to\n // the branch the runtime falls back to, so callers that skip `accept`\n // still get branch-specific typing instead of the broad options union.\n const defaultOverloadOptionsType = fallbackType\n ? buildBranchOptionsType(\n getBranchReturnType(fallbackType),\n getBranchRawType(fallbackType),\n omitParse,\n )\n : implementationOptionsType;\n const defaultOverloadReturnType = fallbackType\n ? getBranchReturnType(fallbackType)\n : unionReturnType;\n const defaultOverloadArgs = [\n requiredPart,\n optionalPart,\n `options?: ${defaultOverloadOptionsType}`,\n ]\n .filter(Boolean)\n .join(',\\n ');\n\n const normalizeRequest = isUrlOnly\n ? `const normalizedRequest: HttpResourceRequest = { url: request };`\n : `const normalizedRequest: HttpResourceRequest = request;`;\n\n return `/**\n * @experimental httpResource is experimental (Angular v19.2+)\n */\n${branchOverloads}\nexport function ${resourceName}(\n ${defaultOverloadArgs}\n ): HttpResourceRef<${defaultOverloadReturnType} | undefined>;\nexport function ${resourceName}(\n ${implementationArgsWithDefault}\n): HttpResourceRef<${unionReturnType} | undefined> {\n ${bodyForm ? `${bodyForm};` : ''}\n const request = ${request};\n ${normalizeRequest}\n const headers = normalizedRequest.headers instanceof HttpHeaders\n ? normalizedRequest.headers.set('Accept', accept)\n : { ...(normalizedRequest.headers ?? {}), Accept: accept };\n\n if (accept.includes('json') || accept.includes('+json')) {\n return httpResource<${jsonType ? getBranchReturnType(jsonType) : parsedDataType}>(() => ({\n ...normalizedRequest,\n headers,\n }), ${getBranchOptions(jsonType)});\n }\n\n if (accept.startsWith('text/') || accept.includes('xml')) {\n return httpResource.text<string>(() => ({\n ...normalizedRequest,\n headers,\n }), ${getBranchOptions(textType)});\n }\n\n ${\n arrayBufferType\n ? `if (accept.includes('octet-stream') || accept.includes('pdf')) {\n return httpResource.arrayBuffer<ArrayBuffer>(() => ({\n ...normalizedRequest,\n headers,\n }), ${getBranchOptions(arrayBufferType)});\n }\n\n `\n : ''\n }${fallbackReturn}\n}\n`;\n }\n\n const resourceOptions = buildHttpResourceOptionsLiteral(\n verbOption,\n resourceFactory,\n output,\n );\n const rawType = getHttpResourceRawType(resourceFactory);\n const resourceValueType = resourceOptions.hasDefaultValue\n ? parsedDataType\n : `${parsedDataType} | undefined`;\n const functionSignatures = buildHttpResourceFunctionSignatures(\n resourceName,\n args,\n parsedDataType,\n rawType,\n resourceOptions.hasDefaultValue,\n omitParse,\n );\n const implementationArgs = appendArgument(\n args,\n buildHttpResourceOptionsArgument(\n parsedDataType,\n rawType,\n {\n requiresDefaultValue: false,\n },\n omitParse,\n ),\n );\n const optionsExpression = buildHttpResourceOptionsExpression(\n resourceOptions.entries,\n );\n const resourceCallOptions = optionsExpression ? `, ${optionsExpression}` : '';\n\n // HttpClient-style mutators expect (config, httpClient) — incompatible with\n // standalone httpResource functions which have no HttpClient instance.\n // Only apply mutators that accept a single argument (request config only).\n const isResourceCompatibleMutator =\n mutator !== undefined && !mutator.hasSecondArg;\n const returnExpression = isResourceCompatibleMutator\n ? `${mutator.name}(request)`\n : 'request';\n\n if (isUrlOnly && !isResourceCompatibleMutator) {\n return `/**\n * @experimental httpResource is experimental (Angular v19.2+)\n */\n${functionSignatures};\nexport function ${resourceName}(${implementationArgs}): HttpResourceRef<${resourceValueType}> {\n return ${resourceFactory}<${parsedDataType}>(() => ${request}${resourceCallOptions});\n}\n`;\n }\n\n return `/**\n * @experimental httpResource is experimental (Angular v19.2+)\n */\n${functionSignatures};\nexport function ${resourceName}(${implementationArgs}): HttpResourceRef<${resourceValueType}> {\n return ${resourceFactory}<${parsedDataType}>(() => {\n ${bodyForm ? `${bodyForm};` : ''}\n const request = ${request};\n return ${returnExpression};\n }${resourceCallOptions});\n}\n`;\n};\n\nconst buildHttpResourceOptionsUtilities = (omitParse: boolean): string => `\nexport type ${HTTP_RESOURCE_OPTIONS_TYPE_NAME}<TValue, TRaw = unknown, TOmitParse extends boolean = ${omitParse}> = TOmitParse extends true\n ? Omit<HttpResourceOptions<TValue, TRaw>, 'parse'>\n : HttpResourceOptions<TValue, TRaw>;\n`;\n\nconst getContentTypeReturnType = (\n contentType: string | undefined,\n value: string,\n): string => {\n if (!contentType) return value;\n if (contentType.includes('json') || contentType.includes('+json')) {\n return value;\n }\n if (contentType.startsWith('text/') || contentType.includes('xml')) {\n return 'string';\n }\n if (isResponseArrayBuffer(contentType)) {\n return 'ArrayBuffer';\n }\n return 'Blob';\n};\n\nconst getHttpResourceGeneratedResponseType = (\n value: string,\n contentType: string | undefined,\n responseImports: readonly { name: string }[],\n output: NormalizedOutputOptions,\n): string => {\n if (\n isZodSchemaOutput(output) &&\n output.override.angular.runtimeValidation &&\n !!contentType &&\n (contentType.includes('json') || contentType.includes('+json')) &&\n !isPrimitiveType(value) &&\n responseImports.some((imp) => imp.name === value)\n ) {\n return getSchemaOutputTypeRef(value);\n }\n\n return getContentTypeReturnType(contentType, value);\n};\n\nconst buildBranchOptionsType = (\n valueType: string,\n rawType: string,\n omitParse: boolean,\n) =>\n `${HTTP_RESOURCE_OPTIONS_TYPE_NAME}<${valueType}, ${rawType}${omitParse ? ', true' : ''}>`;\n\nconst buildResourceStateUtilities = (): string => `\n/**\n * Utility type for httpResource results with status tracking.\n * Inspired by @angular-architects/ngrx-toolkit withResource pattern.\n *\n * Uses \\`globalThis.Error\\` to avoid collision with API model types named \\`Error\\`.\n */\nexport interface ResourceState<T> {\n readonly value: Signal<T | undefined>;\n readonly status: Signal<ResourceStatus>;\n readonly error: Signal<globalThis.Error | undefined>;\n readonly isLoading: Signal<boolean>;\n readonly hasValue: () => boolean;\n readonly reload: () => boolean;\n}\n\n/**\n * Wraps an HttpResourceRef to expose a consistent ResourceState interface.\n * Useful when integrating with NgRx SignalStore via withResource().\n */\nexport function toResourceState<T>(ref: HttpResourceRef<T>): ResourceState<T> {\n return {\n value: ref.value,\n status: ref.status,\n error: ref.error,\n isLoading: ref.isLoading,\n hasValue: () => ref.hasValue(),\n reload: () => ref.reload(),\n };\n}\n`;\n\n/**\n * Generates the header section for Angular `httpResource` output.\n *\n * @remarks\n * Resource functions are emitted in the header phase because their final shape\n * depends on the full set of operations in scope, including generated `Accept`\n * helpers and any shared mutation service methods.\n *\n * @returns The generated header, resource helpers, optional mutation service class, and resource result aliases.\n */\nexport const generateHttpResourceHeader: ClientHeaderBuilder = ({\n title,\n isRequestOptions,\n isMutator,\n isGlobalMutator,\n provideIn,\n output,\n verbOptions,\n tag,\n}) => {\n resetHttpClientReturnTypes();\n resourceReturnTypesRegistry.reset();\n\n // When the output is emitted per-tag (modes: `tags`, `tags-split`) each file\n // must only reference operations that belong to the current tag — otherwise\n // the shared header duplicates helpers across every tag file and pulls in\n // type names the file-local `imports` filter never sees, producing missing\n // schema imports in the generated output.\n const relevantVerbOptions = getRelevantVerbOptionsForTag(verbOptions, tag);\n\n const retrievals = relevantVerbOptions.filter((verbOption) =>\n isRetrievalVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n );\n // Emit the shared `filterParams` helper only when at least one retrieval\n // with query params lacks its own `paramsFilter` mutator — otherwise the\n // helper would be dead code.\n const hasBuiltInFilteredQueryParams = retrievals.some(\n (verbOption) => !!verbOption.queryParams && !verbOption.paramsFilter,\n );\n const filterParamsHelper = hasBuiltInFilteredQueryParams\n ? `\\n${getAngularFilteredParamsHelperBody()}\\n`\n : '';\n const resources = retrievals\n .map((verbOption) => {\n const fullRoute = routeRegistry.get(\n verbOption.operationName,\n verbOption.route,\n );\n return buildHttpResourceFunction(verbOption, fullRoute, output);\n })\n .join('\\n');\n const resourceTypes = resourceReturnTypesRegistry.getFooter(\n retrievals.map((verbOption) => verbOption.operationName),\n );\n\n const mutations = relevantVerbOptions.filter((verbOption) =>\n isMutationVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n );\n const acceptHelpers = buildAcceptHelpers(\n [...retrievals, ...mutations],\n output,\n );\n // Mutations need the built-in helper only when at least one mutation lacks\n // its own `paramsFilter`. If the resource section already emits the helper\n // for retrievals, we suppress the mutation-side emission to avoid duplication.\n const hasMutationBuiltInFilteredQueryParams = mutations.some(\n (verbOption) => !!verbOption.queryParams && !verbOption.paramsFilter,\n );\n\n const mutationImplementation = mutations\n .map((verbOption) => {\n const fullRoute = routeRegistry.get(\n verbOption.operationName,\n verbOption.route,\n );\n const generatorOptions: HttpClientGeneratorContext = {\n route: fullRoute,\n context: { output },\n };\n\n return generateHttpClientImplementation(verbOption, generatorOptions);\n })\n .join('\\n');\n\n const classImplementation = mutationImplementation\n ? `\n${buildServiceClassOpen({\n title,\n isRequestOptions,\n isMutator,\n isGlobalMutator,\n provideIn,\n hasQueryParams:\n hasMutationBuiltInFilteredQueryParams && !hasBuiltInFilteredQueryParams,\n})}\n${mutationImplementation}\n};\n`\n : '';\n\n return `${buildHttpResourceOptionsUtilities(isZodSchemaOutput(output))}${filterParamsHelper}${acceptHelpers ? `${acceptHelpers}\\n\\n` : ''}${resources}${classImplementation}${resourceTypes ? `\\n${resourceTypes}\\n` : ''}`;\n};\n\n/**\n * Generates the footer for Angular `httpResource` output.\n *\n * The footer appends any registered `ClientResult` aliases coming from shared\n * `HttpClient` mutation methods and the resource-state helper utilities emitted\n * for generated Angular resources.\n *\n * @returns The footer text for the generated Angular resource file.\n */\nexport const generateHttpResourceFooter: ClientFooterBuilder = ({\n operationNames,\n}) => {\n const clientTypes = getHttpClientReturnTypes(operationNames);\n const utilities = buildResourceStateUtilities();\n\n return `${clientTypes ? `${clientTypes}\\n` : ''}${utilities}`;\n};\n\n/**\n * Per-operation builder used during Angular `httpResource` generation.\n *\n * Unlike the `HttpClient` builder, the actual implementation body is emitted in\n * the header phase after all operations are known. This function mainly records\n * the resolved route and returns the imports required by the current operation.\n *\n * @returns An empty implementation plus the imports required by the operation.\n */\nexport const generateHttpResourceClient: ClientBuilder = (\n verbOptions,\n options,\n) => {\n routeRegistry.set(verbOptions.operationName, options.route);\n const imports = getHttpResourceVerbImports(\n verbOptions,\n options.context.output,\n );\n\n return { implementation: '\\n', imports };\n};\n\nconst buildHttpResourceFile = (\n verbOptions: Record<string, GeneratorVerbOptions>,\n output: NormalizedOutputOptions,\n context: ContextSpec,\n) => {\n resourceReturnTypesRegistry.reset();\n\n const retrievals = Object.values(verbOptions).filter((verbOption) =>\n isRetrievalVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n );\n\n // Emit the shared `filterParams` helper only when at least one retrieval\n // with query params lacks its own `paramsFilter` mutator — otherwise the\n // helper would be dead code.\n const hasBuiltInFilteredQueryParams = retrievals.some(\n (verbOption) => !!verbOption.queryParams && !verbOption.paramsFilter,\n );\n const filterParamsHelper = hasBuiltInFilteredQueryParams\n ? `\\n${getAngularFilteredParamsHelperBody()}\\n`\n : '';\n\n const resources = retrievals\n .map((verbOption) => {\n const fullRoute = getFullRoute(\n verbOption.route,\n context.spec.servers,\n output.baseUrl,\n );\n return buildHttpResourceFunction(verbOption, fullRoute, output);\n })\n .join('\\n');\n\n const resourceTypes = resourceReturnTypesRegistry.getFooter(\n Object.values(verbOptions).map((verbOption) => verbOption.operationName),\n );\n const utilities = buildResourceStateUtilities();\n const acceptHelpers = buildAcceptHelpers(retrievals, output);\n\n return `${buildHttpResourceOptionsUtilities(isZodSchemaOutput(output))}${filterParamsHelper}${acceptHelpers ? `${acceptHelpers}\\n\\n` : ''}${resources}\\n${resourceTypes ? `${resourceTypes}\\n` : ''}${utilities}`;\n};\n\nconst buildSchemaImportDependencies = (\n output: NormalizedOutputOptions,\n imports: GeneratorImport[],\n relativeSchemasPath: string,\n) => {\n const isZod = isZodSchemaOutput(output);\n const uniqueImports = [\n ...new Map(imports.map((imp) => [imp.name, imp])).values(),\n ];\n\n if (!output.schemas) {\n return [\n {\n exports: isZod\n ? uniqueImports.map((imp) => ({ ...imp, values: true }))\n : uniqueImports,\n dependency: relativeSchemasPath,\n },\n ];\n }\n\n if (!output.indexFiles) {\n return [...uniqueImports].map((imp) => {\n const baseName = imp.schemaName ?? imp.name;\n const name = conventionName(baseName, output.namingConvention);\n const suffix = isZod ? '.zod' : '';\n const importExtension = output.fileExtension.replace(/\\.ts$/, '');\n return {\n exports: isZod ? [{ ...imp, values: true }] : [imp],\n dependency: upath.joinSafe(\n relativeSchemasPath,\n `${name}${suffix}${importExtension}`,\n ),\n };\n });\n }\n\n if (isZod) {\n return [\n {\n exports: uniqueImports.map((imp) => ({ ...imp, values: true })),\n dependency: relativeSchemasPath,\n },\n ];\n }\n\n return [\n {\n exports: uniqueImports,\n dependency: relativeSchemasPath,\n },\n ];\n};\n\nconst getHttpResourceExtraFilePath = (\n output: NormalizedOutputOptions,\n tag?: string,\n): string => {\n const { extension, dirname, filename } = getFileInfo(output.target, {\n extension: output.fileExtension,\n });\n\n switch (output.mode) {\n case OutputMode.TAGS: {\n const normalizedTag = kebab(tag ?? 'default');\n return upath.joinSafe(dirname, `${normalizedTag}.resource${extension}`);\n }\n case OutputMode.TAGS_SPLIT: {\n const normalizedTag = kebab(tag ?? 'default');\n return upath.joinSafe(\n dirname,\n normalizedTag,\n `${normalizedTag}.resource${extension}`,\n );\n }\n default: {\n return upath.joinSafe(dirname, `${filename}.resource${extension}`);\n }\n }\n};\n\nconst getHttpResourceRelativeSchemasPath = (\n output: NormalizedOutputOptions,\n outputPath: string,\n): string => {\n const schemasPath =\n typeof output.schemas === 'string' ? output.schemas : output.schemas?.path;\n\n if (schemasPath) {\n return upath.getRelativeImportPath(\n outputPath,\n getFileInfo(schemasPath).dirname,\n );\n }\n\n const { dirname, filename, extension } = getFileInfo(output.target, {\n extension: output.fileExtension,\n });\n return upath.getRelativeImportPath(\n outputPath,\n upath.joinSafe(dirname, `${filename}.schemas${extension}`),\n output.fileExtension !== '.ts',\n );\n};\n\nconst buildHttpResourceExtraFile = (\n verbOptions: Record<string, GeneratorVerbOptions>,\n outputPath: string,\n output: NormalizedOutputOptions,\n context: ContextSpec,\n header: string,\n) => {\n const implementation = buildHttpResourceFile(verbOptions, output, context);\n const schemaImports = buildSchemaImportDependencies(\n output,\n Object.values(verbOptions)\n .filter((verbOption) =>\n isRetrievalVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n )\n .flatMap((verbOption) => getHttpResourceVerbImports(verbOption, output)),\n getHttpResourceRelativeSchemasPath(output, outputPath),\n );\n\n const dependencies = getAngularHttpResourceOnlyDependencies(false, false);\n const importImplementation = generateDependencyImports(\n implementation,\n [...schemaImports, ...dependencies],\n context.projectName,\n !!output.schemas,\n isSyntheticDefaultImportsAllow(output.tsconfig),\n );\n\n const mutators = Object.values(verbOptions)\n .filter((verbOption) =>\n isRetrievalVerb(\n verbOption.verb,\n verbOption.operationName,\n getClientOverride(verbOption),\n ),\n )\n .flatMap((verbOption) => {\n // Only include mutators that are compatible with httpResource (single-arg).\n // HttpClient mutators that require (config, httpClient) are skipped.\n const resourceMutator =\n verbOption.mutator && !verbOption.mutator.hasSecondArg\n ? verbOption.mutator\n : undefined;\n\n return [\n resourceMutator,\n verbOption.formData,\n verbOption.formUrlEncoded,\n verbOption.paramsSerializer,\n verbOption.paramsFilter,\n ].filter(\n (value): value is NonNullable<typeof value> => value !== undefined,\n );\n });\n\n const mutatorImports =\n mutators.length > 0\n ? generateMutatorImports({\n mutators,\n oneMore: output.mode === OutputMode.TAGS_SPLIT,\n })\n : '';\n\n return {\n content: `${header}${importImplementation}${mutatorImports}${implementation}`,\n path: outputPath,\n };\n};\n\n/**\n * Generates the extra sibling resource files used by Angular `both` mode.\n *\n * @remarks\n * The main generated file keeps the `HttpClient` service class while retrieval\n * resources are emitted into `*.resource.ts` so consumers can opt into both\n * access patterns without mixing the generated surfaces. In tag-based output\n * modes this emits one sibling resource file per generated tag file.\n *\n * @returns One or more extra file descriptors representing generated resource files.\n */\nexport const generateHttpResourceExtraFiles: ClientExtraFilesBuilder = (\n verbOptions,\n output,\n context,\n) => {\n const header = getHeader(output.override.header, context.spec.info);\n\n if (!hasRetrievalOperations(verbOptions)) {\n return Promise.resolve([]);\n }\n\n if (\n output.mode === OutputMode.TAGS ||\n output.mode === OutputMode.TAGS_SPLIT\n ) {\n const groupedVerbOptions = new Map<\n string,\n Record<string, GeneratorVerbOptions>\n >();\n\n for (const verbOption of Object.values(verbOptions)) {\n const tag = getPrimaryTag(verbOption);\n const currentGroup = groupedVerbOptions.get(tag) ?? {};\n currentGroup[verbOption.operationId] = verbOption;\n groupedVerbOptions.set(tag, currentGroup);\n }\n\n return Promise.resolve(\n [...groupedVerbOptions.entries()]\n .filter(([, tagVerbOptions]) => hasRetrievalOperations(tagVerbOptions))\n .map(([tag, tagVerbOptions]) =>\n buildHttpResourceExtraFile(\n tagVerbOptions,\n getHttpResourceExtraFilePath(output, tag),\n output,\n context,\n header,\n ),\n ),\n );\n }\n\n return Promise.resolve([\n buildHttpResourceExtraFile(\n getVerbOptionsRecord(getRelevantVerbOptionsForTag(verbOptions)),\n getHttpResourceExtraFilePath(output),\n output,\n context,\n header,\n ),\n ]);\n};\n\nexport { generateAngularTitle } from './utils';\n","import type { AngularOptions, ClientGeneratorsBuilder } from '@orval/core';\n\nimport {\n generateAngular,\n generateAngularFooter,\n generateAngularHeader,\n generateAngularTitle,\n getAngularDependencies,\n} from './http-client';\nimport {\n generateHttpResourceClient,\n generateHttpResourceExtraFiles,\n generateHttpResourceFooter,\n generateHttpResourceHeader,\n getAngularHttpResourceDependencies,\n} from './http-resource';\n\nexport * from './constants';\nexport * from './http-client';\nexport * from './http-resource';\nexport * from './types';\nexport * from './utils';\n\nconst httpClientBuilder: ClientGeneratorsBuilder = {\n client: generateAngular,\n header: generateAngularHeader,\n dependencies: getAngularDependencies,\n footer: generateAngularFooter,\n title: generateAngularTitle,\n};\n\nconst httpResourceBuilder: ClientGeneratorsBuilder = {\n client: generateHttpResourceClient,\n header: generateHttpResourceHeader,\n dependencies: getAngularHttpResourceDependencies,\n footer: generateHttpResourceFooter,\n title: generateAngularTitle,\n};\n\nconst bothClientBuilder: ClientGeneratorsBuilder = {\n ...httpClientBuilder,\n extraFiles: generateHttpResourceExtraFiles,\n};\n\nexport const builder = () => (options?: AngularOptions) => {\n switch (options?.client) {\n case 'httpResource': {\n return httpResourceBuilder;\n }\n case 'both': {\n return bothClientBuilder;\n }\n default: {\n return httpClientBuilder;\n }\n }\n};\n\nexport default builder;\n"],"mappings":";;AAEA,MAAa,mCAAmC;CAC9C;EACE,SAAS;GACP;IAAE,MAAM;IAAc,QAAQ;GAAK;GACnC;IAAE,MAAM;IA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B,uBAAuB,cAAc,CAAC,EACrE,KAAK,CAAC,KAAK,oBACV,2BACE,gBACA,6BAA6B,QAAQ,GAAG,GACxC,QACA,SACA,MACF,CACF,CACJ;CACF;CAEA,OAAO,QAAQ,QAAQ,CACrB,2BACE,qBAAqB,6BAA6B,WAAW,CAAC,GAC9D,6BAA6B,MAAM,GACnC,QACA,SACA,MACF,CACF,CAAC;AACH;;;ACvlDA,MAAM,oBAA6C;CACjD,QAAQ;CACR,QAAQ;CACR,cAAc;CACd,QAAQ;CACR,OAAO;AACT;AAEA,MAAM,sBAA+C;CACnD,QAAQ;CACR,QAAQ;CACR,cAAc;CACd,QAAQ;CACR,OAAO;AACT;AAEA,MAAM,oBAA6C;CACjD,GAAG;CACH,YAAY;AACd;AAEA,MAAa,iBAAiB,YAA6B;CACzD,QAAQ,SAAS,QAAjB;EACE,KAAK,gBACH,OAAO;EAET,KAAK,QACH,OAAO;EAET,SACE,OAAO;CAEX;AACF"}
package/package.json CHANGED
@@ -1,53 +1,33 @@
1
1
  {
2
2
  "name": "@orval/angular",
3
- "version": "8.15.0",
3
+ "version": "8.16.0",
4
+ "homepage": "https://orval.dev/docs/guides/angular",
5
+ "bugs": {
6
+ "url": "https://github.com/orval-labs/orval/issues"
7
+ },
4
8
  "license": "MIT",
5
9
  "repository": {
6
10
  "type": "git",
7
11
  "url": "git+https://github.com/orval-labs/orval.git",
8
12
  "directory": "packages/angular"
9
13
  },
10
- "homepage": "https://orval.dev/docs/guides/angular",
11
- "bugs": {
12
- "url": "https://github.com/orval-labs/orval/issues"
13
- },
14
- "type": "module",
15
- "types": "./dist/index.d.mts",
16
- "exports": {
17
- ".": {
18
- "development": "./src/index.ts",
19
- "default": "./dist/index.mjs"
20
- },
21
- "./package.json": "./package.json"
22
- },
23
14
  "files": [
24
15
  "dist",
25
16
  "!dist/**/*.d.ts.map",
26
17
  "!dist/**/*.d.mts.map"
27
18
  ],
28
- "scripts": {
29
- "build": "tsdown --config-loader unrun",
30
- "dev": "tsdown --config-loader unrun --watch src",
31
- "lint": "eslint .",
32
- "test": "vitest",
33
- "typecheck": "tsc --noEmit",
34
- "clean": "rimraf .turbo dist",
35
- "nuke": "rimraf .turbo dist node_modules"
19
+ "type": "module",
20
+ "types": "./dist/index.d.mts",
21
+ "exports": {
22
+ ".": "./dist/index.mjs",
23
+ "./package.json": "./package.json"
36
24
  },
37
25
  "dependencies": {
38
- "@orval/core": "8.15.0"
26
+ "@orval/core": "8.16.0"
39
27
  },
40
28
  "devDependencies": {
41
- "eslint": "10.1.0",
42
29
  "rimraf": "6.1.2",
43
- "tsdown": "0.21.9",
44
30
  "typescript": "5.9.3",
45
31
  "vitest": "4.0.18"
46
- },
47
- "publishConfig": {
48
- "exports": {
49
- ".": "./dist/index.mjs",
50
- "./package.json": "./package.json"
51
- }
52
32
  }
53
33
  }