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-api-design-systems Show documentation
Show all versions of apidom-ns-api-design-systems Show documentation
API Design Systems 2021-05-07 namespace for ApiDOM.
The newest version!
import { isElement, keyMap as keyMapBase } 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 = {
/**
* API Design Systems 2021-05-07 specification elements.
*/
MainElement: ['content'],
InfoElement: ['content'],
PrincipleElement: ['content'],
StandardElement: ['content'],
ScenarioElement: ['content'],
RequirementElement: ['content'],
StandardIdentifierElement: ['content'],
RequirementLevelElement: [],
...keyMapBase
};