All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.es.refractor.predicates.mjs Maven / Gradle / Ivy

There is a newer version: 1.0.0-alpha.9
Show newest version
import { startsWith } from 'ramda';
import { isStringElement, isObjectElement, toValue } from '@swagger-api/apidom-core';
export const isReferenceLikeElement = element => {
  return isObjectElement(element) && element.hasKey('$ref');
};
export const isServerLikeElement = isObjectElement;
export const isTagLikeElement = isObjectElement;
export const isOpenApiExtension = element => {
  // @ts-ignore
  return isStringElement(element.key) && startsWith('x-', toValue(element.key));
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy