package.es.traversal.visitor.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 { keyMap as keyMapBase, isElement } from '@swagger-api/apidom-core';
// getNodeType :: Node -> String
export const getNodeType = element => {
if (!isElement(element)) {
return undefined;
}
return `${element.element.charAt(0).toUpperCase() + element.element.slice(1)}Element`;
};
export const keyMap = {
JSONSchemaDraft7Element: ['content'],
JSONReferenceElement: ['content'],
LinkDescriptionElement: ['content'],
...keyMapBase
};