main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
839 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | exports.__esModule = true;
|
---|
| 4 | exports.isTagLikeElement = exports.isServerLikeElement = exports.isReferenceLikeElement = exports.isOpenApiExtension = void 0;
|
---|
| 5 | var _ramda = require("ramda");
|
---|
| 6 | var _apidomCore = require("@swagger-api/apidom-core");
|
---|
| 7 | const isReferenceLikeElement = element => {
|
---|
| 8 | return (0, _apidomCore.isObjectElement)(element) && element.hasKey('$ref');
|
---|
| 9 | };
|
---|
| 10 | exports.isReferenceLikeElement = isReferenceLikeElement;
|
---|
| 11 | const isServerLikeElement = exports.isServerLikeElement = _apidomCore.isObjectElement;
|
---|
| 12 | const isTagLikeElement = exports.isTagLikeElement = _apidomCore.isObjectElement;
|
---|
| 13 | const isOpenApiExtension = element => {
|
---|
| 14 | // @ts-ignore
|
---|
| 15 | return (0, _apidomCore.isStringElement)(element.key) && (0, _ramda.startsWith)('x-', (0, _apidomCore.toValue)(element.key));
|
---|
| 16 | };
|
---|
| 17 | exports.isOpenApiExtension = isOpenApiExtension; |
---|
Note:
See
TracBrowser
for help on using the repository browser.