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 | |
---|
1 | import { startsWith } from 'ramda';
|
---|
2 | import { isStringElement, isObjectElement, toValue } from '@swagger-api/apidom-core';
|
---|
3 | export const isReferenceLikeElement = element => {
|
---|
4 | return isObjectElement(element) && element.hasKey('$ref');
|
---|
5 | };
|
---|
6 | export const isServerLikeElement = isObjectElement;
|
---|
7 | export const isTagLikeElement = isObjectElement;
|
---|
8 | export 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.