source: node_modules/@swagger-api/apidom-ns-openapi-3-0/es/refractor/predicates.mjs@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 484 bytes
Line 
1import { startsWith } from 'ramda';
2import { isStringElement, isObjectElement, toValue } from '@swagger-api/apidom-core';
3export const isReferenceLikeElement = element => {
4 return isObjectElement(element) && element.hasKey('$ref');
5};
6export const isServerLikeElement = isObjectElement;
7export const isTagLikeElement = isObjectElement;
8export const isOpenApiExtension = element => {
9 // @ts-ignore
10 return isStringElement(element.key) && startsWith('x-', toValue(element.key));
11};
Note: See TracBrowser for help on using the repository browser.