UNPKG

@typespec/http-client-java

Version:

TypeSpec library for emitting Java client from the TypeSpec REST protocol binding

27 lines 2.03 kB
import { Parameter, Property } from "@autorest/codemodel"; import { SdkHttpOperation, SdkLroServiceMetadata, SdkModelPropertyType, SdkServiceResponseHeader } from "@azure-tools/typespec-client-generator-core"; import { Program, Type, Union } from "@typespec/compiler"; import { HttpOperation } from "@typespec/http"; import { Client as CodeModelClient, ServiceVersion } from "./common/client.js"; import { CodeModel } from "./common/code-model.js"; import { Operation as CodeModelOperation } from "./common/operation.js"; export declare const SPECIAL_HEADER_NAMES: Set<string>; export declare const ORIGIN_API_VERSION = "modelerfour:synthesized/api-version"; export declare const CONTENT_TYPE_KEY = "content-type"; export declare function isKnownContentType(contentTypes: string[]): boolean; export declare function operationIsJsonMergePatch(op: SdkHttpOperation): boolean; export declare function operationIsMultipart(op: SdkHttpOperation): boolean; export declare function operationIsMultipleContentTypes(op: SdkHttpOperation): boolean; export declare function operationRefersUnion(program: Program, op: HttpOperation, cache: Map<Type, Union | null | undefined>): Union | null; export declare function getServiceVersion(client: CodeModelClient | CodeModel): ServiceVersion; export declare function isLroNewPollingStrategy(operation: SdkHttpOperation, lroMetadata: SdkLroServiceMetadata): boolean; export declare function cloneOperationParameter(parameter: Parameter): Parameter; /** * Constructs a list of property path (json path) from the response schema based on the provided property segments. * * @param op the code model operation * @param propertySegments the segments of the property path (json path) to find in the response schema * @returns the list of property path (json path) */ export declare function findResponsePropertySegments(op: CodeModelOperation, propertySegments: (SdkServiceResponseHeader | SdkModelPropertyType)[] | undefined): Property[] | undefined; //# sourceMappingURL=operation-utils.d.ts.map