![JAR search and dependency download from the Maven repository](/logo.png)
package.es.refractor.visitors.json-schema.index.mjs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apidom-ns-json-schema-draft-7 Show documentation
Show all versions of apidom-ns-json-schema-draft-7 Show documentation
JSON Schema Draft 7 namespace for ApiDOM.
import stampit from 'stampit';
import { always } from 'ramda';
import { BREAK, cloneDeep } from '@swagger-api/apidom-core';
import { FixedFieldsVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-6';
import JSONSchemaElement from "../../../elements/JSONSchema.mjs";
const JSONSchemaVisitor = stampit(FixedFieldsVisitor, FallbackVisitor, {
props: {
specPath: always(['document', 'objects', 'JSONSchema'])
},
methods: {
ObjectElement(objectElement) {
this.element = new JSONSchemaElement();
// @ts-ignore
return FixedFieldsVisitor.compose.methods.ObjectElement.call(this, objectElement);
},
BooleanElement(booleanElement) {
this.element = cloneDeep(booleanElement);
this.element.classes.push('boolean-json-schema');
return BREAK;
}
}
});
export default JSONSchemaVisitor;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy