UNPKG

@autorest/modelerfour

Version:
33 lines 1.22 kB
import { Session } from "@autorest/extension-base"; import oai3 from "@azure-tools/openapi"; import { ModelerFourOptions } from "modeler/modelerfour-options"; export declare class DuplicateSchemaMerger { private session; private options; constructor(session: Session<oai3.Model>, options: ModelerFourOptions); findDuplicateSchemas(spec: oai3.Model): oai3.Model; /** * Find all the schemas and group by name. * @param spec OpenAPI Spec. * @returns Map of schema name to schema using this name. */ private groupSchemasByName; private findAndRemoveDuplicateSchemas; /** * Find the differences between schemas with the same name and convert those to errors. * @param spec Spec */ private findDifferentSchemasWithSameName; private resolveDuplicateSchemas; private removeDuplicateSchemas; private replaceRefs; /** * Find which schema to remove out of the list of schemas. * @param spec Spec. * @param schemas List of duplicate schema. * @returns Schema to keep and list of schema to remove. */ private findSchemaToRemove; private isObjectOrEnum; } //# sourceMappingURL=duplicate-schema-merger.d.ts.map