import { ExternalDocumentation } from '../../core/models/common/ExternalDocumentation'; import { IExternalDocumentationParent } from '../../core/models/common/IExternalDocumentationParent'; import { IPropertyParent } from '../../core/models/common/IPropertyParent'; import { Schema } from '../../core/models/common/Schema'; import { OasXML } from './OasXML'; /** * Models an OpenAPI schema. * @author eric.wittmann@gmail.com * @class * @extends Schema */ export declare abstract class OasSchema extends Schema implements IExternalDocumentationParent, IPropertyParent { format: string; title: string; description: string; default_: any; multipleOf: number; maximum: number; exclusiveMaximum: boolean; minimum: number; exclusiveMinimum: boolean; maxLength: number; minLength: number; pattern: string; maxItems: number; minItems: number; uniqueItems: boolean; maxProperties: number; minProperties: number; required: Array; enum_: Array; type: string; items: any; allOf: Array; properties: any; additionalProperties: any; readOnly: boolean; xml: OasXML; externalDocs: ExternalDocumentation; example: any; /** * Creates a child external documentation model. * @return {ExternalDocumentation} */ abstract createExternalDocumentation(): ExternalDocumentation; /** * @see io.apicurio.datamodels.core.models.common.IExternalDocumentationParent#setExternalDocumentation(io.apicurio.datamodels.core.models.common.ExternalDocumentation) * @param {ExternalDocumentation} externalDocs */ setExternalDocumentation(externalDocs: ExternalDocumentation): void; /** * Creates a child XML model. * @return {OasXML} */ abstract createXML(): OasXML; /** * Creates a child schema model. * @return {OasSchema} */ abstract createAllOfSchema(): OasSchema; /** * Creates a child schema model. * @return {OasSchema} */ abstract createItemsSchema(): OasSchema; /** * Creates a child schema model. * @return {OasSchema} */ abstract createAdditionalPropertiesSchema(): OasSchema; /** * @see IPropertyParent#createPropertySchema(String) * @param {string} propertyName * @return {Schema} */ abstract createPropertySchema(propertyName: string): Schema; /** * @see IPropertyParent#getPropertyNames() * @return {string[]} */ getPropertyNames(): Array; /** * @see IPropertyParent#getProperties() * @return {Schema[]} */ getProperties(): Array; /** * @see IPropertyParent#addProperty(String, Schema) * @param {string} propertyName * @param {Schema} schema * @return {Schema} */ addProperty(propertyName: string, schema: Schema): Schema; /** * @see IPropertyParent#removeProperty(String) * @param {string} propertyName * @return {Schema} */ removeProperty(propertyName: string): Schema; /** * @see IPropertyParent#getProperty(String) * @param {string} propertyName * @return {Schema} */ getProperty(propertyName: string): Schema; /** * @see IPropertyParent#getRequiredProperties() * @return {string[]} */ getRequiredProperties(): Array; /** * @see IPropertyParent#setRequiredProperties(List) * @param {string[]} requiredProperties */ setRequiredProperties(requiredProperties: Array): void; /** * @see IPropertyParent#isPropertyRequired(String) * @param {string} propertyName * @return {boolean} */ isPropertyRequired(propertyName: string): boolean; /** * @see IPropertyParent#setPropertyRequired(String) * @param {string} propertyName */ setPropertyRequired(propertyName: string): void; /** * @see IPropertyParent#unsetPropertyRequired(String) * @param {string} propertyName */ unsetPropertyRequired(propertyName: string): void; /** * Returns true if there is a single items schema. * @return {boolean} */ hasItemsSchema(): boolean; /** * Returns true if there is a list of items schemas. Even if there is only one schema in the list. * @return {boolean} */ hasItemsSchemas(): boolean; /** * Returns true if there is an additional properties schema. * @return {boolean} */ hasAdditionalPropertiesSchema(): boolean; /** * Returns true if there is an "additionalProperties" property that is a boolean value and not a schema. * @return {boolean} */ hasAdditionalPropertiesBoolean(): boolean; /** * Adds an AllOf schema. * @param {OasSchema} schema */ addAllOfSchema(schema: OasSchema): void; /** * Removes a allOf schema. * @param {OasSchema} schema */ removeAllOfSchema(schema: OasSchema): void; constructor(); }