import { AbstractCommand } from '../AbstractCommand'; import { Document } from '../../core/models/Document'; import { OasDocument } from '../../openapi/models/OasDocument'; import { OasSchema } from '../../openapi/models/OasSchema'; /** * A command used to add a new definition in a document. Source for the new * definition must be provided. This source will be converted to an OAS * definition object and then added to the data model. * @author eric.wittmann@gmail.com * @extends AbstractCommand * @class */ export declare abstract class AddSchemaDefinitionCommand extends AbstractCommand { _defExisted: boolean; _newDefinitionName: string; _newDefinitionObj: any; constructor(definitionName?: any, obj?: any); /** * @see io.apicurio.datamodels.cmd.ICommand#execute(io.apicurio.datamodels.core.models.Document) * @param {Document} document */ execute(document: Document): void; /** * @see io.apicurio.datamodels.cmd.ICommand#undo(io.apicurio.datamodels.core.models.Document) * @param {Document} document */ undo(document: Document): void; abstract defExists(document: OasDocument): boolean; abstract prepareDocumentForDef(document: OasDocument): any; abstract createSchemaDefinition(document: OasDocument): OasSchema; abstract addDefinition(document: OasDocument, definition: OasSchema): any; abstract removeDefinition(document: OasDocument): any; }