UNPKG

@autorest/modelerfour

Version:
28 lines 1.26 kB
import { CodeModel, ObjectSchema, Property, Parameter, VirtualParameter, Request } from "@autorest/codemodel"; import { Session } from "@autorest/extension-base"; import { ModelerFourOptions } from "../modeler/modelerfour-options"; export declare class Flattener { protected session: Session<CodeModel>; codeModel: CodeModel; options: ModelerFourOptions; threshold: number; recursePayload: boolean; constructor(session: Session<CodeModel>); init(): Promise<this>; getFlattenedParameters(parameter: Parameter, property: Property, path?: Array<Property>): Iterable<VirtualParameter>; /** * This flattens an request's parameters (ie, takes the parameters from an operation and if they are objects will attempt to create inline versions of them) */ flattenPayload(request: Request, parameter: Parameter, schema: ObjectSchema): void; /** * This will flatten models that are marked 'x-ms-client-flatten' * @param schema schema to recursively flatten */ flattenSchema(schema: ObjectSchema): void; process(): CodeModel; private flattenModels; private removeUnusedFlattenModels; private isReferencedByOthers; private flattenPayloads; } //# sourceMappingURL=flattener.d.ts.map