@redocly/cli 2.36.0 → 2.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES +2 -1
- package/lib/chunks/{R5E5LXAJ.js → 4UQ4YHWW.js} +4 -2
- package/lib/chunks/{UVIPIXTL.js → CPNIO4J3.js} +737 -343
- package/lib/chunks/{35B2IXV3.js → FRVYIHIR.js} +1 -1
- package/lib/chunks/{K6PX5SU7.js → IVW4MILQ.js} +3 -3
- package/lib/chunks/{7PWB3SB5.js → LJUXYC4S.js} +1 -1
- package/lib/chunks/{SBGJND3Q.js → M7TYKZDD.js} +5 -4
- package/lib/chunks/{XTSKVMID.js → QFYLVVG2.js} +5 -4
- package/lib/chunks/{FMJFZCNQ.js → U3LS66ZD.js} +3 -3
- package/lib/chunks/{SHVJYD75.js → YCTAWG2U.js} +1 -1
- package/lib/chunks/Z2I5YXYN.js +20272 -0
- package/lib/chunks/{4QGHXAYN.js → ZHITMP73.js} +3 -2
- package/lib/chunks/ZK3QRKL5.js +129 -0
- package/lib/index.js +12 -11
- package/package.json +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module';
|
|
2
2
|
const require = __createRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
initRules,
|
|
5
|
+
isDefined,
|
|
6
|
+
require_graphql
|
|
7
|
+
} from "./Z2I5YXYN.js";
|
|
3
8
|
import {
|
|
4
9
|
__commonJS,
|
|
5
10
|
__export,
|
|
@@ -55,18 +60,18 @@ var require_pluralize = __commonJS({
|
|
|
55
60
|
return restoreCase(match2, result);
|
|
56
61
|
});
|
|
57
62
|
}
|
|
58
|
-
function sanitizeWord(token, word,
|
|
63
|
+
function sanitizeWord(token, word, rules9) {
|
|
59
64
|
if (!token.length || uncountables.hasOwnProperty(token)) {
|
|
60
65
|
return word;
|
|
61
66
|
}
|
|
62
|
-
var len =
|
|
67
|
+
var len = rules9.length;
|
|
63
68
|
while (len--) {
|
|
64
|
-
var rule =
|
|
69
|
+
var rule = rules9[len];
|
|
65
70
|
if (rule[0].test(word)) return replace(word, rule);
|
|
66
71
|
}
|
|
67
72
|
return word;
|
|
68
73
|
}
|
|
69
|
-
function replaceWord(replaceMap, keepMap,
|
|
74
|
+
function replaceWord(replaceMap, keepMap, rules9) {
|
|
70
75
|
return function(word) {
|
|
71
76
|
var token = word.toLowerCase();
|
|
72
77
|
if (keepMap.hasOwnProperty(token)) {
|
|
@@ -75,15 +80,15 @@ var require_pluralize = __commonJS({
|
|
|
75
80
|
if (replaceMap.hasOwnProperty(token)) {
|
|
76
81
|
return restoreCase(word, replaceMap[token]);
|
|
77
82
|
}
|
|
78
|
-
return sanitizeWord(token, word,
|
|
83
|
+
return sanitizeWord(token, word, rules9);
|
|
79
84
|
};
|
|
80
85
|
}
|
|
81
|
-
function checkWord(replaceMap, keepMap,
|
|
86
|
+
function checkWord(replaceMap, keepMap, rules9, bool) {
|
|
82
87
|
return function(word) {
|
|
83
88
|
var token = word.toLowerCase();
|
|
84
89
|
if (keepMap.hasOwnProperty(token)) return true;
|
|
85
90
|
if (replaceMap.hasOwnProperty(token)) return false;
|
|
86
|
-
return sanitizeWord(token, token,
|
|
91
|
+
return sanitizeWord(token, token, rules9) === token;
|
|
87
92
|
};
|
|
88
93
|
}
|
|
89
94
|
function pluralize3(word, count, inclusive) {
|
|
@@ -3157,18 +3162,18 @@ var require_util = __commonJS({
|
|
|
3157
3162
|
return;
|
|
3158
3163
|
if (typeof schema === "boolean")
|
|
3159
3164
|
return;
|
|
3160
|
-
const
|
|
3165
|
+
const rules9 = self.RULES.keywords;
|
|
3161
3166
|
for (const key in schema) {
|
|
3162
|
-
if (!
|
|
3167
|
+
if (!rules9[key])
|
|
3163
3168
|
checkStrictMode(it2, `unknown keyword: "${key}"`);
|
|
3164
3169
|
}
|
|
3165
3170
|
}
|
|
3166
3171
|
exports.checkUnknownRules = checkUnknownRules;
|
|
3167
|
-
function schemaHasRules(schema,
|
|
3172
|
+
function schemaHasRules(schema, rules9) {
|
|
3168
3173
|
if (typeof schema == "boolean")
|
|
3169
3174
|
return !schema;
|
|
3170
3175
|
for (const key in schema)
|
|
3171
|
-
if (
|
|
3176
|
+
if (rules9[key])
|
|
3172
3177
|
return true;
|
|
3173
3178
|
return false;
|
|
3174
3179
|
}
|
|
@@ -3210,12 +3215,12 @@ var require_util = __commonJS({
|
|
|
3210
3215
|
return str.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
3211
3216
|
}
|
|
3212
3217
|
exports.unescapeJsonPointer = unescapeJsonPointer;
|
|
3213
|
-
function eachItem(
|
|
3214
|
-
if (Array.isArray(
|
|
3215
|
-
for (const x2 of
|
|
3218
|
+
function eachItem(xs2, f) {
|
|
3219
|
+
if (Array.isArray(xs2)) {
|
|
3220
|
+
for (const x2 of xs2)
|
|
3216
3221
|
f(x2);
|
|
3217
3222
|
} else {
|
|
3218
|
-
f(
|
|
3223
|
+
f(xs2);
|
|
3219
3224
|
}
|
|
3220
3225
|
}
|
|
3221
3226
|
exports.eachItem = eachItem;
|
|
@@ -4686,9 +4691,9 @@ var require_validate = __commonJS({
|
|
|
4686
4691
|
}
|
|
4687
4692
|
}
|
|
4688
4693
|
function checkKeywordTypes(it2, ts) {
|
|
4689
|
-
const
|
|
4690
|
-
for (const keyword in
|
|
4691
|
-
const rule =
|
|
4694
|
+
const rules9 = it2.self.RULES.all;
|
|
4695
|
+
for (const keyword in rules9) {
|
|
4696
|
+
const rule = rules9[keyword];
|
|
4692
4697
|
if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it2.schema, rule)) {
|
|
4693
4698
|
const { type } = rule.definition;
|
|
4694
4699
|
if (type.length && !type.some((t2) => hasApplicableType(ts, t2))) {
|
|
@@ -6465,15 +6470,15 @@ var require_core = __commonJS({
|
|
|
6465
6470
|
return errors.map((e2) => `${dataVar}${e2.instancePath} ${e2.message}`).reduce((text, msg) => text + separator + msg);
|
|
6466
6471
|
}
|
|
6467
6472
|
$dataMetaSchema(metaSchema, keywordsJsonPointers) {
|
|
6468
|
-
const
|
|
6473
|
+
const rules9 = this.RULES.all;
|
|
6469
6474
|
metaSchema = JSON.parse(JSON.stringify(metaSchema));
|
|
6470
6475
|
for (const jsonPointer of keywordsJsonPointers) {
|
|
6471
6476
|
const segments = jsonPointer.split("/").slice(1);
|
|
6472
6477
|
let keywords = metaSchema;
|
|
6473
6478
|
for (const seg of segments)
|
|
6474
6479
|
keywords = keywords[seg];
|
|
6475
|
-
for (const key in
|
|
6476
|
-
const rule =
|
|
6480
|
+
for (const key in rules9) {
|
|
6481
|
+
const rule = rules9[key];
|
|
6477
6482
|
if (typeof rule != "object")
|
|
6478
6483
|
continue;
|
|
6479
6484
|
const { $data } = rule.definition;
|
|
@@ -6497,7 +6502,7 @@ var require_core = __commonJS({
|
|
|
6497
6502
|
}
|
|
6498
6503
|
}
|
|
6499
6504
|
}
|
|
6500
|
-
_addSchema(schema, meta, baseId,
|
|
6505
|
+
_addSchema(schema, meta, baseId, validateSchema2 = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
|
|
6501
6506
|
let id;
|
|
6502
6507
|
const { schemaId } = this.opts;
|
|
6503
6508
|
if (typeof schema == "object") {
|
|
@@ -6520,7 +6525,7 @@ var require_core = __commonJS({
|
|
|
6520
6525
|
this._checkUnique(baseId);
|
|
6521
6526
|
this.refs[baseId] = sch;
|
|
6522
6527
|
}
|
|
6523
|
-
if (
|
|
6528
|
+
if (validateSchema2)
|
|
6524
6529
|
this.validateSchema(schema, true);
|
|
6525
6530
|
return sch;
|
|
6526
6531
|
}
|
|
@@ -11085,18 +11090,18 @@ var require_util2 = __commonJS({
|
|
|
11085
11090
|
return;
|
|
11086
11091
|
if (typeof schema === "boolean")
|
|
11087
11092
|
return;
|
|
11088
|
-
const
|
|
11093
|
+
const rules9 = self.RULES.keywords;
|
|
11089
11094
|
for (const key in schema) {
|
|
11090
|
-
if (!
|
|
11095
|
+
if (!rules9[key])
|
|
11091
11096
|
checkStrictMode(it2, `unknown keyword: "${key}"`);
|
|
11092
11097
|
}
|
|
11093
11098
|
}
|
|
11094
11099
|
exports.checkUnknownRules = checkUnknownRules;
|
|
11095
|
-
function schemaHasRules(schema,
|
|
11100
|
+
function schemaHasRules(schema, rules9) {
|
|
11096
11101
|
if (typeof schema == "boolean")
|
|
11097
11102
|
return !schema;
|
|
11098
11103
|
for (const key in schema)
|
|
11099
|
-
if (
|
|
11104
|
+
if (rules9[key])
|
|
11100
11105
|
return true;
|
|
11101
11106
|
return false;
|
|
11102
11107
|
}
|
|
@@ -11138,12 +11143,12 @@ var require_util2 = __commonJS({
|
|
|
11138
11143
|
return str.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
11139
11144
|
}
|
|
11140
11145
|
exports.unescapeJsonPointer = unescapeJsonPointer;
|
|
11141
|
-
function eachItem(
|
|
11142
|
-
if (Array.isArray(
|
|
11143
|
-
for (const x2 of
|
|
11146
|
+
function eachItem(xs2, f) {
|
|
11147
|
+
if (Array.isArray(xs2)) {
|
|
11148
|
+
for (const x2 of xs2)
|
|
11144
11149
|
f(x2);
|
|
11145
11150
|
} else {
|
|
11146
|
-
f(
|
|
11151
|
+
f(xs2);
|
|
11147
11152
|
}
|
|
11148
11153
|
}
|
|
11149
11154
|
exports.eachItem = eachItem;
|
|
@@ -12446,9 +12451,9 @@ var require_validate2 = __commonJS({
|
|
|
12446
12451
|
}
|
|
12447
12452
|
}
|
|
12448
12453
|
function checkKeywordTypes(it2, ts) {
|
|
12449
|
-
const
|
|
12450
|
-
for (const keyword in
|
|
12451
|
-
const rule =
|
|
12454
|
+
const rules9 = it2.self.RULES.all;
|
|
12455
|
+
for (const keyword in rules9) {
|
|
12456
|
+
const rule = rules9[keyword];
|
|
12452
12457
|
if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it2.schema, rule)) {
|
|
12453
12458
|
const { type } = rule.definition;
|
|
12454
12459
|
if (type.length && !type.some((t2) => hasApplicableType(ts, t2))) {
|
|
@@ -13389,15 +13394,15 @@ var require_core5 = __commonJS({
|
|
|
13389
13394
|
return errors.map((e2) => `${dataVar}${e2.instancePath} ${e2.message}`).reduce((text, msg) => text + separator + msg);
|
|
13390
13395
|
}
|
|
13391
13396
|
$dataMetaSchema(metaSchema, keywordsJsonPointers) {
|
|
13392
|
-
const
|
|
13397
|
+
const rules9 = this.RULES.all;
|
|
13393
13398
|
metaSchema = JSON.parse(JSON.stringify(metaSchema));
|
|
13394
13399
|
for (const jsonPointer of keywordsJsonPointers) {
|
|
13395
13400
|
const segments = jsonPointer.split("/").slice(1);
|
|
13396
13401
|
let keywords = metaSchema;
|
|
13397
13402
|
for (const seg of segments)
|
|
13398
13403
|
keywords = keywords[seg];
|
|
13399
|
-
for (const key in
|
|
13400
|
-
const rule =
|
|
13404
|
+
for (const key in rules9) {
|
|
13405
|
+
const rule = rules9[key];
|
|
13401
13406
|
if (typeof rule != "object")
|
|
13402
13407
|
continue;
|
|
13403
13408
|
const { $data } = rule.definition;
|
|
@@ -13421,7 +13426,7 @@ var require_core5 = __commonJS({
|
|
|
13421
13426
|
}
|
|
13422
13427
|
}
|
|
13423
13428
|
}
|
|
13424
|
-
_addSchema(schema, meta, baseId,
|
|
13429
|
+
_addSchema(schema, meta, baseId, validateSchema2 = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
|
|
13425
13430
|
let id;
|
|
13426
13431
|
const { schemaId } = this.opts;
|
|
13427
13432
|
if (typeof schema == "object") {
|
|
@@ -13444,7 +13449,7 @@ var require_core5 = __commonJS({
|
|
|
13444
13449
|
this._checkUnique(baseId);
|
|
13445
13450
|
this.refs[baseId] = sch;
|
|
13446
13451
|
}
|
|
13447
|
-
if (
|
|
13452
|
+
if (validateSchema2)
|
|
13448
13453
|
this.validateSchema(schema, true);
|
|
13449
13454
|
return sch;
|
|
13450
13455
|
}
|
|
@@ -24397,231 +24402,293 @@ var OpenRpcTypes = {
|
|
|
24397
24402
|
};
|
|
24398
24403
|
|
|
24399
24404
|
// ../../node_modules/@redocly/config/lib-esm/index.js
|
|
24400
|
-
var
|
|
24401
|
-
var
|
|
24402
|
-
var
|
|
24403
|
-
var c = { type: "object", properties: { hide: { type: "boolean", default: false }, type: { type: "string", enum: ["rating", "sentiment", "comment", "reasons", "mood", "scale"], default: "sentiment" }, settings: { type: "object", properties: { label: { type: "string" }, submitText: { type: "string" }, buttonText: { type: "string" }, component: { type: "string", enum: ["radio", "checkbox"], default: "checkbox" }, items: { type: "array", items: { type: "string" }, minItems: 1 }, leftScaleLabel: { type: "string" }, rightScaleLabel: { type: "string" }, reasons: { type: "object", properties: { ...
|
|
24404
|
-
var
|
|
24405
|
-
var
|
|
24406
|
-
var S = { type: "object", properties: { licenseKey: { type: "string" }, hideLoading: { type: "boolean" }, disableRouter: { type: "boolean" }, hideSidebar: { type: "boolean" }, feedback: c, hideReplay: { type: "boolean" }, oAuth2RedirectURI: { type: "string", nullable: true }, corsProxyUrl: { type: "string" }, sortRequiredPropsFirst: { type: "boolean" }, sanitize: { type: "boolean" }, hideDownloadButtons: { type: "boolean" }, downloadUrls:
|
|
24405
|
+
var Pe = { hide: { type: "boolean", default: false }, component: { type: "string", enum: ["radio", "checkbox"], default: "checkbox" }, label: { type: "string" }, items: { type: "array", items: { type: "string" } } };
|
|
24406
|
+
var R = { type: "object", properties: Pe, additionalProperties: false };
|
|
24407
|
+
var Ke = { type: "object", properties: { hide: { type: "boolean", default: false }, label: { type: "string" }, placeholder: { type: "string" } }, additionalProperties: false };
|
|
24408
|
+
var c = { type: "object", properties: { hide: { type: "boolean", default: false }, type: { type: "string", enum: ["rating", "sentiment", "comment", "reasons", "mood", "scale"], default: "sentiment" }, settings: { type: "object", properties: { label: { type: "string" }, submitText: { type: "string" }, buttonText: { type: "string" }, component: { type: "string", enum: ["radio", "checkbox"], default: "checkbox" }, items: { type: "array", items: { type: "string" }, minItems: 1 }, leftScaleLabel: { type: "string" }, rightScaleLabel: { type: "string" }, reasons: { type: "object", properties: { ...Pe, like: R, dislike: R, satisfied: R, neutral: R, dissatisfied: R }, additionalProperties: false }, comment: { type: "object", properties: { hide: { type: "boolean", default: false }, label: { type: "string" }, likeLabel: { type: "string" }, dislikeLabel: { type: "string" }, satisfiedLabel: { type: "string" }, neutralLabel: { type: "string" }, dissatisfiedLabel: { type: "string" } }, additionalProperties: false }, optionalEmail: Ke }, additionalProperties: false } }, additionalProperties: false };
|
|
24409
|
+
var He = { type: "object", properties: { languages: { type: "array", items: { type: "object", properties: { lang: { type: "string", examples: ["curl", "JavaScript", "Node.js", "Python", "Java8+Apache", "Java", "C#", "C#+Newtonsoft", "PHP", "Go", "Ruby", "R", "Payload"] }, label: { type: "string" }, options: { type: "object", properties: { indent: { type: "string" }, withImports: { type: "boolean" }, withComments: { type: "boolean" }, binary: { type: "boolean" }, credentials: { type: "string", enum: ["omit", "same-origin", "include"] } }, additionalProperties: false } }, required: ["lang"], additionalProperties: false } }, skipOptionalParameters: { type: "boolean" }, withOAuth2Call: { type: "boolean" } }, additionalProperties: false };
|
|
24410
|
+
var k = { type: "array", items: { type: "object", properties: { title: { type: "string" }, url: { type: "string" } }, required: ["url"], additionalProperties: false } };
|
|
24411
|
+
var S = { type: "object", properties: { licenseKey: { type: "string" }, hideLoading: { type: "boolean" }, disableRouter: { type: "boolean" }, hideSidebar: { type: "boolean" }, feedback: c, hideReplay: { type: "boolean" }, oAuth2RedirectURI: { type: "string", nullable: true }, corsProxyUrl: { type: "string" }, sortRequiredPropsFirst: { type: "boolean" }, sanitize: { type: "boolean" }, hideDownloadButtons: { type: "boolean" }, downloadUrls: k, onlyRequiredInSamples: { type: "boolean" }, generatedSamplesMaxDepth: { oneOf: [{ type: "number" }, { type: "string" }] }, showExtensions: { oneOf: [{ type: "boolean" }, { type: "string" }, { type: "array", items: { type: "string" } }] }, hideSchemaTitles: { type: "boolean" }, jsonSamplesExpandLevel: { oneOf: [{ type: "number" }, { type: "string" }] }, schemasExpansionLevel: { oneOf: [{ type: "number" }, { type: "string" }] }, mockServer: { type: "object", properties: { url: { type: "string" }, position: { type: "string", enum: ["first", "last", "replace", "off"] }, description: { type: "string" } } }, maxDisplayedEnumValues: { type: "number" }, schemaDefinitionsTagName: { type: "string" }, layout: { type: "string", enum: ["stacked", "three-panel"] }, hideInfoMetadata: { type: "boolean" }, events: { type: "object" }, skipBundle: { type: "boolean" }, routingBasePath: { type: "string" }, codeSamples: He, ignoreNamedSchemas: { oneOf: [{ type: "array", items: { type: "string" } }, { type: "string" }] }, hidePropertiesPrefix: { type: "boolean" }, excludeFromSearch: { type: "boolean" }, showSchemaCatalogLinks: { type: "boolean" } }, additionalProperties: false };
|
|
24407
24412
|
var C = { type: "object", properties: { includeByName: { type: "array", items: { type: "string" } }, excludeByName: { type: "array", items: { type: "string" } } }, additionalProperties: false };
|
|
24408
|
-
var
|
|
24409
|
-
var
|
|
24410
|
-
var
|
|
24411
|
-
var
|
|
24412
|
-
var
|
|
24413
|
-
var P = { type: "object", properties: { menu: { type: "object", properties: {
|
|
24414
|
-
var
|
|
24415
|
-
var
|
|
24416
|
-
var
|
|
24417
|
-
var
|
|
24418
|
-
var
|
|
24413
|
+
var We = { type: "object", properties: { name: { type: "string" }, items: C, queries: C, mutations: C, subscriptions: C, types: C, directives: C }, required: ["name"], additionalProperties: false };
|
|
24414
|
+
var $e = { type: "object", properties: { requireExactGroups: { type: "boolean" }, groups: { type: "array", items: We }, otherItemsGroupName: { type: "string" } }, required: ["requireExactGroups", "groups", "otherItemsGroupName"], additionalProperties: false };
|
|
24415
|
+
var Xe = { type: "object", properties: { name: { type: "string" }, url: { type: "string", format: "uri" }, email: { type: "string", format: "email" } }, additionalProperties: false };
|
|
24416
|
+
var Je = { type: "object", properties: { name: { type: "string" }, url: { type: "string", format: "uri" }, identifier: { type: "string" } }, additionalProperties: false };
|
|
24417
|
+
var Qe = { type: "object", properties: { title: { type: "string" }, version: { type: "string" }, description: { type: "string" }, termsOfService: { type: "string", format: "uri" }, contact: Xe, license: Je }, additionalProperties: false };
|
|
24418
|
+
var P = { type: "object", properties: { menu: { type: "object", properties: { ...$e.properties }, additionalProperties: false }, sidebar: { type: "object", properties: { hide: { type: "boolean" } } }, downloadUrls: k, apiLogo: { type: "object", properties: { imageUrl: { type: "string" }, href: { type: "string" }, altText: { type: "string" }, backgroundColor: { type: "string" } } }, jsonSamplesDepth: { type: "number" }, samplesMaxInlineArgs: { type: "number" }, licenseKey: { type: "string" }, fieldExpandLevel: { type: "number" }, baseUrlPath: { type: "string" }, metadata: { type: "object", properties: { apiId: { type: "string" } }, additionalProperties: true }, feedback: c, layout: { type: "string", enum: ["stacked", "three-panel"] }, showBuiltInScalars: { type: "boolean" }, showBuiltInDirectives: { type: "boolean" }, info: Qe }, additionalProperties: false };
|
|
24419
|
+
var xe = { type: "object", properties: { downloadUrls: k, apiLogo: { type: "object", properties: { imageUrl: { type: "string" }, href: { type: "string" }, altText: { type: "string" }, backgroundColor: { type: "string" } } }, jsonSamplesDepth: { type: "number" }, samplesMaxInlineArgs: { type: "number" }, fieldExpandLevel: { type: "number" }, baseUrlPath: { type: "string" }, metadata: { type: "object", properties: { apiId: { type: "string" } }, additionalProperties: true }, feedback: c, layout: { type: "string", enum: ["stacked", "three-panel"] } }, additionalProperties: false };
|
|
24420
|
+
var Ze = { type: "object", properties: { label: { type: "string" }, lang: { enum: ["curl", "C#", "Go", "Java", "Java8+Apache", "JavaScript", "Node.js", "PHP", "Python", "R", "Ruby"] } }, required: ["lang"] };
|
|
24421
|
+
var et = { type: "object", properties: { enum: { type: "string" }, enumSingleValue: { type: "string" }, enumArray: { type: "string" }, default: { type: "string" }, deprecated: { type: "string" }, example: { type: "string" }, examples: { type: "string" }, nullable: { type: "string" }, recursive: { type: "string" }, arrayOf: { type: "string" }, webhook: { type: "string" }, authorizations: { type: "string" }, tryItAuthBasicUsername: { type: "string" }, tryItAuthBasicPassword: { type: "string" } } };
|
|
24422
|
+
var je = { type: "object", properties: { label: { type: "string" }, link: { type: "string" }, target: { type: "string" } }, required: ["label", "link"] };
|
|
24423
|
+
var tt = { type: "object", properties: { beforeInfo: { type: "array", items: je }, end: { type: "array", items: je } } };
|
|
24419
24424
|
var u = { type: "object", properties: { main: { type: "string" }, light: { type: "string" }, dark: { type: "string" }, contrastText: { type: "string" } } };
|
|
24420
24425
|
var A = { type: "object", properties: { backgroundColor: { type: "string" }, borderColor: { type: "string" }, color: { type: "string" }, tabTextColor: { type: "string" } } };
|
|
24421
|
-
var
|
|
24422
|
-
var
|
|
24423
|
-
var
|
|
24424
|
-
var
|
|
24425
|
-
var
|
|
24426
|
-
var
|
|
24426
|
+
var rt = { type: "object", properties: O(u.properties, ["light", "dark"]) };
|
|
24427
|
+
var ot = { type: "object", properties: { basic: { type: "string" }, delete: { type: "string" }, get: { type: "string" }, head: { type: "string" }, link: { type: "string" }, options: { type: "string" }, patch: { type: "string" }, post: { type: "string" }, put: { type: "string" } } };
|
|
24428
|
+
var st = { type: "object", properties: { error: A, info: A, redirect: A, success: A } };
|
|
24429
|
+
var it = { type: "object", properties: x(u.properties, ["dark"]) };
|
|
24430
|
+
var at = { type: "object", properties: { primary: { type: "string" }, secondary: { type: "string" }, light: { type: "string" } } };
|
|
24431
|
+
var nt = { type: "object", properties: { accent: u, border: rt, error: u, http: ot, primary: u, responses: st, secondary: it, success: u, text: at, tonalOffset: { type: "number" }, warning: u } };
|
|
24427
24432
|
var L = { type: "object", properties: { fontSize: { type: "string" }, padding: { type: "string" }, minWidth: { type: "string" } } };
|
|
24428
|
-
var
|
|
24433
|
+
var pt = { type: "object", properties: { small: L, medium: L, large: L, xlarge: L } };
|
|
24429
24434
|
var l = { type: "object", properties: { fontFamily: { type: "string" }, fontSize: { type: "string" }, fontWeight: { type: "string" }, lineHeight: { type: "string" } } };
|
|
24430
|
-
var
|
|
24431
|
-
var
|
|
24432
|
-
var
|
|
24433
|
-
var
|
|
24434
|
-
var
|
|
24435
|
-
var
|
|
24436
|
-
var
|
|
24437
|
-
var
|
|
24438
|
-
var
|
|
24439
|
-
var
|
|
24440
|
-
var
|
|
24441
|
-
var
|
|
24442
|
-
var
|
|
24443
|
-
var
|
|
24444
|
-
var
|
|
24445
|
-
var
|
|
24446
|
-
var
|
|
24447
|
-
var
|
|
24448
|
-
var
|
|
24449
|
-
var
|
|
24450
|
-
var
|
|
24451
|
-
var
|
|
24452
|
-
var
|
|
24453
|
-
var
|
|
24454
|
-
var
|
|
24455
|
-
var
|
|
24456
|
-
var
|
|
24457
|
-
var
|
|
24458
|
-
var
|
|
24459
|
-
var
|
|
24460
|
-
var
|
|
24461
|
-
var
|
|
24462
|
-
var
|
|
24463
|
-
var
|
|
24464
|
-
var
|
|
24465
|
-
function
|
|
24435
|
+
var ct = { type: "object", properties: { ...x(l.properties, ["fontSize", "lineHeight"]), borderRadius: { type: "string" }, hoverStyle: { type: "string" }, boxShadow: { type: "string" }, hoverBoxShadow: { type: "string" }, sizes: pt } };
|
|
24436
|
+
var Te = { type: "object", properties: O(l.properties, ["fontSize", "lineHeight"]) };
|
|
24437
|
+
var lt = { type: "object", properties: { medium: Te, small: Te } };
|
|
24438
|
+
var yt = { type: "object", properties: { ...x(l.properties, ["fontSize", "lineHeight"]), borderRadius: { type: "string" }, color: { type: "string" }, sizes: lt } };
|
|
24439
|
+
var dt = { type: "object", properties: { top: { type: "string" }, width: { type: "string" }, height: { type: "string" } } };
|
|
24440
|
+
var gt = { type: "object", properties: { borderRadius: { type: "string" }, backgroundColor: { type: "string" } } };
|
|
24441
|
+
var Ee = { type: "object", properties: { fullWidth: { type: "boolean" } } };
|
|
24442
|
+
var mt = { type: "object", properties: { buttons: ct, httpBadges: yt, layoutControls: dt, panels: gt, tryItButton: Ee, tryItSendButton: Ee } };
|
|
24443
|
+
var _ = { type: "object", properties: { small: { type: "string" }, medium: { type: "string" }, large: { type: "string" } } };
|
|
24444
|
+
var ut = { type: "object", properties: { maxWidth: _ } };
|
|
24445
|
+
var bt = { type: "object", properties: { maxWidth: _, middlePanelMaxWidth: _ } };
|
|
24446
|
+
var ft = { type: "object", properties: { showDarkRightPanel: { type: "boolean" }, stacked: ut, "three-panel": bt } };
|
|
24447
|
+
var ve = { type: "object", properties: { backgroundColor: { type: "string" }, border: { type: "string" } } };
|
|
24448
|
+
var ht = { type: "object", properties: { breakFieldNames: { type: "boolean" }, caretColor: { type: "string" }, caretSize: { type: "string" }, constraints: ve, defaultDetailsWidth: { type: "string" }, examples: ve, labelsTextSize: { type: "string" }, linesColor: { type: "string" }, nestedBackground: { type: "string" }, nestingSpacing: { type: "string" }, requireLabelColor: { type: "string" }, typeNameColor: { type: "string" }, typeTitleColor: { type: "string" } } };
|
|
24449
|
+
var ke = { type: "object", properties: { subItemsColor: { type: "string" }, textTransform: { type: "string" }, fontWeight: { type: "string" } } };
|
|
24450
|
+
var St = { type: "object", properties: O(ke.properties, ["textTransform"]) };
|
|
24451
|
+
var Ct = { type: "object", properties: { unit: { type: "number" }, paddingHorizontal: { type: "string" }, paddingVertical: { type: "string" }, offsetTop: { type: "string" }, offsetLeft: { type: "string" }, offsetNesting: { type: "string" } } };
|
|
24452
|
+
var Pt = { type: "object", properties: { ...x(l.properties, ["fontWeight", "lineHeight"]), activeBgColor: { type: "string" }, activeTextColor: { type: "string" }, backgroundColor: { type: "string" }, borderRadius: { type: "string" }, breakPath: { type: "boolean" }, caretColor: { type: "string" }, caretSize: { type: "string" }, groupItems: ke, level1items: St, rightLineColor: { type: "string" }, separatorLabelColor: { type: "string" }, showAtBreakpoint: { type: "string" }, spacing: Ct, textColor: { type: "string" }, width: { type: "string" } } };
|
|
24453
|
+
var D = { type: "object", properties: { ...l.properties, color: { type: "string" }, transform: { type: "string" } } };
|
|
24454
|
+
var xt = { type: "object", properties: { ...l.properties, backgroundColor: { type: "string" }, color: { type: "string" }, wordBreak: { type: "string", enum: ["break-all", "break-word", "keep-all", "normal", "revert", "unset", "inherit", "initial"] }, wrap: { type: "boolean" } } };
|
|
24455
|
+
var jt = { type: "object", properties: x(l.properties, ["fontSize"]) };
|
|
24456
|
+
var Tt = { type: "object", properties: { color: { type: "string" }, hover: { type: "string" }, textDecoration: { type: "string" }, hoverTextDecoration: { type: "string" }, visited: { type: "string" } } };
|
|
24457
|
+
var Et = { type: "object", properties: { code: xt, fieldName: l, ...O(l.properties, ["fontSize", "fontFamily"]), fontWeightBold: { type: "string" }, fontWeightLight: { type: "string" }, fontWeightRegular: { type: "string" }, heading1: D, heading2: D, heading3: D, headings: jt, lineHeight: { type: "string" }, links: Tt, optimizeSpeed: { type: "boolean" }, rightPanelHeading: D, smoothing: { type: "string", enum: ["auto", "none", "antialiased", "subpixel-antialiased", "grayscale"] } } };
|
|
24458
|
+
var vt = { type: "object", properties: { color: { type: "string" }, ...x(l.properties, ["fontWeight"]) } };
|
|
24459
|
+
var Rt = { type: "object", properties: { backgroundColor: { type: "string" }, borderRadius: { type: "string" }, tokens: vt } };
|
|
24460
|
+
var kt = { type: "object", properties: { gutter: { type: "string" }, maxHeight: { type: "string" }, maxWidth: { type: "string" } } };
|
|
24461
|
+
var It = { type: "object", properties: { backgroundColor: { type: "string" }, color: { type: "string" } } };
|
|
24462
|
+
var Re = { type: "object", properties: { custom: { type: "string" } } };
|
|
24463
|
+
var At = { type: "object", properties: { DownloadButton: Re, NextSectionButton: Re } };
|
|
24464
|
+
var Lt = { type: "object", properties: { backgroundColor: { type: "string" }, panelBackgroundColor: { type: "string" }, panelControlsBackgroundColor: { type: "string" }, showAtBreakpoint: { type: "string" }, textColor: { type: "string" }, width: { type: "string" } } };
|
|
24465
|
+
var Dt = { type: "object", properties: { borderRadius: { type: "string" } } };
|
|
24466
|
+
var _t = { type: "object", properties: { sectionHorizontal: { type: "number" }, sectionVertical: { type: "number" }, unit: { type: "number" } } };
|
|
24467
|
+
var Ot = { type: "object", properties: { breakpoints: _, codeBlock: Rt, colors: nt, components: mt, layout: ft, logo: kt, fab: It, overrides: At, rightPanel: Lt, schema: ht, shape: Dt, sidebar: Pt, spacing: _t, typography: Et, links: { properties: { color: { type: "string" } } }, codeSample: { properties: { backgroundColor: { type: "string" } } } } };
|
|
24468
|
+
var Nt = { type: "object", properties: { skipOptionalParameters: { type: "boolean" }, languages: { type: "array", items: Ze } }, required: ["languages"] };
|
|
24469
|
+
var ae = { type: "object", properties: { theme: Ot, ctrlFHijack: { type: "boolean" }, defaultSampleLanguage: { type: "string" }, disableDeepLinks: { type: "boolean" }, disableSearch: { type: "boolean" }, disableSidebar: { type: "boolean" }, downloadDefinitionUrl: { type: "string" }, expandDefaultServerVariables: { type: "boolean" }, enumSkipQuotes: { type: "boolean" }, expandDefaultRequest: { type: "boolean" }, expandDefaultResponse: { type: "boolean" }, expandResponses: { type: "string" }, expandSingleSchemaField: { type: "boolean" }, generateCodeSamples: Nt, generatedPayloadSamplesMaxDepth: { type: "number" }, hideDownloadButton: { type: "boolean" }, hideHostname: { type: "boolean" }, hideInfoSection: { type: "boolean" }, hideLogo: { type: "boolean" }, hideRequestPayloadSample: { type: "boolean" }, hideRightPanel: { type: "boolean" }, hideSchemaPattern: { type: "boolean" }, hideSingleRequestSampleTab: { type: "boolean" }, hideSecuritySection: { type: "boolean" }, hideTryItPanel: { type: "boolean" }, hideFab: { type: "boolean" }, hideOneOfDescription: { type: "boolean" }, htmlTemplate: { type: "string" }, jsonSampleExpandLevel: { oneOf: [{ type: "number", minimum: 1 }, { type: "string" }] }, labels: et, menuToggle: { type: "boolean" }, nativeScrollbars: { type: "boolean" }, noAutoAuth: { type: "boolean" }, onDeepLinkClick: { type: "object" }, pagination: { enum: ["none", "section", "item"] }, pathInMiddlePanel: { type: "boolean" }, payloadSampleIdx: { type: "number", minimum: 0 }, requiredPropsFirst: { type: "boolean" }, routingStrategy: { type: "string" }, samplesTabsMaxCount: { type: "number" }, schemaExpansionLevel: { oneOf: [{ type: "number", minimum: 0 }, { type: "string" }] }, minCharacterLengthToInitSearch: { type: "number", minimum: 1 }, maxResponseHeadersToShowInTryIt: { type: "number", minimum: 0 }, scrollYOffset: { oneOf: [{ type: "number" }, { type: "string" }] }, searchAutoExpand: { type: "boolean" }, searchFieldLevelBoost: { type: "number", minimum: 0 }, searchMaxDepth: { type: "number", minimum: 1 }, searchMode: { type: "string", enum: ["default", "path-only"] }, searchOperationTitleBoost: { type: "number" }, searchTagTitleBoost: { type: "number" }, sendXUserAgentInTryIt: { type: "boolean" }, showChangeLayoutButton: { type: "boolean" }, showConsole: { type: "boolean" }, showNextButton: { type: "boolean" }, showRightPanelToggle: { type: "boolean" }, showSecuritySchemeType: { type: "boolean" }, showWebhookVerb: { type: "boolean" }, showObjectSchemaExamples: { type: "boolean" }, disableTryItRequestUrlEncoding: { type: "boolean" }, sidebarLinks: tt, sideNavStyle: { type: "string", enum: ["summary-only", "path-first", "id-only", "path-only"] }, simpleOneOfTypeLabel: { type: "boolean" }, sortEnumValuesAlphabetically: { type: "boolean" }, sortOperationsAlphabetically: { type: "boolean" }, sortPropsAlphabetically: { type: "boolean" }, sortTagsAlphabetically: { type: "boolean" }, suppressWarnings: { type: "boolean" }, unstable_externalDescription: { type: "boolean" }, unstable_ignoreMimeParameters: { type: "boolean" }, untrustedDefinition: { type: "boolean" }, showAccessMode: { type: "boolean" }, preserveOriginalExtensionsName: { type: "boolean" }, markdownHeadingsAnchorLevel: { type: "number" } }, additionalProperties: false };
|
|
24470
|
+
function O(d, m) {
|
|
24466
24471
|
return Object.fromEntries(m.filter((o) => o in d).map((o) => [o, d[o]]));
|
|
24467
24472
|
}
|
|
24468
|
-
function
|
|
24473
|
+
function x(d, m) {
|
|
24469
24474
|
return Object.fromEntries(Object.entries(d).filter(([o]) => !m.includes(o)));
|
|
24470
24475
|
}
|
|
24471
24476
|
var a = { nodeTypeName: void 0, type: "object", additionalProperties: { oneOf: [{ type: "string" }, { type: "object" }] }, description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.", documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules" };
|
|
24472
|
-
var
|
|
24477
|
+
var qt = { rules: a, oas2Rules: a, oas3_0Rules: a, oas3_1Rules: a, oas3_2Rules: a, async2Rules: a, async3Rules: a, arazzo1Rules: a, arazzo1_1Rules: a, overlay1Rules: a, openrpc1Rules: a };
|
|
24473
24478
|
var n = { nodeTypeName: void 0, type: "object", additionalProperties: true };
|
|
24474
|
-
var
|
|
24479
|
+
var wt = { preprocessors: n, oas2Preprocessors: n, oas3_0Preprocessors: n, oas3_1Preprocessors: n, oas3_2Preprocessors: n, async2Preprocessors: n, async3Preprocessors: n, arazzo1Preprocessors: n, arazzo1_1Preprocessors: n, overlay1Preprocessors: n, openrpc1Preprocessors: n };
|
|
24475
24480
|
var p = { nodeTypeName: void 0, type: "object", additionalProperties: true };
|
|
24476
|
-
var
|
|
24477
|
-
var
|
|
24478
|
-
var b = { ...
|
|
24479
|
-
var
|
|
24480
|
-
var
|
|
24481
|
+
var Mt = { decorators: p, oas2Decorators: p, oas3_0Decorators: p, oas3_1Decorators: p, oas3_2Decorators: p, async2Decorators: p, async3Decorators: p, arazzo1Decorators: p, arazzo1_1Decorators: p, overlay1Decorators: p, openrpc1Decorators: p };
|
|
24482
|
+
var Ut = { nodeTypeName: void 0, type: "array", items: { type: "string" }, description: "Use extends to inherit rules and their configurations from other rulesets.", documentationLink: "https://redocly.com/docs/cli/configuration/reference/extends" };
|
|
24483
|
+
var b = { ...qt, ...Mt, ...wt, extends: Ut };
|
|
24484
|
+
var N = (d) => d;
|
|
24485
|
+
var s = N({ RedirectSource: "RedirectSource", Redirects: "Redirects", ScorecardClassic: "ScorecardClassic", ScorecardClassicLevelList: "ScorecardClassicLevelList", ScorecardClassicLevel: "ScorecardClassicLevel", ScorecardClassicTargetList: "ScorecardClassicTargetList", ScorecardClassicTarget: "ScorecardClassicTarget", ScorecardClassicTargetWhere: "ScorecardClassicTargetWhere", ScorecardClassicTargetWhereMetadata: "ScorecardClassicTargetWhereMetadata", ScorecardClassicTeamMetadataProperty: "ScorecardClassicTeamMetadataProperty" });
|
|
24481
24486
|
var r = { type: "object", properties: { hide: { type: "boolean" } }, additionalProperties: false };
|
|
24482
|
-
var
|
|
24483
|
-
var
|
|
24484
|
-
var
|
|
24485
|
-
var
|
|
24486
|
-
var
|
|
24487
|
-
var
|
|
24488
|
-
var
|
|
24489
|
-
var
|
|
24487
|
+
var Ie = { type: "object", properties: { src: { type: "string" }, async: { type: "boolean" }, crossorigin: { type: "string" }, defer: { type: "boolean" }, fetchpriority: { type: "string" }, integrity: { type: "string" }, module: { type: "boolean" }, nomodule: { type: "boolean" }, nonce: { type: "string" }, referrerpolicy: { type: "string" }, type: { type: "string" } }, required: ["src"], additionalProperties: true };
|
|
24488
|
+
var ne = { type: "object", properties: { page: { type: "string" }, directory: { type: "string" }, disconnect: { type: "boolean", default: false }, group: { type: "string" }, label: { type: "string" }, href: { type: "string" }, external: { type: "boolean" }, labelTranslationKey: { type: "string" }, groupTranslationKey: { type: "string" }, icon: { oneOf: [{ type: "string" }, { type: "object", properties: { srcSet: { type: "string" } }, required: ["srcSet"] }] }, separator: { type: "string" }, separatorLine: { type: "boolean" }, linePosition: { type: "string", enum: ["top", "bottom"], default: "top" }, version: { type: "string" }, menuStyle: { type: "string", enum: ["drilldown"] }, expanded: { type: "string", const: "always" }, selectFirstItemOnExpand: { type: "boolean" }, flatten: { type: "boolean" }, linkedSidebars: { type: "array", items: { type: "string" } }, items: { type: "array", items: { type: "object", additionalProperties: true } }, rbac: { type: "object", additionalProperties: { type: "string" } }, additionalProps: { type: "object", additionalProperties: true } } };
|
|
24489
|
+
var pe = { type: "array", items: { ...ne, properties: { ...ne.properties, items: { type: "array", items: ne } } } };
|
|
24490
|
+
var Bt = { type: "object", properties: { name: { type: "string" }, icon: { type: "string" }, folder: { type: "string" } }, additionalProperties: false, required: ["name", "folder"] };
|
|
24491
|
+
var Gt = { type: "object", properties: { hide: { type: "boolean", default: false }, suggestions: { default: [], type: "array", items: { type: "string" } }, prompt: { type: "string" } }, additionalProperties: false };
|
|
24492
|
+
var zt = { type: "array", items: { type: "object", required: ["name", "field", "type"], properties: { name: { type: "string" }, field: { type: "string" }, type: { type: "string", enum: ["multi-select", "select", "tags"] } }, additionalProperties: false } };
|
|
24493
|
+
var Ft = { type: "object", properties: { facets: zt, ...r.properties }, additionalProperties: false };
|
|
24494
|
+
var Yt = { type: "object", properties: { page: { type: "string" }, label: { type: "string" }, labelTranslationKey: { type: "string" } }, required: ["page"] };
|
|
24490
24495
|
var q = { type: "object", properties: { image: { type: "string" }, srcSet: { type: "string" }, altText: { type: "string" }, link: { type: "string" }, favicon: { type: "string" } }, additionalProperties: false };
|
|
24491
|
-
var w = { type: "object", properties: { items:
|
|
24492
|
-
var M = { type: "object", additionalProperties:
|
|
24493
|
-
var
|
|
24494
|
-
var
|
|
24495
|
-
var
|
|
24496
|
+
var w = { type: "object", properties: { items: pe, ...r.properties }, additionalProperties: false };
|
|
24497
|
+
var M = { type: "object", additionalProperties: Bt };
|
|
24498
|
+
var U = { type: "object", properties: { items: pe, copyrightText: { type: "string" }, logo: r, ...r.properties }, additionalProperties: false };
|
|
24499
|
+
var B = { type: "object", properties: { separatorLine: { type: "boolean" }, linePosition: { type: "string", enum: ["top", "bottom"], default: "bottom" }, ...r.properties }, additionalProperties: false };
|
|
24500
|
+
var G = { type: "object", properties: { head: { type: "array", items: Ie }, body: { type: "array", items: Ie } }, additionalProperties: false };
|
|
24496
24501
|
var z = { type: "array", items: { type: "object", properties: { href: { type: "string" }, as: { type: "string" }, crossorigin: { type: "string" }, fetchpriority: { type: "string" }, hreflang: { type: "string" }, imagesizes: { type: "string" }, imagesrcset: { type: "string" }, integrity: { type: "string" }, media: { type: "string" }, prefetch: { type: "string" }, referrerpolicy: { type: "string" }, rel: { type: "string" }, sizes: { type: "string" }, title: { type: "string" }, type: { type: "string" } }, required: ["href"], additionalProperties: true } };
|
|
24497
|
-
var
|
|
24498
|
-
var
|
|
24499
|
-
var
|
|
24500
|
-
var
|
|
24501
|
-
var
|
|
24502
|
-
var
|
|
24503
|
-
var
|
|
24504
|
-
var
|
|
24505
|
-
var
|
|
24506
|
-
var
|
|
24507
|
-
var
|
|
24508
|
-
var
|
|
24509
|
-
var
|
|
24510
|
-
var
|
|
24511
|
-
var
|
|
24512
|
-
var
|
|
24513
|
-
var
|
|
24514
|
-
var
|
|
24515
|
-
var
|
|
24516
|
-
var $ = { type: "object", properties: { adobe:
|
|
24517
|
-
var
|
|
24518
|
-
var
|
|
24502
|
+
var F = { type: "object", properties: { engine: { type: "string", enum: ["flexsearch", "typesense"], default: "flexsearch" }, ai: Gt, filters: Ft, placement: { type: "string", default: "navbar" }, shortcuts: { type: "array", items: { type: "string" }, default: ["\u2318+K,ctrl+K"] }, suggestedPages: { type: "array", items: Yt }, ...r.properties }, additionalProperties: false };
|
|
24503
|
+
var Y = { type: "object", properties: { hide: { type: "boolean" }, suggestions: { default: [], type: "array", items: { type: "string" } }, prompt: { type: "string" }, trigger: { type: "object", properties: { hide: { type: "boolean", default: false }, inputType: { type: "string", enum: ["button", "icon"], default: "button" }, inputIcon: { type: "string", enum: ["chat", "sparkles", "redocly"], default: "sparkles" } }, additionalProperties: false } }, additionalProperties: false };
|
|
24504
|
+
var V = { type: "object", properties: { ignoreDetection: { type: "boolean" }, modes: { type: "array", items: { type: "string" }, default: ["light", "dark"] }, ...r.properties }, additionalProperties: false };
|
|
24505
|
+
var j = { type: "string", enum: ["slate", "pink", "coral", "amber", "jade", "cyan", "ocean", "indigo", "iris"] };
|
|
24506
|
+
var Vt = { type: "object", properties: { ...r.properties, items: { type: "array", items: { type: "string", enum: ["copy", "view", "chatgpt", "claude", "docs-mcp-cursor", "docs-mcp-vscode"] }, default: ["copy", "view", "chatgpt", "claude", "docs-mcp-cursor", "docs-mcp-vscode"] } }, additionalProperties: false };
|
|
24507
|
+
var K = { type: "object", properties: { nextButton: { type: "object", properties: { text: { type: "string" }, ...r.properties }, additionalProperties: false, default: {} }, previousButton: { type: "object", properties: { text: { type: "string" }, ...r.properties }, additionalProperties: false, default: {} }, actions: Vt }, additionalProperties: false };
|
|
24508
|
+
var H = { type: "object", properties: { elementFormat: { type: "string", default: "icon" }, copy: { type: "object", properties: { ...r.properties }, additionalProperties: false, default: { hide: false } }, report: { type: "object", properties: { tooltipText: { type: "string" }, buttonText: { type: "string" }, label: { type: "string" }, ...r.properties }, additionalProperties: false, default: { hide: false } }, expand: { type: "object", properties: { ...r.properties }, additionalProperties: false, default: { hide: false } }, collapse: { type: "object", properties: { ...r.properties }, additionalProperties: false, default: { hide: false } } }, additionalProperties: false };
|
|
24509
|
+
var W = { type: "object", properties: { frontMatterKeysToResolve: { type: "array", items: { type: "string" }, default: ["image", "links"] }, partialsFolders: { type: "array", items: { type: "string" }, default: ["**/_partials/**"] }, lastUpdatedBlock: { type: "object", properties: { format: { type: "string", enum: ["timeago", "iso", "long", "short"], default: "timeago" }, locale: { type: "string" }, ...r.properties }, additionalProperties: false, default: {} }, toc: { type: "object", properties: { header: { type: "string", default: "On this page" }, depth: { type: "integer", default: 3, minimum: 1 }, ...r.properties }, additionalProperties: false, default: {} }, editPage: { type: "object", properties: { baseUrl: { type: "string" }, ...r.properties }, additionalProperties: false, default: {} }, template: { type: "object", additionalProperties: { type: "string" } } }, additionalProperties: false, default: {} };
|
|
24510
|
+
var T = { ...S, properties: { ...S.properties, ...ae.properties } };
|
|
24511
|
+
var Oo = { ...S, properties: { ...S.properties, ...ae.properties } };
|
|
24512
|
+
var Kt = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, scriptUrl: { type: "string" }, pageViewEventName: { type: "string" } }, additionalProperties: false, required: ["scriptUrl"] };
|
|
24513
|
+
var Ht = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, apiKey: { type: "string" }, head: { type: "boolean" }, respectDNT: { type: "boolean" }, exclude: { type: "array", items: { type: "string" } }, outboundClickEventName: { type: "string" }, pageViewEventName: { type: "string" }, amplitudeConfig: { type: "object", additionalProperties: true } }, additionalProperties: false, required: ["apiKey"] };
|
|
24514
|
+
var Wt = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, orgId: { type: "string" } }, additionalProperties: false, required: ["orgId"] };
|
|
24515
|
+
var $t = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, appId: { type: "string" } }, additionalProperties: false, required: ["appId"] };
|
|
24516
|
+
var Xt = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, writeKey: { type: "string", minLength: 10 }, trackPage: { type: "boolean" }, dataPlaneUrl: { type: "string" }, controlPlaneUrl: { type: "string" }, sdkUrl: { type: "string" }, loadOptions: { type: "object", additionalProperties: true } }, additionalProperties: false, required: ["writeKey"] };
|
|
24517
|
+
var Jt = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, writeKey: { type: "string", minLength: 10 }, trackPage: { type: "boolean" }, includeTitleInPageCall: { type: "boolean" }, host: { type: "string" } }, additionalProperties: false, required: ["writeKey"] };
|
|
24518
|
+
var Qt = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, trackingId: { type: "string" }, gtmAuth: { type: "string" }, gtmPreview: { type: "string" }, defaultDataLayer: {}, dataLayerName: { type: "string" }, enableWebVitalsTracking: { type: "boolean" }, selfHostedOrigin: { type: "string" }, pageViewEventName: { type: "string" } }, additionalProperties: false, required: ["trackingId"] };
|
|
24519
|
+
var ce = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, trackingId: { type: "string" }, conversionId: { type: "string" }, floodlightId: { type: "string" }, optimizeId: { type: "string" }, exclude: { type: "array", items: { type: "string" } } }, additionalProperties: false, required: ["trackingId"] };
|
|
24520
|
+
var Zt = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, trackingId: { type: "string" }, conversionId: { type: "string" }, floodlightId: { type: "string" }, head: { type: "boolean" }, respectDNT: { type: "boolean" }, exclude: { type: "array", items: { type: "string" } }, optimizeId: { type: "string" }, anonymizeIp: { type: "boolean" }, cookieExpires: { type: "number" }, trackers: { type: "object", additionalProperties: ce } }, additionalProperties: false, required: ["trackingId"] };
|
|
24521
|
+
var $ = { type: "object", properties: { adobe: Kt, amplitude: Ht, fullstory: Wt, heap: $t, rudderstack: Xt, segment: Jt, gtm: Qt, ga: Zt } };
|
|
24522
|
+
var X = { type: "object", properties: { items: { type: "array", items: { type: "object", properties: { label: { type: "string" }, external: { type: "boolean" }, link: { type: "string" }, separatorLine: { type: "boolean" } }, additionalProperties: true }, default: [] }, hideLoginButton: { type: "boolean" }, ...r.properties }, additionalProperties: false };
|
|
24523
|
+
var J = { type: "object", properties: { hide: { type: "boolean" }, showForUnversioned: { type: "boolean" } } };
|
|
24519
24524
|
var Q = { type: "object", properties: { hide: { type: "boolean" }, prefixItems: { type: "array", items: { type: "object", properties: { label: { type: "string" }, labelTranslationKey: { type: "string" }, page: { type: "string" }, icon: { type: "string" } }, additionalProperties: false, default: {} } } }, additionalProperties: false };
|
|
24520
|
-
var
|
|
24521
|
-
var
|
|
24522
|
-
var
|
|
24523
|
-
var
|
|
24524
|
-
var
|
|
24525
|
-
var
|
|
24526
|
-
var
|
|
24527
|
-
var y = { type: "object", properties: { slug: { type: "string" }, hide: { type: "boolean" }, includes: { type: "array", items:
|
|
24528
|
-
var
|
|
24529
|
-
var
|
|
24530
|
-
var
|
|
24531
|
-
var
|
|
24532
|
-
var Z = { type: "object", properties: { show: { type: "boolean", default: false }, entityTypes:
|
|
24533
|
-
var
|
|
24534
|
-
var
|
|
24535
|
-
var
|
|
24536
|
-
var
|
|
24537
|
-
var
|
|
24538
|
-
var
|
|
24539
|
-
var
|
|
24540
|
-
var
|
|
24541
|
-
var
|
|
24542
|
-
var
|
|
24543
|
-
var
|
|
24544
|
-
var
|
|
24545
|
-
var
|
|
24546
|
-
var ee = { type: "array", items:
|
|
24547
|
-
var
|
|
24548
|
-
var
|
|
24549
|
-
var
|
|
24550
|
-
var
|
|
24551
|
-
var
|
|
24552
|
-
|
|
24525
|
+
var er = { type: "object", additionalProperties: false, required: ["title", "property"], properties: { type: { type: "string", enum: ["select", "checkboxes", "date-range"], default: "checkboxes" }, title: { type: "string" }, titleTranslationKey: { type: "string" }, property: { type: "string" }, parentFilter: { type: "string" }, valuesMapping: { type: "object", additionalProperties: { type: "string" } }, missingCategoryName: { type: "string" }, missingCategoryNameTranslationKey: { type: "string" }, options: { type: "array", items: { type: "string" } } } };
|
|
24526
|
+
var tr = { type: "object", additionalProperties: true, required: ["slug", "items"], properties: { show: { type: "boolean" }, slug: { type: "string" }, filters: { type: "array", items: er }, groupByFirstFilter: { type: "boolean" }, filterValuesCasing: { type: "string", enum: ["sentence", "original", "lowercase", "uppercase"] }, items: pe, requiredPermission: { type: "string" }, separateVersions: { type: "boolean" }, title: { type: "string" }, titleTranslationKey: { type: "string" }, description: { type: "string" }, descriptionTranslationKey: { type: "string" } } };
|
|
24527
|
+
var E = { type: "object", patternProperties: { ".*": tr } };
|
|
24528
|
+
var v = { nodeTypeName: s.ScorecardClassic, description: "Add and create sets of rules and test your API description files against them. With these rules you can maintain quality across your existing APIs and ensure that newly-added or updated APIs match your criteria. An API scorecard can include multiple sets of rules, corresponding to different quality levels.", documentationLink: "https://redocly.com/docs/realm/config/scorecard-classic", type: "object", additionalProperties: true, required: [], properties: { ignoreNonCompliant: { type: "boolean", default: false }, teamMetadataProperty: { nodeTypeName: s.ScorecardClassicTeamMetadataProperty, description: "Provide custom team label and team metadata property.", documentationLink: "https://redocly.com/docs/realm/config/scorecard-classic#team-metadata-object", type: "object", properties: { property: { type: "string" }, label: { type: "string" }, default: { type: "string" } } }, levels: { nodeTypeName: s.ScorecardClassicLevelList, description: "List of levels to score against.", type: "array", items: { nodeTypeName: s.ScorecardClassicLevel, documentationLink: "https://redocly.com/docs/realm/config/scorecard-classic#level-object", type: "object", required: ["name"], properties: { name: { type: "string" }, color: { type: "string" }, ...b }, additionalProperties: false } }, targets: { nodeTypeName: s.ScorecardClassicTargetList, description: "Provide custom `minimumLevel` for specific targets.", type: "array", items: { nodeTypeName: s.ScorecardClassicTarget, type: "object", required: ["where"], properties: { minimumLevel: { type: "string" }, rules: { type: "object", additionalProperties: true }, where: { nodeTypeName: s.ScorecardClassicTargetWhere, description: "Specify which API descriptions to apply the `minimumLevel` to based on the metadata.", documentationLink: "https://redocly.com/docs/realm/config/scorecard-classic#where-object", type: "object", required: ["metadata"], properties: { metadata: { nodeTypeName: s.ScorecardClassicTargetWhereMetadata, type: "object", additionalProperties: { type: "string" } } }, additionalProperties: false } }, additionalProperties: false } }, ignore: { type: "array", items: { type: "string" } }, fromProjectUrl: { type: "string", format: "uri" } } };
|
|
24529
|
+
var rr = { type: "object", required: ["key"], properties: { key: { type: "string" } }, additionalProperties: false };
|
|
24530
|
+
var or = { type: "object", required: ["type"], properties: { type: { type: "string" } }, additionalProperties: false };
|
|
24531
|
+
var sr = { type: "object", required: ["property", "title"], properties: { property: { type: "string" }, hide: { type: "boolean" }, label: { type: "string" }, options: { type: "array", items: { type: "string" } }, type: { type: "string", enum: ["select", "checkboxes", "date-range"], default: "checkboxes" }, title: { type: "string" }, titleTranslationKey: { type: "string" }, parentFilter: { type: "string" }, valuesMapping: { type: "object", additionalProperties: { type: "string" } } }, additionalProperties: false };
|
|
24532
|
+
var y = { type: "object", properties: { slug: { type: "string" }, hide: { type: "boolean" }, includes: { type: "array", items: or }, excludes: { type: "array", items: rr }, filters: { type: "array", items: sr }, titleTranslationKey: { type: "string" }, descriptionTranslationKey: { type: "string" }, catalogSwitcherLabelTranslationKey: { type: "string" } }, additionalProperties: false };
|
|
24533
|
+
var ir = { type: "object", properties: { type: { type: "string", enum: ["string", "number", "boolean", "array", "object"] }, description: { type: "string" }, example: { oneOf: [{ type: "string" }, { type: "number" }, { type: "boolean" }, { type: "array" }, { type: "object" }] }, enum: { type: "array", items: { type: "string" } }, pattern: { type: "string" }, format: { type: "string" }, minimum: { type: "number" }, maximum: { type: "number" }, items: { type: "object" } }, additionalProperties: true };
|
|
24534
|
+
var ar = { type: "object", required: ["type", "properties"], properties: { type: { type: "string", enum: ["object"] }, description: { type: "string" }, properties: { type: "object", additionalProperties: ir }, required: { type: "array", items: { type: "string" } }, additionalProperties: { type: "boolean" } }, additionalProperties: true };
|
|
24535
|
+
var nr = { type: "object", required: ["name", "description", "metadataSchema"], properties: { name: { type: "string", description: "Display name of the entity type" }, description: { type: "string", description: "Description of the entity type" }, metadataSchema: ar, icon: { type: "object", properties: { src: { type: "string" }, srcSet: { type: "string" } }, additionalProperties: false } }, additionalProperties: false };
|
|
24536
|
+
var pr = { type: "object", additionalProperties: nr };
|
|
24537
|
+
var Z = { type: "object", properties: { show: { type: "boolean", default: false }, entityTypes: pr, catalogs: { type: "object", properties: { all: y, services: y, domains: y, teams: y, users: y, apiDescriptions: y, dataSchemas: y, apiOperations: y }, additionalProperties: y } }, additionalProperties: false };
|
|
24538
|
+
var Ae = { type: "string", enum: ["eq", "in", "gt", "gte", "lt", "lte", "contains", "startsWith", "endsWith", "exists", "isEmpty", "between", "matches", "some", "every", "none"] };
|
|
24539
|
+
var ye = { type: "string", enum: ["and", "or"] };
|
|
24540
|
+
var le = { type: "object", properties: { field: { type: "string" }, operator: Ae, value: { oneOf: [{ type: "boolean" }, { type: "string" }, { type: "number" }] }, modifier: { type: "string", enum: ["not"] }, match: { type: "array", items: { type: "object", properties: { field: { type: "string" }, operator: Ae, value: { oneOf: [{ type: "boolean" }, { type: "string" }, { type: "number" }] }, modifier: { type: "string", enum: ["not"] } } } } } };
|
|
24541
|
+
var cr = { type: "object", properties: { operator: ye, conditions: { type: "array", items: le } }, required: ["operator", "conditions"], additionalProperties: false };
|
|
24542
|
+
var Le = { type: "array", items: { oneOf: [le, { type: "object", properties: { operator: ye, conditions: { type: "array", items: { oneOf: [le, cr] } } }, required: ["operator", "conditions"], additionalProperties: false }] } };
|
|
24543
|
+
var _e = { type: "object", properties: { defined: { type: "boolean" }, nonEmpty: { type: "boolean" }, eq: {}, gt: { type: "number" }, gte: { type: "number" }, lt: { type: "number" }, lte: { type: "number" }, const: {} }, additionalProperties: false };
|
|
24544
|
+
var lr = { type: "array", items: { type: "object", properties: { subject: { type: "object", properties: { type: { type: "string", enum: ["Entity", "EntityMetadata", "EntityRelations", "EntityRelation"] }, property: { type: "string" } }, required: ["type", "property"], additionalProperties: false }, assertions: _e }, required: ["subject", "assertions"], additionalProperties: false } };
|
|
24545
|
+
var yr = { type: "object", properties: { title: { type: "string" }, subject: { type: "object", properties: { type: { type: "string", enum: ["Entity", "EntityMetadata", "EntityRelations", "EntityRelation"] }, property: { type: "string" } }, required: ["type", "property"], additionalProperties: false }, severity: { type: "string", enum: ["error", "warn", "off"] }, message: { type: "string" }, assertions: _e, where: lr, weight: { type: "number", default: 1 } }, required: ["subject", "assertions"], additionalProperties: false };
|
|
24546
|
+
var dr = { type: "object", additionalProperties: { oneOf: [{ type: "string" }, { type: "object", properties: { severity: { type: "string", enum: ["error", "warn", "off"] }, weight: { type: "number", default: 1 } }, additionalProperties: true }, yr] } };
|
|
24547
|
+
var gr = { type: "object", properties: { name: { type: "string" }, extends: b.extends, rules: dr }, required: ["name"], additionalProperties: false };
|
|
24548
|
+
var De = { type: "object", properties: { event: { type: "string", enum: ["runtime", "manual"] } }, required: ["event"], additionalProperties: false };
|
|
24549
|
+
var mr = { oneOf: [De, { type: "array", items: De }] };
|
|
24550
|
+
var ur = { type: "object", properties: { name: { type: "string" }, key: { type: "string" }, description: { type: "string" }, entities: { oneOf: [Le, { type: "object", properties: { operator: ye, conditions: Le }, required: ["operator", "conditions"], additionalProperties: false }] }, levels: { type: "array", items: gr, minItems: 1 }, trigger: mr }, required: ["name", "key", "entities", "levels"], additionalProperties: false };
|
|
24551
|
+
var ee = { type: "array", items: ur };
|
|
24552
|
+
var i = { type: "object", properties: { imports: { type: "array", items: { type: "string" } }, logo: q, navbar: w, products: M, footer: U, sidebar: B, scripts: G, links: z, feedback: c, search: F, aiAssistant: Y, colorMode: V, palette: j, navigation: K, codeSnippet: H, markdown: W, openapi: T, asyncapi: xe, graphql: P, analytics: $, userMenu: X, versionPicker: J, breadcrumbs: Q, catalog: E, entitiesCatalog: Z, catalogClassic: E, scorecard: v, scorecardClassic: v, scorecards: ee }, additionalProperties: true };
|
|
24553
|
+
var de = "https://redocly.com/sso/teams";
|
|
24554
|
+
var ge = ((o) => (o.OIDC = "OIDC", o.SAML2 = "SAML2", o))(ge || {});
|
|
24555
|
+
var me = ((o) => (o.SERVICE_ACCOUNT = "SERVICE_ACCOUNT", o.OAUTH2 = "OAUTH2", o))(me || {});
|
|
24556
|
+
var Oe = ((o) => (o.STACKED = "stacked", o.THREE_PANEL = "three-panel", o))(Oe || {});
|
|
24557
|
+
var te = "^[a-z0-9]+(?:-[a-z0-9]+)*$";
|
|
24558
|
+
var hr = new RegExp(te);
|
|
24559
|
+
var Ne = 63;
|
|
24560
|
+
var Cr = `Unique ID cannot exceed ${Ne} characters`;
|
|
24561
|
+
var re = ["redocly", "corporate", "guest"];
|
|
24562
|
+
var Pr = `Unique ID cannot be a reserved word (${re.join(", ")})`;
|
|
24563
|
+
var ue = ["REDOCLY", "CORPORATE", "GUEST"];
|
|
24564
|
+
function oe(d, m, o) {
|
|
24553
24565
|
return Object.fromEntries(Object.entries(d).map(([f, h]) => {
|
|
24554
|
-
if (!(f === m && o !== "properties")) return typeof h != "object" || !h ? [f, h] : Array.isArray(h) ? [f, h.map((
|
|
24566
|
+
if (!(f === m && o !== "properties")) return typeof h != "object" || !h ? [f, h] : Array.isArray(h) ? [f, h.map((ie) => typeof ie == "object" ? oe(ie, m, f) : ie)] : [f, oe(h, m, f)];
|
|
24555
24567
|
}).filter(Boolean));
|
|
24556
24568
|
}
|
|
24557
|
-
var
|
|
24558
|
-
var
|
|
24559
|
-
var
|
|
24560
|
-
var
|
|
24561
|
-
var
|
|
24562
|
-
var
|
|
24563
|
-
var
|
|
24564
|
-
var
|
|
24565
|
-
var
|
|
24566
|
-
var
|
|
24567
|
-
var
|
|
24568
|
-
var
|
|
24569
|
-
var
|
|
24570
|
-
var
|
|
24571
|
-
var we = { type: "
|
|
24572
|
-
var
|
|
24573
|
-
var
|
|
24574
|
-
var
|
|
24575
|
-
var
|
|
24576
|
-
var
|
|
24569
|
+
var xr = { type: "object", additionalProperties: { type: "string" } };
|
|
24570
|
+
var jr = { type: "object", additionalProperties: false, patternProperties: { "^[a-zA-Z0-9_-]+$": { type: "string", pattern: "^https?://[^\\s/$.?#].[^\\s]*$" } } };
|
|
24571
|
+
var se = { type: "string", enum: ["error", "warn", "off"] };
|
|
24572
|
+
var Tr = { type: "object", additionalProperties: false, properties: { schemaCheck: se, statusCodeCheck: se, contentTypeCheck: se, successCriteriaCheck: se } };
|
|
24573
|
+
var Er = { type: "object", properties: { event: { type: "string", enum: ["schedule"] }, interval: { type: "string", enum: ["1m", "2m", "5m", "10m", "15m", "30m", "1h", "3h", "6h", "12h", "1d", "7d"] } }, required: ["event"], additionalProperties: false };
|
|
24574
|
+
var vr = { type: "object", properties: { event: { type: "string", enum: ["build"] } }, required: ["event"], additionalProperties: false };
|
|
24575
|
+
var Rr = { type: "object", properties: { warn: { type: "number" }, error: { type: "number" } }, additionalProperties: false };
|
|
24576
|
+
var qe = { type: "object", properties: { ignoreLint: { oneOf: [{ type: "boolean", default: false }, { type: "object", additionalProperties: { type: "boolean" } }] }, ignoreLinkChecker: { type: "boolean" }, ignoreMarkdocErrors: { type: "boolean" }, ignoreRespectMonitoring: { type: "boolean" }, jobs: { type: "array", items: { type: "object", properties: { path: { type: "string", pattern: "^(?!\\/|\\.\\./)" }, agent: { type: "string", enum: ["respect"] }, trigger: { oneOf: [Er, vr] }, inputs: xr, servers: jr, severity: Tr, slo: Rr }, required: ["path", "trigger", "agent"], additionalProperties: false } } }, additionalProperties: false };
|
|
24577
|
+
var kr = { type: "object", properties: { end_session_endpoint: { type: "string" }, token_endpoint: { type: "string" }, authorization_endpoint: { type: "string" }, jwks_uri: { type: "string" } }, required: ["token_endpoint", "authorization_endpoint"], additionalProperties: true };
|
|
24578
|
+
var Ir = { type: "object", properties: { type: { type: "string", const: "OIDC" }, title: { type: "string" }, pkce: { type: "boolean", default: false }, configurationUrl: { type: "string", minLength: 1 }, configuration: kr, clientId: { type: "string", minLength: 1 }, clientSecret: { type: "string", minLength: 0 }, teamsClaimName: { type: "string" }, teamsClaimMap: { type: "object", additionalProperties: { type: "string" } }, defaultTeams: { type: "array", items: { type: "string" } }, scopes: { type: "array", items: { type: "string" } }, tokenExpirationTime: { type: "number" }, authorizationRequestCustomParams: { type: "object", additionalProperties: { type: "string" } }, introspectEndpoint: { type: "string" }, tokenRequestCustomParams: { type: "object", additionalProperties: { type: "string" } }, audience: { type: "array", items: { type: "string" } } }, required: ["type", "clientId"], oneOf: [{ required: ["configurationUrl"] }, { required: ["configuration"] }], additionalProperties: false };
|
|
24579
|
+
var Ar = { type: "object", properties: { type: { type: "string", const: "SAML2" }, title: { type: "string" }, issuerId: { type: "string" }, entityId: { type: "string" }, ssoUrl: { type: "string" }, x509PublicCert: { type: "string" }, teamsAttributeName: { type: "string", default: de }, teamsAttributeMap: { type: "object", additionalProperties: { type: "string" } }, defaultTeams: { type: "array", items: { type: "string" } } }, additionalProperties: false, required: ["type", "issuerId", "ssoUrl", "x509PublicCert"] };
|
|
24580
|
+
var Lr = { oneOf: [Ir, Ar], discriminator: { propertyName: "type" } };
|
|
24581
|
+
var Dr = { type: "object", additionalProperties: Lr };
|
|
24582
|
+
var Ge = { oneOf: [{ type: "array", items: { type: "string", enum: ue }, uniqueItems: true }, { type: "string", enum: ue }] };
|
|
24583
|
+
var we = { type: "string", pattern: te, not: { enum: [...re] } };
|
|
24584
|
+
var ze = { oneOf: [{ type: "array", items: we, uniqueItems: true }, we] };
|
|
24585
|
+
var Fe = { type: "boolean" };
|
|
24586
|
+
var Ye = { type: "string", pattern: "^https?://.*" };
|
|
24587
|
+
var Ve = { type: "string", pattern: "^https?://.*" };
|
|
24588
|
+
var _r = { type: "object", properties: { to: { type: "string" }, type: { type: "number", default: 301 } }, additionalProperties: false, nodeTypeName: s.RedirectSource, description: "Source is an absolute path that must start with a forward slash.", documentationLink: "https://redocly.com/docs/realm/config/redirects#sources-map" };
|
|
24589
|
+
var Or = { type: "object", additionalProperties: _r, default: {}, nodeTypeName: s.Redirects, description: "Use redirects to change which resource a URL points to, maintaining working links when you move, rename, or restructure content.", documentationLink: "https://redocly.com/docs/realm/config/redirects" };
|
|
24590
|
+
var Nr = { type: "string", enum: ["info", "success", "warning", "error"], default: "info" };
|
|
24577
24591
|
var e = { type: "object", additionalProperties: { type: "string" } };
|
|
24578
|
-
var
|
|
24579
|
-
var
|
|
24580
|
-
var
|
|
24581
|
-
var
|
|
24582
|
-
var
|
|
24583
|
-
var
|
|
24584
|
-
var
|
|
24585
|
-
var
|
|
24586
|
-
var
|
|
24587
|
-
var
|
|
24588
|
-
var
|
|
24589
|
-
var
|
|
24590
|
-
var
|
|
24591
|
-
var
|
|
24592
|
-
var
|
|
24593
|
-
var
|
|
24594
|
-
var
|
|
24595
|
-
var
|
|
24596
|
-
var
|
|
24597
|
-
var
|
|
24598
|
-
var
|
|
24599
|
-
var
|
|
24600
|
-
var
|
|
24601
|
-
var I = { type: "object", properties: { imports: { type: "array", items: { type: "string" } }, licenseKey: { type: "string" }, redirects:
|
|
24602
|
-
var
|
|
24603
|
-
var
|
|
24604
|
-
var
|
|
24605
|
-
var
|
|
24606
|
-
var
|
|
24607
|
-
var t =
|
|
24608
|
-
var
|
|
24609
|
-
var
|
|
24610
|
-
var
|
|
24611
|
-
var
|
|
24612
|
-
var
|
|
24613
|
-
var
|
|
24614
|
-
var
|
|
24615
|
-
var
|
|
24616
|
-
var
|
|
24617
|
-
var
|
|
24618
|
-
var g = { version: { type: "string" }, key: { type: "string", pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$", minLength: 2, maxLength: 150 }, type: { type: "string", enum: ["user", "data-schema", "api-operation", "api-description", "service", "domain", "team"] }, title: { type: "string", minLength: 2, maxLength: 200 }, summary: { type: "string", minLength: 1, maxLength: 500 }, tags: { type: "array", items: { type: "string", minLength: 1, maxLength: 50 } }, git: { type: "array", items: { type: "string" } }, contact:
|
|
24619
|
-
var
|
|
24620
|
-
var
|
|
24592
|
+
var qr = { type: "object", properties: { trackingId: { type: "string" }, content: { type: "string" }, dismissible: { type: "boolean", default: false }, target: { type: "string" }, color: Nr, rbac: e, startAt: { type: "string", format: "date-time" }, endAt: { type: "string", format: "date-time" } }, required: ["content"], additionalProperties: false };
|
|
24593
|
+
var wr = { type: "array", items: qr, default: [] };
|
|
24594
|
+
var fe = { type: "object", properties: { root: { type: "string" }, output: { type: "string", pattern: "(.ya?ml|.json)$" }, rbac: e, openapi: T, graphql: P, theme: { type: "object", properties: { openapi: T, graphql: P }, additionalProperties: false }, title: { type: "string" }, metadata: { type: "object", additionalProperties: true }, ...b }, required: ["root"] };
|
|
24595
|
+
var Mr = { type: "object", additionalProperties: true };
|
|
24596
|
+
var Ur = { type: "object", additionalProperties: { type: "object", additionalProperties: true } };
|
|
24597
|
+
var Me = { type: "object", properties: { hide: { type: "boolean", default: false }, title: { type: "string" }, description: { type: "string" }, details: { type: "object", properties: { path: { type: "string" }, content: { type: "string" } }, additionalProperties: false }, excludeFiles: { type: "array", items: { type: "string" }, default: [] }, sections: { type: "array", items: { type: "object", properties: { title: { type: "string" }, description: { type: "string" }, includeFiles: { type: "array", items: { type: "string" }, default: [] }, excludeFiles: { type: "array", items: { type: "string" }, default: [] } }, required: ["title"], additionalProperties: false } } }, default: { hide: false, title: void 0, description: void 0, details: void 0, sections: [{ title: "Table of contents", includeFiles: ["**/*"], excludeFiles: [] }] }, additionalProperties: false };
|
|
24598
|
+
var Ue = { type: "object", properties: { title: { type: "string" }, projectTitle: { type: "string" }, description: { type: "string" }, siteUrl: { type: "string" }, image: { type: "string" }, keywords: { oneOf: [{ type: "array", items: { type: "string" } }, { type: "string" }] }, lang: { type: "string" }, jsonLd: { type: "object" }, meta: { type: "array", items: { type: "object", properties: { name: { type: "string" }, content: { type: "string" } }, required: ["name", "content"], additionalProperties: false } }, llmstxt: Me }, default: { llmstxt: Me.default }, additionalProperties: false };
|
|
24599
|
+
var Br = { type: "object", properties: { folders: { type: "array", items: { type: "string" } } }, additionalProperties: false };
|
|
24600
|
+
var Gr = { type: "object", properties: { catalogs: { type: "object", properties: { all: e, services: e, domains: e, teams: e, users: e, apiDescriptions: e, dataSchemas: e, apiOperations: e }, additionalProperties: e }, entitiesTypes: { type: "object", properties: { service: e, domain: e, team: e, user: e, apiDescription: e, apiOperation: e, dataSchema: e }, additionalProperties: e }, entitiesGroups: { type: "array", items: { type: "object", properties: { entities: { type: "array", items: { type: "string" } }, config: e }, additionalProperties: false } }, entities: { type: "object", properties: { "**": e }, additionalProperties: e } }, additionalProperties: false };
|
|
24601
|
+
var he = { type: "object", properties: { teamNamePatterns: { type: "array", items: { type: "string" } }, teamFolders: { type: "array", items: { type: "string" } }, teamFoldersBaseRoles: e, cms: e, reunite: e, features: { type: "object", properties: { aiSearch: e }, additionalProperties: false }, content: { type: "object", properties: { "**": e }, additionalProperties: e }, entitiesCatalog: Gr }, additionalProperties: e };
|
|
24602
|
+
var zr = { type: "object", properties: { static: { type: "string" } }, additionalProperties: false, required: ["static"] };
|
|
24603
|
+
var Fr = { type: "object", properties: { idp: { type: "string" } }, additionalProperties: false, required: ["idp"] };
|
|
24604
|
+
var Yr = { type: "object", properties: { type: { type: "string", const: "GRAVITEE" }, apiBaseUrl: { type: "string" }, env: { type: "string" }, allowApiProductsOutsideCatalog: { type: "boolean", default: false }, stage: { type: "string", default: "non-production" }, auth: { oneOf: [zr, Fr] } }, additionalProperties: false, required: ["type", "apiBaseUrl"] };
|
|
24605
|
+
var Vr = { type: "object", properties: { type: { type: "string", const: "OAUTH2" }, tokenEndpoint: { type: "string" }, clientId: { type: "string" }, clientSecret: { type: "string" } }, additionalProperties: false, required: ["type", "tokenEndpoint", "clientId", "clientSecret"] };
|
|
24606
|
+
var Kr = { type: "object", properties: { type: { type: "string", const: "SERVICE_ACCOUNT" }, serviceAccountEmail: { type: "string" }, serviceAccountPrivateKey: { type: "string" } }, additionalProperties: false, required: ["type", "serviceAccountEmail", "serviceAccountPrivateKey"] };
|
|
24607
|
+
var be = { type: "object", properties: { type: { type: "string", const: "APIGEE_X" }, apiUrl: { type: "string" }, stage: { type: "string", default: "non-production" }, organizationName: { type: "string" }, ignoreApiProducts: { type: "array", items: { type: "string" } }, allowApiProductsOutsideCatalog: { type: "boolean", default: false }, auth: { type: "object", oneOf: [Vr, Kr], discriminator: { propertyName: "type" } } }, additionalProperties: false, required: ["type", "organizationName", "auth"] };
|
|
24608
|
+
var Hr = { ...be, properties: { ...be.properties, type: { type: "string", const: "APIGEE_EDGE" } } };
|
|
24609
|
+
var Wr = { type: "object", oneOf: [be, Hr, Yr], discriminator: { propertyName: "type" } };
|
|
24610
|
+
var $r = { type: "object", required: ["adapters"], additionalProperties: false, properties: { adapters: { type: "array", items: Wr } } };
|
|
24611
|
+
var Be = { type: "object", properties: { defaultLocale: { type: "string" }, locales: { type: "array", items: { type: "object", properties: { code: { type: "string" }, name: { type: "string" } }, required: ["code"] } } }, additionalProperties: false, required: ["defaultLocale"] };
|
|
24612
|
+
var Xr = { type: "object", properties: { name: { type: "string" }, value: { type: "string" } }, additionalProperties: false, required: ["name", "value"] };
|
|
24613
|
+
var Jr = { type: "object", properties: { hide: { type: "boolean", default: false }, docs: { type: "object", properties: { hide: { type: "boolean", default: false }, name: { type: "string", default: "Docs MCP server" }, ignore: { type: "array", items: { type: "string" }, default: [] } }, additionalProperties: false } }, additionalProperties: false, default: { hide: false, docs: { hide: false, name: "MCP server", ignore: [] } } };
|
|
24614
|
+
var Qr = { type: "object", properties: { requiresLogin: Fe, logoutReturnUrl: Ye, residency: Ve, sso: Ge, idps: ze, rbac: he }, additionalProperties: false, not: { required: ["sso", "idps"] }, description: "Use either `access.sso` (filter by category) or `access.idps` (filter by slug), not both." };
|
|
24615
|
+
var I = { type: "object", properties: { imports: { type: "array", items: { type: "string" } }, licenseKey: { type: "string" }, redirects: Or, seo: Ue, rbac: he, apiFunctions: Br, requiresLogin: Fe, responseHeaders: { type: "object", additionalProperties: { type: "array", items: Xr } }, mockServer: { type: "object", properties: { off: { type: "boolean", default: false }, position: { type: "string", enum: ["first", "last", "replace", "off"], default: "first" }, strictExamples: { type: "boolean", default: false }, errorIfForcedExampleNotFound: { type: "boolean", default: false }, description: { type: "string" } } }, apis: { type: "object", additionalProperties: fe }, ...b, ssoDirect: Dr, sso: Ge, idps: ze, residency: Ve, logoutReturnUrl: Ye, access: Qr, developerOnboarding: $r, removeAttribution: { type: "boolean" }, i18n: Be, l10n: Be, metadata: Mr, metadataGlobs: Ur, ignore: { type: "array", items: { type: "string" } }, theme: i, reunite: qe, logo: q, navbar: w, products: M, footer: U, sidebar: B, scripts: G, links: z, feedback: c, search: F, aiAssistant: Y, colorMode: V, palette: j, navigation: K, codeSnippet: H, markdown: W, openapi: T, graphql: P, analytics: $, userMenu: X, versionPicker: J, breadcrumbs: Q, catalog: E, entitiesCatalog: Z, catalogClassic: E, scorecard: v, scorecardClassic: v, scorecards: ee, mcp: Jr, corsProxy: { type: "object", properties: { allowedTargets: { type: "array", items: { type: "string" } } }, additionalProperties: false }, banner: wr }, not: { required: ["sso", "idps"] }, default: { redirects: {}, seo: Ue.default }, additionalProperties: true };
|
|
24616
|
+
var Zr = { ...oe(I, "default"), additionalProperties: false };
|
|
24617
|
+
var eo = { $id: "root-redocly-config", ...I, properties: { plugins: { type: "array", items: { type: "string" } }, ...I.properties, env: { type: "object", additionalProperties: Zr } }, default: {}, additionalProperties: false };
|
|
24618
|
+
var Se = { type: "object", properties: { logo: i.properties.logo, navbar: i.properties.navbar, footer: i.properties.footer, sidebar: i.properties.sidebar, search: i.properties.search, codeSnippet: i.properties.codeSnippet, breadcrumbs: i.properties.breadcrumbs, openapi: i.properties.openapi, feedback: i.properties.feedback, palette: j, mockServer: I.properties.mockServer, analytics: { type: "object", properties: { ga: ce } } }, additionalProperties: true, default: {} };
|
|
24619
|
+
var to = { $id: "product-config-override", type: "object", properties: { ...Se.properties, apis: { type: "object", additionalProperties: fe }, theme: Se }, additionalProperties: false };
|
|
24620
|
+
var Ce = ["partOf", "hasParts", "creates", "createdBy", "owns", "ownedBy", "implements", "implementedBy", "dependsOn", "dependencyOf", "uses", "usedBy", "produces", "consumes", "linksTo", "supersedes", "supersededBy", "compatibleWith", "extends", "extendedBy", "relatesTo", "hasMember", "memberOf", "triggers", "triggeredBy", "returns", "returnedBy"];
|
|
24621
|
+
var t = N({ UserEntity: "UserEntity", UserEntityMetadata: "UserEntityMetadata", ApiDescriptionEntity: "ApiDescriptionEntity", ApiDescriptionEntityMetadata: "ApiDescriptionEntityMetadata", ApiOperationEntity: "ApiOperationEntity", ApiOperationEntityMetadata: "ApiOperationEntityMetadata", DataSchemaEntity: "DataSchemaEntity", DataSchemaEntityMetadata: "DataSchemaEntityMetadata", ServiceEntity: "ServiceEntity", DomainEntity: "DomainEntity", TeamEntity: "TeamEntity", Entity: "Entity", EntityMetadata: "EntityMetadata", EntityLinkList: "EntityLinkList", EntityLink: "EntityLink", EntityRelation: "EntityRelation", EntityRelationList: "EntityRelationList", EntityContact: "EntityContact", EntitySlackContact: "EntitySlackContact", EntitySlackChannel: "EntitySlackChannel" });
|
|
24622
|
+
var ro = { type: "object", nodeTypeName: t.UserEntityMetadata, properties: { email: { type: "string", description: "Email of the user" } }, required: ["email"], additionalProperties: true };
|
|
24623
|
+
var oo = { type: "object", nodeTypeName: t.ApiDescriptionEntityMetadata, properties: { specType: { type: "string", enum: ["jsonschema", "openapi", "asyncapi", "avro", "zod", "graphql", "protobuf", "arazzo"], description: "Type of the API description" }, descriptionFile: { type: "string", description: "Path to the file containing the API description" } }, required: ["specType", "descriptionFile"], additionalProperties: true };
|
|
24624
|
+
var so = { type: "object", nodeTypeName: t.ApiOperationEntityMetadata, properties: { method: { type: "string", enum: ["GET", "POST", "PUT", "DELETE", "PATCH", "MUTATION", "QUERY", "SUBSCRIBE", "PUBLISH"], description: "HTTP method of the API operation" }, path: { type: "string", description: "Path of the API operation" }, payload: { type: "array", items: { type: "string", description: "Related dataSchema name" } }, responses: { type: "array", items: { type: "string", description: "Related dataSchema name" } } }, required: ["method", "path"], additionalProperties: true };
|
|
24625
|
+
var io = { type: "object", nodeTypeName: t.DataSchemaEntityMetadata, properties: { specType: { type: "string", enum: ["jsonschema", "openapi", "asyncapi", "avro", "zod", "graphql", "protobuf", "arazzo"], description: "Specification type of the data schema" }, schema: { type: "string", description: "Inline schema of the data structure" }, sdl: { type: "string", description: "SDL of the data structure" } }, required: ["specType"], additionalProperties: true };
|
|
24626
|
+
var ao = { type: "object", properties: {}, nodeTypeName: t.EntityMetadata, additionalProperties: true };
|
|
24627
|
+
var no = { type: "object", nodeTypeName: t.EntitySlackChannel, properties: { name: { type: "string", minLength: 2, maxLength: 150 }, url: { type: "string" } }, required: ["name"], additionalProperties: false };
|
|
24628
|
+
var po = { type: "object", nodeTypeName: t.EntitySlackContact, properties: { channels: { type: "array", items: no } }, required: ["channels"], additionalProperties: false };
|
|
24629
|
+
var co = { type: "object", nodeTypeName: t.EntityContact, properties: { slack: po }, additionalProperties: false };
|
|
24630
|
+
var lo = { type: "object", nodeTypeName: t.EntityLink, properties: { label: { type: "string", minLength: 2, maxLength: 150 }, url: { type: "string" } }, required: ["label", "url"], additionalProperties: false };
|
|
24631
|
+
var yo = { type: "object", nodeTypeName: t.EntityRelation, properties: { type: { type: "string", enum: Ce }, key: { type: "string", minLength: 2, maxLength: 100 }, version: { type: "string" }, revision: { type: "string" } }, required: ["type", "key"], additionalProperties: false };
|
|
24632
|
+
var g = { version: { type: "string" }, key: { type: "string", pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$", minLength: 2, maxLength: 150 }, type: { type: "string", enum: ["user", "data-schema", "api-operation", "api-description", "service", "domain", "team"] }, title: { type: "string", minLength: 2, maxLength: 200 }, summary: { type: "string", minLength: 1, maxLength: 500 }, tags: { type: "array", items: { type: "string", minLength: 1, maxLength: 50 } }, git: { type: "array", items: { type: "string" } }, contact: co, links: { type: "array", nodeTypeName: t.EntityLinkList, items: lo }, relations: { type: "array", nodeTypeName: t.EntityRelationList, items: yo }, metadata: ao };
|
|
24633
|
+
var Ps = { type: "object", discriminator: { propertyName: "type" }, oneOf: [{ type: "object", properties: { ...g, type: { const: "user" }, metadata: ro }, required: ["key", "title", "type", "metadata"], additionalProperties: false, nodeTypeName: t.UserEntity }, { type: "object", nodeTypeName: t.ApiOperationEntity, properties: { ...g, type: { const: "api-operation" }, metadata: so }, required: ["key", "title", "type", "metadata"], additionalProperties: false }, { type: "object", nodeTypeName: t.DataSchemaEntity, properties: { ...g, type: { const: "data-schema" }, metadata: io }, required: ["key", "title", "type", "metadata"], additionalProperties: false }, { type: "object", nodeTypeName: t.ApiDescriptionEntity, properties: { ...g, type: { const: "api-description" }, metadata: oo }, required: ["key", "title", "type", "metadata"], additionalProperties: false }, { type: "object", nodeTypeName: t.ServiceEntity, properties: { ...g, type: { const: "service" } }, required: ["key", "title", "type"], additionalProperties: false }, { type: "object", nodeTypeName: t.DomainEntity, properties: { ...g, type: { const: "domain" } }, required: ["key", "title", "type"], additionalProperties: false }, { type: "object", nodeTypeName: t.TeamEntity, properties: { ...g, type: { const: "team" } }, required: ["key", "title", "type"], additionalProperties: false }] };
|
|
24634
|
+
var xs = { type: "object", nodeTypeName: t.Entity, properties: { ...g }, required: ["key", "title", "type"], additionalProperties: false };
|
|
24621
24635
|
|
|
24622
24636
|
// ../core/lib/types/redocly-yaml.js
|
|
24623
24637
|
import path3 from "node:path";
|
|
24624
24638
|
|
|
24639
|
+
// ../core/lib/graphql/node-kinds.js
|
|
24640
|
+
var graphqlNodeKinds = [
|
|
24641
|
+
"Name",
|
|
24642
|
+
"Document",
|
|
24643
|
+
"OperationDefinition",
|
|
24644
|
+
"VariableDefinition",
|
|
24645
|
+
"SelectionSet",
|
|
24646
|
+
"Field",
|
|
24647
|
+
"Argument",
|
|
24648
|
+
"FragmentSpread",
|
|
24649
|
+
"InlineFragment",
|
|
24650
|
+
"FragmentDefinition",
|
|
24651
|
+
"Variable",
|
|
24652
|
+
"IntValue",
|
|
24653
|
+
"FloatValue",
|
|
24654
|
+
"StringValue",
|
|
24655
|
+
"BooleanValue",
|
|
24656
|
+
"NullValue",
|
|
24657
|
+
"EnumValue",
|
|
24658
|
+
"ListValue",
|
|
24659
|
+
"ObjectValue",
|
|
24660
|
+
"ObjectField",
|
|
24661
|
+
"Directive",
|
|
24662
|
+
"NamedType",
|
|
24663
|
+
"ListType",
|
|
24664
|
+
"NonNullType",
|
|
24665
|
+
"SchemaDefinition",
|
|
24666
|
+
"OperationTypeDefinition",
|
|
24667
|
+
"ScalarTypeDefinition",
|
|
24668
|
+
"ObjectTypeDefinition",
|
|
24669
|
+
"FieldDefinition",
|
|
24670
|
+
"InputValueDefinition",
|
|
24671
|
+
"InterfaceTypeDefinition",
|
|
24672
|
+
"UnionTypeDefinition",
|
|
24673
|
+
"EnumTypeDefinition",
|
|
24674
|
+
"EnumValueDefinition",
|
|
24675
|
+
"InputObjectTypeDefinition",
|
|
24676
|
+
"DirectiveDefinition",
|
|
24677
|
+
"SchemaExtension",
|
|
24678
|
+
"DirectiveExtension",
|
|
24679
|
+
"ScalarTypeExtension",
|
|
24680
|
+
"ObjectTypeExtension",
|
|
24681
|
+
"InterfaceTypeExtension",
|
|
24682
|
+
"UnionTypeExtension",
|
|
24683
|
+
"EnumTypeExtension",
|
|
24684
|
+
"InputObjectTypeExtension",
|
|
24685
|
+
"TypeCoordinate",
|
|
24686
|
+
"MemberCoordinate",
|
|
24687
|
+
"ArgumentCoordinate",
|
|
24688
|
+
"DirectiveCoordinate",
|
|
24689
|
+
"DirectiveArgumentCoordinate"
|
|
24690
|
+
];
|
|
24691
|
+
|
|
24625
24692
|
// ../core/lib/oas-types.js
|
|
24626
24693
|
var specVersions = [
|
|
24627
24694
|
"oas2",
|
|
@@ -24633,7 +24700,8 @@ var specVersions = [
|
|
|
24633
24700
|
"arazzo1",
|
|
24634
24701
|
"arazzo1_1",
|
|
24635
24702
|
"overlay1",
|
|
24636
|
-
"openrpc1"
|
|
24703
|
+
"openrpc1",
|
|
24704
|
+
"graphql"
|
|
24637
24705
|
];
|
|
24638
24706
|
var COMPONENT_NAME_CHARS = "a-zA-Z0-9\\.\\-_";
|
|
24639
24707
|
var typesMap = {
|
|
@@ -24649,6 +24717,8 @@ var typesMap = {
|
|
|
24649
24717
|
openrpc1: OpenRpcTypes
|
|
24650
24718
|
};
|
|
24651
24719
|
function getTypes(spec2) {
|
|
24720
|
+
if (spec2 === "graphql")
|
|
24721
|
+
return {};
|
|
24652
24722
|
return typesMap[spec2];
|
|
24653
24723
|
}
|
|
24654
24724
|
|
|
@@ -24993,6 +25063,7 @@ var builtInOpenRpc1Rules = [
|
|
|
24993
25063
|
"spec-no-duplicated-method-params",
|
|
24994
25064
|
"spec-no-required-params-after-optional"
|
|
24995
25065
|
];
|
|
25066
|
+
var builtInGraphqlRules = ["no-unused-types", "type-description"];
|
|
24996
25067
|
var builtInCommonRules = ["struct", "no-unresolved-refs"];
|
|
24997
25068
|
var builtInRules = [
|
|
24998
25069
|
...builtInOAS2Rules,
|
|
@@ -25002,6 +25073,7 @@ var builtInRules = [
|
|
|
25002
25073
|
...builtInArazzo1Rules,
|
|
25003
25074
|
...builtInOverlay1Rules,
|
|
25004
25075
|
...builtInOpenRpc1Rules,
|
|
25076
|
+
...builtInGraphqlRules,
|
|
25005
25077
|
...builtInCommonRules
|
|
25006
25078
|
];
|
|
25007
25079
|
var builtInOas2Decorators = [
|
|
@@ -25054,6 +25126,7 @@ var configGovernanceProperties = {
|
|
|
25054
25126
|
arazzo1_1Rules: "Rules",
|
|
25055
25127
|
overlay1Rules: "Rules",
|
|
25056
25128
|
openrpc1Rules: "Rules",
|
|
25129
|
+
graphqlRules: "Rules",
|
|
25057
25130
|
preprocessors: "Preprocessors",
|
|
25058
25131
|
oas2Preprocessors: "Preprocessors",
|
|
25059
25132
|
oas3_0Preprocessors: "Preprocessors",
|
|
@@ -25244,14 +25317,15 @@ function createAssertionDefinitionSubject(nodeNames) {
|
|
|
25244
25317
|
properties: {
|
|
25245
25318
|
type: {
|
|
25246
25319
|
enum: [.../* @__PURE__ */ new Set(["any", ...nodeNames, "SpecExtension"])],
|
|
25247
|
-
description: "REQUIRED. Locates the
|
|
25320
|
+
description: "REQUIRED. Locates the API node type that the lint command evaluates.",
|
|
25321
|
+
documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#subject-object"
|
|
25248
25322
|
},
|
|
25249
25323
|
property: (value) => {
|
|
25250
25324
|
if (Array.isArray(value)) {
|
|
25251
25325
|
return {
|
|
25252
25326
|
type: "array",
|
|
25253
25327
|
items: { type: "string" },
|
|
25254
|
-
description: "Property name corresponding to the
|
|
25328
|
+
description: "Property name corresponding to the API node type. If a list of properties is provided, assertions evaluate against each property in the sequence. If not provided (or null), assertions evaluate against the key names for the subject node type.",
|
|
25255
25329
|
documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#property-example"
|
|
25256
25330
|
};
|
|
25257
25331
|
} else if (value === null) {
|
|
@@ -25259,7 +25333,7 @@ function createAssertionDefinitionSubject(nodeNames) {
|
|
|
25259
25333
|
} else {
|
|
25260
25334
|
return {
|
|
25261
25335
|
type: "string",
|
|
25262
|
-
description: "Property name corresponding to the
|
|
25336
|
+
description: "Property name corresponding to the API node type. If a list of properties is provided, assertions evaluate against each property in the sequence. If not provided (or null), assertions evaluate against the key names for the subject node type.",
|
|
25263
25337
|
documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#property-example"
|
|
25264
25338
|
};
|
|
25265
25339
|
}
|
|
@@ -25287,9 +25361,9 @@ function createAssertionDefinitionSubject(nodeNames) {
|
|
|
25287
25361
|
}
|
|
25288
25362
|
function createScorecardLevelsItems(nodeTypes) {
|
|
25289
25363
|
return {
|
|
25290
|
-
...nodeTypes[
|
|
25364
|
+
...nodeTypes[s.ScorecardClassicLevel],
|
|
25291
25365
|
properties: {
|
|
25292
|
-
...nodeTypes[
|
|
25366
|
+
...nodeTypes[s.ScorecardClassicLevel]?.properties,
|
|
25293
25367
|
...configGovernanceProperties
|
|
25294
25368
|
}
|
|
25295
25369
|
};
|
|
@@ -25449,7 +25523,8 @@ var ConfigurableRule = {
|
|
|
25449
25523
|
};
|
|
25450
25524
|
function createConfigTypes(extraSchemas, config) {
|
|
25451
25525
|
const nodeNames = specVersions.flatMap((version) => {
|
|
25452
|
-
const
|
|
25526
|
+
const baseTypes = getTypes(version);
|
|
25527
|
+
const types2 = config ? config.extendTypes(baseTypes, version) : baseTypes;
|
|
25453
25528
|
return Object.keys(types2);
|
|
25454
25529
|
});
|
|
25455
25530
|
const { ctx: nodeTypes } = getNodeTypesFromJSONSchema("rootRedoclyConfigSchema", extraSchemas);
|
|
@@ -25458,9 +25533,9 @@ function createConfigTypes(extraSchemas, config) {
|
|
|
25458
25533
|
ConfigRoot: createConfigRoot(nodeTypes),
|
|
25459
25534
|
// This is the REAL config root type
|
|
25460
25535
|
ConfigApisProperties: createConfigApisProperties(nodeTypes),
|
|
25461
|
-
Subject: createAssertionDefinitionSubject(nodeNames),
|
|
25536
|
+
Subject: createAssertionDefinitionSubject([...nodeNames, ...graphqlNodeKinds]),
|
|
25462
25537
|
...nodeTypes,
|
|
25463
|
-
[
|
|
25538
|
+
[s.ScorecardClassicLevel]: createScorecardLevelsItems(nodeTypes)
|
|
25464
25539
|
};
|
|
25465
25540
|
}
|
|
25466
25541
|
var CoreConfigTypes = {
|
|
@@ -25481,9 +25556,9 @@ var CoreConfigTypes = {
|
|
|
25481
25556
|
Preprocessors,
|
|
25482
25557
|
Assertions
|
|
25483
25558
|
};
|
|
25484
|
-
var { theme: _2, ...propertiesWithoutTheme } =
|
|
25559
|
+
var { theme: _2, ...propertiesWithoutTheme } = eo.properties;
|
|
25485
25560
|
var redoclyConfigSchemaWithoutTheme = {
|
|
25486
|
-
...
|
|
25561
|
+
...eo,
|
|
25487
25562
|
properties: propertiesWithoutTheme
|
|
25488
25563
|
};
|
|
25489
25564
|
var ConfigTypes = createConfigTypes(redoclyConfigSchemaWithoutTheme);
|
|
@@ -28425,8 +28500,8 @@ var Config = class _Config {
|
|
|
28425
28500
|
this._alias = opts.alias;
|
|
28426
28501
|
this.plugins = opts.plugins || [];
|
|
28427
28502
|
this.doNotResolveExamples = !!resolvedConfig.resolve?.doNotResolveExamples;
|
|
28428
|
-
const group = (
|
|
28429
|
-
return groupAssertionRules({ rules:
|
|
28503
|
+
const group = (rules9) => {
|
|
28504
|
+
return groupAssertionRules({ rules: rules9 }, this.plugins);
|
|
28430
28505
|
};
|
|
28431
28506
|
this.rules = {
|
|
28432
28507
|
oas2: group({ ...resolvedConfig.rules, ...resolvedConfig.oas2Rules }),
|
|
@@ -28438,7 +28513,12 @@ var Config = class _Config {
|
|
|
28438
28513
|
arazzo1: group({ ...resolvedConfig.rules, ...resolvedConfig.arazzo1Rules }),
|
|
28439
28514
|
arazzo1_1: group({ ...resolvedConfig.rules, ...resolvedConfig.arazzo1_1Rules }),
|
|
28440
28515
|
overlay1: group({ ...resolvedConfig.rules, ...resolvedConfig.overlay1Rules }),
|
|
28441
|
-
openrpc1: group({ ...resolvedConfig.rules, ...resolvedConfig.openrpc1Rules })
|
|
28516
|
+
openrpc1: group({ ...resolvedConfig.rules, ...resolvedConfig.openrpc1Rules }),
|
|
28517
|
+
graphql: group({
|
|
28518
|
+
// removing common ref-resolution rules from the GraphQL ruleset:
|
|
28519
|
+
...omit(resolvedConfig.rules ?? {}, ["no-unresolved-refs"]),
|
|
28520
|
+
...resolvedConfig.graphqlRules
|
|
28521
|
+
})
|
|
28442
28522
|
};
|
|
28443
28523
|
this.preprocessors = {
|
|
28444
28524
|
oas2: { ...resolvedConfig.preprocessors, ...resolvedConfig.oas2Preprocessors },
|
|
@@ -28477,7 +28557,8 @@ var Config = class _Config {
|
|
|
28477
28557
|
openrpc1: {
|
|
28478
28558
|
...resolvedConfig.preprocessors,
|
|
28479
28559
|
...resolvedConfig.openrpc1Preprocessors
|
|
28480
|
-
}
|
|
28560
|
+
},
|
|
28561
|
+
graphql: {}
|
|
28481
28562
|
};
|
|
28482
28563
|
this.decorators = {
|
|
28483
28564
|
oas2: { ...resolvedConfig.decorators, ...resolvedConfig.oas2Decorators },
|
|
@@ -28495,7 +28576,8 @@ var Config = class _Config {
|
|
|
28495
28576
|
openrpc1: {
|
|
28496
28577
|
...resolvedConfig.decorators,
|
|
28497
28578
|
...resolvedConfig.openrpc1Decorators
|
|
28498
|
-
}
|
|
28579
|
+
},
|
|
28580
|
+
graphql: {}
|
|
28499
28581
|
};
|
|
28500
28582
|
this.ignore = opts.ignore ?? {};
|
|
28501
28583
|
}
|
|
@@ -28596,6 +28678,8 @@ var Config = class _Config {
|
|
|
28596
28678
|
continue;
|
|
28597
28679
|
extendedTypes = plugin.typeExtension.openrpc1(extendedTypes, version);
|
|
28598
28680
|
break;
|
|
28681
|
+
case "graphql":
|
|
28682
|
+
break;
|
|
28599
28683
|
default:
|
|
28600
28684
|
throw new Error("Not implemented");
|
|
28601
28685
|
}
|
|
@@ -28640,16 +28724,16 @@ var Config = class _Config {
|
|
|
28640
28724
|
}
|
|
28641
28725
|
}
|
|
28642
28726
|
getUnusedRules() {
|
|
28643
|
-
const
|
|
28727
|
+
const rules9 = [];
|
|
28644
28728
|
const decorators8 = [];
|
|
28645
28729
|
const preprocessors8 = [];
|
|
28646
28730
|
for (const usedVersion of Array.from(this._usedVersions)) {
|
|
28647
|
-
|
|
28731
|
+
rules9.push(...Object.keys(this.rules[usedVersion]).filter((name) => !this._usedRules.has(name)));
|
|
28648
28732
|
decorators8.push(...Object.keys(this.decorators[usedVersion]).filter((name) => !this._usedRules.has(name)));
|
|
28649
28733
|
preprocessors8.push(...Object.keys(this.preprocessors[usedVersion]).filter((name) => !this._usedRules.has(name)));
|
|
28650
28734
|
}
|
|
28651
28735
|
return {
|
|
28652
|
-
rules:
|
|
28736
|
+
rules: rules9,
|
|
28653
28737
|
preprocessors: preprocessors8,
|
|
28654
28738
|
decorators: decorators8
|
|
28655
28739
|
};
|
|
@@ -28657,58 +28741,71 @@ var Config = class _Config {
|
|
|
28657
28741
|
// TODO: add rules for redocly.yaml / entities?
|
|
28658
28742
|
getRulesForSpecVersion(version) {
|
|
28659
28743
|
switch (version) {
|
|
28660
|
-
case "oas3":
|
|
28744
|
+
case "oas3": {
|
|
28661
28745
|
const oas3Rules = [];
|
|
28662
28746
|
this.plugins.forEach((p2) => p2.preprocessors?.oas3 && oas3Rules.push(p2.preprocessors.oas3));
|
|
28663
28747
|
this.plugins.forEach((p2) => p2.rules?.oas3 && oas3Rules.push(p2.rules.oas3));
|
|
28664
28748
|
this.plugins.forEach((p2) => p2.decorators?.oas3 && oas3Rules.push(p2.decorators.oas3));
|
|
28665
28749
|
return oas3Rules;
|
|
28666
|
-
|
|
28750
|
+
}
|
|
28751
|
+
case "oas2": {
|
|
28667
28752
|
const oas2Rules = [];
|
|
28668
28753
|
this.plugins.forEach((p2) => p2.preprocessors?.oas2 && oas2Rules.push(p2.preprocessors.oas2));
|
|
28669
28754
|
this.plugins.forEach((p2) => p2.rules?.oas2 && oas2Rules.push(p2.rules.oas2));
|
|
28670
28755
|
this.plugins.forEach((p2) => p2.decorators?.oas2 && oas2Rules.push(p2.decorators.oas2));
|
|
28671
28756
|
return oas2Rules;
|
|
28672
|
-
|
|
28757
|
+
}
|
|
28758
|
+
case "async2": {
|
|
28673
28759
|
const asyncApi2Rules = [];
|
|
28674
28760
|
this.plugins.forEach((p2) => p2.preprocessors?.async2 && asyncApi2Rules.push(p2.preprocessors.async2));
|
|
28675
28761
|
this.plugins.forEach((p2) => p2.rules?.async2 && asyncApi2Rules.push(p2.rules.async2));
|
|
28676
28762
|
this.plugins.forEach((p2) => p2.decorators?.async2 && asyncApi2Rules.push(p2.decorators.async2));
|
|
28677
28763
|
return asyncApi2Rules;
|
|
28678
|
-
|
|
28764
|
+
}
|
|
28765
|
+
case "async3": {
|
|
28679
28766
|
const asyncApi3Rules = [];
|
|
28680
28767
|
this.plugins.forEach((p2) => p2.preprocessors?.async3 && asyncApi3Rules.push(p2.preprocessors.async3));
|
|
28681
28768
|
this.plugins.forEach((p2) => p2.rules?.async3 && asyncApi3Rules.push(p2.rules.async3));
|
|
28682
28769
|
this.plugins.forEach((p2) => p2.decorators?.async3 && asyncApi3Rules.push(p2.decorators.async3));
|
|
28683
28770
|
return asyncApi3Rules;
|
|
28684
|
-
|
|
28771
|
+
}
|
|
28772
|
+
case "arazzo1": {
|
|
28685
28773
|
const arazzo1Rules = [];
|
|
28686
28774
|
this.plugins.forEach((p2) => p2.preprocessors?.arazzo1 && arazzo1Rules.push(p2.preprocessors.arazzo1));
|
|
28687
28775
|
this.plugins.forEach((p2) => p2.rules?.arazzo1 && arazzo1Rules.push(p2.rules.arazzo1));
|
|
28688
28776
|
this.plugins.forEach((p2) => p2.decorators?.arazzo1 && arazzo1Rules.push(p2.decorators.arazzo1));
|
|
28689
28777
|
return arazzo1Rules;
|
|
28690
|
-
|
|
28778
|
+
}
|
|
28779
|
+
case "arazzo1_1": {
|
|
28691
28780
|
const arazzo1_1Rules = [];
|
|
28692
28781
|
this.plugins.forEach((p2) => p2.preprocessors?.arazzo1_1 && arazzo1_1Rules.push(p2.preprocessors.arazzo1_1));
|
|
28693
28782
|
this.plugins.forEach((p2) => p2.rules?.arazzo1_1 && arazzo1_1Rules.push(p2.rules.arazzo1_1));
|
|
28694
28783
|
this.plugins.forEach((p2) => p2.decorators?.arazzo1_1 && arazzo1_1Rules.push(p2.decorators.arazzo1_1));
|
|
28695
28784
|
return arazzo1_1Rules;
|
|
28696
|
-
|
|
28785
|
+
}
|
|
28786
|
+
case "overlay1": {
|
|
28697
28787
|
const overlay1Rules = [];
|
|
28698
28788
|
this.plugins.forEach((p2) => p2.preprocessors?.overlay1 && overlay1Rules.push(p2.preprocessors.overlay1));
|
|
28699
28789
|
this.plugins.forEach((p2) => p2.rules?.overlay1 && overlay1Rules.push(p2.rules.overlay1));
|
|
28700
28790
|
this.plugins.forEach((p2) => p2.decorators?.overlay1 && overlay1Rules.push(p2.decorators.overlay1));
|
|
28701
28791
|
return overlay1Rules;
|
|
28702
|
-
|
|
28792
|
+
}
|
|
28793
|
+
case "openrpc1": {
|
|
28703
28794
|
const openrpc1Rules = [];
|
|
28704
28795
|
this.plugins.forEach((p2) => p2.preprocessors?.openrpc1 && openrpc1Rules.push(p2.preprocessors.openrpc1));
|
|
28705
28796
|
this.plugins.forEach((p2) => p2.rules?.openrpc1 && openrpc1Rules.push(p2.rules.openrpc1));
|
|
28706
28797
|
this.plugins.forEach((p2) => p2.decorators?.openrpc1 && openrpc1Rules.push(p2.decorators.openrpc1));
|
|
28707
28798
|
return openrpc1Rules;
|
|
28799
|
+
}
|
|
28800
|
+
case "graphql": {
|
|
28801
|
+
const graphqlRules = [];
|
|
28802
|
+
this.plugins.forEach((p2) => p2.rules?.graphql && graphqlRules.push(p2.rules.graphql));
|
|
28803
|
+
return graphqlRules;
|
|
28804
|
+
}
|
|
28708
28805
|
}
|
|
28709
28806
|
}
|
|
28710
|
-
skipRules(
|
|
28711
|
-
for (const ruleId of
|
|
28807
|
+
skipRules(rules9) {
|
|
28808
|
+
for (const ruleId of rules9 || []) {
|
|
28712
28809
|
for (const version of specVersions) {
|
|
28713
28810
|
if (this.rules[version][ruleId]) {
|
|
28714
28811
|
this.rules[version][ruleId] = "off";
|
|
@@ -28742,40 +28839,6 @@ var Config = class _Config {
|
|
|
28742
28839
|
}
|
|
28743
28840
|
};
|
|
28744
28841
|
|
|
28745
|
-
// ../core/lib/utils/is-defined.js
|
|
28746
|
-
function isDefined(x2) {
|
|
28747
|
-
return x2 !== void 0;
|
|
28748
|
-
}
|
|
28749
|
-
|
|
28750
|
-
// ../core/lib/config/rules.js
|
|
28751
|
-
function initRules(rules8, config, type, specVersion) {
|
|
28752
|
-
return rules8.flatMap((ruleset) => Object.keys(ruleset).map((ruleId) => {
|
|
28753
|
-
const rule = ruleset[ruleId];
|
|
28754
|
-
const ruleSettings = type === "rules" ? config.getRuleSettings(ruleId, specVersion) : type === "preprocessors" ? config.getPreprocessorSettings(ruleId, specVersion) : config.getDecoratorSettings(ruleId, specVersion);
|
|
28755
|
-
if (ruleSettings.severity === "off") {
|
|
28756
|
-
return void 0;
|
|
28757
|
-
}
|
|
28758
|
-
const severity = ruleSettings.severity;
|
|
28759
|
-
const message = ruleSettings.message;
|
|
28760
|
-
const visitors = rule(ruleSettings);
|
|
28761
|
-
if (Array.isArray(visitors)) {
|
|
28762
|
-
return visitors.map((visitor) => ({
|
|
28763
|
-
severity,
|
|
28764
|
-
ruleId,
|
|
28765
|
-
message,
|
|
28766
|
-
visitor
|
|
28767
|
-
}));
|
|
28768
|
-
}
|
|
28769
|
-
return {
|
|
28770
|
-
severity,
|
|
28771
|
-
message,
|
|
28772
|
-
ruleId,
|
|
28773
|
-
visitor: visitors
|
|
28774
|
-
// note: actually it is only one visitor object
|
|
28775
|
-
};
|
|
28776
|
-
})).flatMap((visitor) => visitor).filter(isDefined);
|
|
28777
|
-
}
|
|
28778
|
-
|
|
28779
28842
|
// ../core/lib/decorators/arazzo/index.js
|
|
28780
28843
|
var decorators = {};
|
|
28781
28844
|
|
|
@@ -29841,14 +29904,16 @@ function validateExample({ example, schema, options: options2, reference }) {
|
|
|
29841
29904
|
});
|
|
29842
29905
|
}
|
|
29843
29906
|
}
|
|
29844
|
-
|
|
29907
|
+
var MAX_ENUM_VALUES_IN_MESSAGE = 10;
|
|
29908
|
+
function validateSchemaEnumType(schemaEnum, propertyValue, propName, refLocation, { report, location }, documentationLink) {
|
|
29845
29909
|
if (!schemaEnum) {
|
|
29846
29910
|
return;
|
|
29847
29911
|
}
|
|
29848
29912
|
if (!schemaEnum.includes(propertyValue)) {
|
|
29913
|
+
const message = schemaEnum.length > MAX_ENUM_VALUES_IN_MESSAGE ? `\`${propName}\` "${propertyValue}" is not a valid value.${documentationLink ? ` See the supported values: ${documentationLink}.` : ""}` : `\`${propName}\` can be one of the following only: ${schemaEnum.map((type) => `"${type}"`).join(", ")}.`;
|
|
29849
29914
|
report({
|
|
29850
29915
|
location,
|
|
29851
|
-
message
|
|
29916
|
+
message,
|
|
29852
29917
|
from: refLocation,
|
|
29853
29918
|
suggest: getSuggest(propertyValue, schemaEnum)
|
|
29854
29919
|
});
|
|
@@ -30174,14 +30239,14 @@ var Struct = () => {
|
|
|
30174
30239
|
validateSchemaEnumType(propSchema.items?.enum, propValue[i2], propName, refLocation, {
|
|
30175
30240
|
report,
|
|
30176
30241
|
location: location.child([propName, i2])
|
|
30177
|
-
});
|
|
30242
|
+
}, propSchema.items?.documentationLink);
|
|
30178
30243
|
}
|
|
30179
30244
|
}
|
|
30180
30245
|
if (propSchema.enum) {
|
|
30181
30246
|
validateSchemaEnumType(propSchema.enum, propValue, propName, refLocation, {
|
|
30182
30247
|
report,
|
|
30183
30248
|
location: location.child([propName])
|
|
30184
|
-
});
|
|
30249
|
+
}, propSchema.documentationLink);
|
|
30185
30250
|
} else if (propSchema.type && !matchesJsonSchemaType(propValue, propSchema.type, false)) {
|
|
30186
30251
|
report({
|
|
30187
30252
|
message: `Expected type \`${propSchema.type}\` but got \`${propValueType}\`.`,
|
|
@@ -30942,6 +31007,8 @@ function getMajorSpecVersion(version) {
|
|
|
30942
31007
|
return "overlay1";
|
|
30943
31008
|
} else if (version === "openrpc1") {
|
|
30944
31009
|
return "openrpc1";
|
|
31010
|
+
} else if (version === "graphql") {
|
|
31011
|
+
return "graphql";
|
|
30945
31012
|
} else {
|
|
30946
31013
|
return "oas3";
|
|
30947
31014
|
}
|
|
@@ -31199,6 +31266,297 @@ var rules3 = {
|
|
|
31199
31266
|
};
|
|
31200
31267
|
var preprocessors3 = {};
|
|
31201
31268
|
|
|
31269
|
+
// ../core/lib/graphql/assertions.js
|
|
31270
|
+
function getGraphqlAssertsToApply(assertion) {
|
|
31271
|
+
return keysOf(asserts).filter((assertName) => assertion.assertions[assertName] !== void 0).map((assertName) => ({
|
|
31272
|
+
name: assertName,
|
|
31273
|
+
conditions: assertion.assertions[assertName],
|
|
31274
|
+
runsOnKeys: runOnKeysSet.has(assertName),
|
|
31275
|
+
runsOnValues: runOnValuesSet.has(assertName)
|
|
31276
|
+
}));
|
|
31277
|
+
}
|
|
31278
|
+
var GraphqlAssertions = (configurableRulesObject) => {
|
|
31279
|
+
const assertions = Object.values(configurableRulesObject).filter(isPlainObject);
|
|
31280
|
+
const visitors = [];
|
|
31281
|
+
for (const assertion of assertions) {
|
|
31282
|
+
if (assertion.severity === "off")
|
|
31283
|
+
continue;
|
|
31284
|
+
const kind = assertion.subject?.type;
|
|
31285
|
+
if (!kind)
|
|
31286
|
+
continue;
|
|
31287
|
+
const assertsToApply = getGraphqlAssertsToApply(assertion);
|
|
31288
|
+
const whereMatchers = buildWhereMatchers(assertion);
|
|
31289
|
+
visitors.push({
|
|
31290
|
+
[kind]: (node, ctx) => {
|
|
31291
|
+
if (!matchesWhere(node, ctx, whereMatchers))
|
|
31292
|
+
return;
|
|
31293
|
+
runGraphqlAssertion(node, ctx, assertion, assertsToApply);
|
|
31294
|
+
}
|
|
31295
|
+
});
|
|
31296
|
+
}
|
|
31297
|
+
return visitors;
|
|
31298
|
+
};
|
|
31299
|
+
function buildWhereMatchers(assertion) {
|
|
31300
|
+
if (!Array.isArray(assertion.where))
|
|
31301
|
+
return [];
|
|
31302
|
+
return assertion.where.map((definition, index) => {
|
|
31303
|
+
if (!isString(definition.subject?.type)) {
|
|
31304
|
+
throw new Error(`${assertion.assertionId} -> where -> [${index}]: 'type' (String) is required`);
|
|
31305
|
+
}
|
|
31306
|
+
return {
|
|
31307
|
+
kind: definition.subject.type,
|
|
31308
|
+
definition,
|
|
31309
|
+
assertsToApply: getGraphqlAssertsToApply(definition)
|
|
31310
|
+
};
|
|
31311
|
+
});
|
|
31312
|
+
}
|
|
31313
|
+
function matchesWhere(node, ctx, matchers) {
|
|
31314
|
+
let ancestorMatchers = matchers;
|
|
31315
|
+
const lastMatcher = matchers.at(-1);
|
|
31316
|
+
if (lastMatcher && lastMatcher.kind === node.kind) {
|
|
31317
|
+
if (!passesAsserts(node, lastMatcher, ctx))
|
|
31318
|
+
return false;
|
|
31319
|
+
ancestorMatchers = matchers.slice(0, -1);
|
|
31320
|
+
}
|
|
31321
|
+
let ancestorIndex = 0;
|
|
31322
|
+
for (const matcher of ancestorMatchers) {
|
|
31323
|
+
let matched = false;
|
|
31324
|
+
while (ancestorIndex < ctx.ancestors.length) {
|
|
31325
|
+
const ancestor = ctx.ancestors[ancestorIndex++];
|
|
31326
|
+
if (ancestor.kind === matcher.kind && passesAsserts(ancestor, matcher, ctx)) {
|
|
31327
|
+
matched = true;
|
|
31328
|
+
break;
|
|
31329
|
+
}
|
|
31330
|
+
}
|
|
31331
|
+
if (!matched)
|
|
31332
|
+
return false;
|
|
31333
|
+
}
|
|
31334
|
+
return true;
|
|
31335
|
+
}
|
|
31336
|
+
function passesAsserts(node, matcher, ctx) {
|
|
31337
|
+
const { value } = resolveSubject(node, matcher.definition.subject.property);
|
|
31338
|
+
const baseLocation = new Location(ctx.source, "#/");
|
|
31339
|
+
return matcher.assertsToApply.every((assert) => asserts[assert.name](value, assert.conditions, {
|
|
31340
|
+
baseLocation,
|
|
31341
|
+
rawValue: value
|
|
31342
|
+
}).length === 0);
|
|
31343
|
+
}
|
|
31344
|
+
function runGraphqlAssertion(node, ctx, assertion, assertsToApply) {
|
|
31345
|
+
const property = singleProperty(assertion.subject.property);
|
|
31346
|
+
const { value, locNode } = resolveSubject(node, assertion.subject.property);
|
|
31347
|
+
const baseLocation = new Location(ctx.source, "#/");
|
|
31348
|
+
const problems = assertsToApply.flatMap((assert) => asserts[assert.name](value, assert.conditions, {
|
|
31349
|
+
baseLocation,
|
|
31350
|
+
rawValue: value
|
|
31351
|
+
}));
|
|
31352
|
+
if (!problems.length)
|
|
31353
|
+
return;
|
|
31354
|
+
const defaultMessage = `${colorize.blue(assertion.assertionId)} failed because the ${colorize.blue(assertion.subject.type)} ${colorize.blue(property ?? "")} didn't meet the assertions: {{problems}}`.replace(/ +/g, " ");
|
|
31355
|
+
ctx.report({
|
|
31356
|
+
message: interpolateMessagePlaceholders(assertion.message ?? defaultMessage, {
|
|
31357
|
+
problems: getProblemsMessage(problems),
|
|
31358
|
+
assertionName: assertion.assertionId,
|
|
31359
|
+
nodeType: assertion.subject.type,
|
|
31360
|
+
property: property ?? "",
|
|
31361
|
+
key: "",
|
|
31362
|
+
pointer: "",
|
|
31363
|
+
file: getFilenameFromPath(ctx.source.absoluteRef)
|
|
31364
|
+
}),
|
|
31365
|
+
node: locNode,
|
|
31366
|
+
suggest: assertion.suggest,
|
|
31367
|
+
ruleId: assertion.assertionId,
|
|
31368
|
+
severity: assertion.severity
|
|
31369
|
+
});
|
|
31370
|
+
}
|
|
31371
|
+
function unwrapNode(node) {
|
|
31372
|
+
if (node?.name?.value !== void 0)
|
|
31373
|
+
return { value: node.name.value, locNode: node.name };
|
|
31374
|
+
if (node?.value !== void 0)
|
|
31375
|
+
return { value: node.value, locNode: node };
|
|
31376
|
+
return { value: node, locNode: node };
|
|
31377
|
+
}
|
|
31378
|
+
function resolveSubject(node, property) {
|
|
31379
|
+
const propertyName = singleProperty(property);
|
|
31380
|
+
if (propertyName === void 0)
|
|
31381
|
+
return unwrapNode(node);
|
|
31382
|
+
const target = node[propertyName];
|
|
31383
|
+
if (Array.isArray(target)) {
|
|
31384
|
+
return { value: target.map((item) => unwrapNode(item).value), locNode: node };
|
|
31385
|
+
}
|
|
31386
|
+
const resolved = unwrapNode(target);
|
|
31387
|
+
return { value: resolved.value, locNode: isAstNode(resolved.locNode) ? resolved.locNode : node };
|
|
31388
|
+
}
|
|
31389
|
+
function isAstNode(target) {
|
|
31390
|
+
return isPlainObject(target) && "kind" in target;
|
|
31391
|
+
}
|
|
31392
|
+
function singleProperty(property) {
|
|
31393
|
+
return Array.isArray(property) ? property[0] : property;
|
|
31394
|
+
}
|
|
31395
|
+
|
|
31396
|
+
// ../core/lib/rules/graphql/no-unused-types.js
|
|
31397
|
+
var DEFAULT_ROOT_TYPES = ["Query", "Mutation", "Subscription"];
|
|
31398
|
+
function namedTypeName(type) {
|
|
31399
|
+
let current = type;
|
|
31400
|
+
while (current.kind === "ListType" || current.kind === "NonNullType") {
|
|
31401
|
+
current = current.type;
|
|
31402
|
+
}
|
|
31403
|
+
return current.name.value;
|
|
31404
|
+
}
|
|
31405
|
+
var NoUnusedTypes = () => {
|
|
31406
|
+
const declarations = /* @__PURE__ */ new Map();
|
|
31407
|
+
const used = /* @__PURE__ */ new Set();
|
|
31408
|
+
const roots = /* @__PURE__ */ new Set();
|
|
31409
|
+
let hasSchemaDefinition = false;
|
|
31410
|
+
const markUsed = (type) => used.add(namedTypeName(type));
|
|
31411
|
+
const declare = (node) => declarations.set(node.name.value, node.name);
|
|
31412
|
+
const collectFieldedType = (node) => {
|
|
31413
|
+
for (const iface of node.interfaces ?? []) {
|
|
31414
|
+
markUsed(iface);
|
|
31415
|
+
}
|
|
31416
|
+
for (const field of node.fields ?? []) {
|
|
31417
|
+
markUsed(field.type);
|
|
31418
|
+
for (const arg of field.arguments ?? []) {
|
|
31419
|
+
markUsed(arg.type);
|
|
31420
|
+
}
|
|
31421
|
+
}
|
|
31422
|
+
};
|
|
31423
|
+
const collectUnion = (node) => {
|
|
31424
|
+
for (const member of node.types ?? []) {
|
|
31425
|
+
markUsed(member);
|
|
31426
|
+
}
|
|
31427
|
+
};
|
|
31428
|
+
const collectInputObject = (node) => {
|
|
31429
|
+
for (const field of node.fields ?? []) {
|
|
31430
|
+
markUsed(field.type);
|
|
31431
|
+
}
|
|
31432
|
+
};
|
|
31433
|
+
const collectSchemaRoots = (node) => {
|
|
31434
|
+
for (const operation of node.operationTypes ?? []) {
|
|
31435
|
+
roots.add(operation.type.name.value);
|
|
31436
|
+
}
|
|
31437
|
+
};
|
|
31438
|
+
return {
|
|
31439
|
+
SchemaDefinition: (node) => {
|
|
31440
|
+
hasSchemaDefinition = true;
|
|
31441
|
+
collectSchemaRoots(node);
|
|
31442
|
+
},
|
|
31443
|
+
SchemaExtension: collectSchemaRoots,
|
|
31444
|
+
DirectiveDefinition: (node) => {
|
|
31445
|
+
for (const arg of node.arguments ?? []) {
|
|
31446
|
+
markUsed(arg.type);
|
|
31447
|
+
}
|
|
31448
|
+
},
|
|
31449
|
+
ObjectTypeDefinition: (node) => {
|
|
31450
|
+
declare(node);
|
|
31451
|
+
collectFieldedType(node);
|
|
31452
|
+
},
|
|
31453
|
+
ObjectTypeExtension: collectFieldedType,
|
|
31454
|
+
InterfaceTypeDefinition: (node) => {
|
|
31455
|
+
declare(node);
|
|
31456
|
+
collectFieldedType(node);
|
|
31457
|
+
},
|
|
31458
|
+
InterfaceTypeExtension: collectFieldedType,
|
|
31459
|
+
UnionTypeDefinition: (node) => {
|
|
31460
|
+
declare(node);
|
|
31461
|
+
collectUnion(node);
|
|
31462
|
+
},
|
|
31463
|
+
UnionTypeExtension: collectUnion,
|
|
31464
|
+
InputObjectTypeDefinition: (node) => {
|
|
31465
|
+
declare(node);
|
|
31466
|
+
collectInputObject(node);
|
|
31467
|
+
},
|
|
31468
|
+
InputObjectTypeExtension: collectInputObject,
|
|
31469
|
+
EnumTypeDefinition: declare,
|
|
31470
|
+
ScalarTypeDefinition: declare,
|
|
31471
|
+
Document: {
|
|
31472
|
+
leave: (_node, ctx) => {
|
|
31473
|
+
if (!hasSchemaDefinition) {
|
|
31474
|
+
for (const name of DEFAULT_ROOT_TYPES) {
|
|
31475
|
+
if (declarations.has(name))
|
|
31476
|
+
roots.add(name);
|
|
31477
|
+
}
|
|
31478
|
+
}
|
|
31479
|
+
if (roots.size === 0)
|
|
31480
|
+
return;
|
|
31481
|
+
for (const [name, nameNode] of declarations) {
|
|
31482
|
+
if (used.has(name) || roots.has(name))
|
|
31483
|
+
continue;
|
|
31484
|
+
ctx.report({
|
|
31485
|
+
message: `Type \`${name}\` is declared but never used.`,
|
|
31486
|
+
node: nameNode
|
|
31487
|
+
});
|
|
31488
|
+
}
|
|
31489
|
+
}
|
|
31490
|
+
}
|
|
31491
|
+
};
|
|
31492
|
+
};
|
|
31493
|
+
|
|
31494
|
+
// ../core/lib/rules/graphql/struct.js
|
|
31495
|
+
var import_graphql = __toESM(require_graphql(), 1);
|
|
31496
|
+
var Struct2 = () => {
|
|
31497
|
+
return {
|
|
31498
|
+
Document: {
|
|
31499
|
+
enter: (node, ctx) => {
|
|
31500
|
+
let schema;
|
|
31501
|
+
try {
|
|
31502
|
+
schema = (0, import_graphql.buildASTSchema)(node, { assumeValidSDL: false });
|
|
31503
|
+
} catch (e2) {
|
|
31504
|
+
reportThrown(e2, ctx);
|
|
31505
|
+
return;
|
|
31506
|
+
}
|
|
31507
|
+
for (const error of (0, import_graphql.validateSchema)(schema)) {
|
|
31508
|
+
reportGraphqlError(error, ctx);
|
|
31509
|
+
}
|
|
31510
|
+
}
|
|
31511
|
+
}
|
|
31512
|
+
};
|
|
31513
|
+
};
|
|
31514
|
+
function reportThrown(e2, ctx) {
|
|
31515
|
+
if (e2 instanceof import_graphql.GraphQLError) {
|
|
31516
|
+
reportGraphqlError(e2, ctx);
|
|
31517
|
+
} else if (e2 instanceof Error) {
|
|
31518
|
+
ctx.report({ message: e2.message });
|
|
31519
|
+
} else {
|
|
31520
|
+
throw e2;
|
|
31521
|
+
}
|
|
31522
|
+
}
|
|
31523
|
+
function reportGraphqlError(error, ctx) {
|
|
31524
|
+
const loc = error.locations?.[0];
|
|
31525
|
+
ctx.report({
|
|
31526
|
+
message: error.message,
|
|
31527
|
+
node: error.nodes?.[0],
|
|
31528
|
+
loc: loc ? { start: { line: loc.line, col: loc.column } } : void 0
|
|
31529
|
+
});
|
|
31530
|
+
}
|
|
31531
|
+
|
|
31532
|
+
// ../core/lib/rules/graphql/type-description.js
|
|
31533
|
+
var TypeDescription = () => {
|
|
31534
|
+
const checkDescription = (node, ctx) => {
|
|
31535
|
+
if (!node.description || node.description.value.trim() === "") {
|
|
31536
|
+
ctx.report({
|
|
31537
|
+
message: `Type \`${node.name.value}\` should have a non-empty description.`,
|
|
31538
|
+
node: node.name
|
|
31539
|
+
});
|
|
31540
|
+
}
|
|
31541
|
+
};
|
|
31542
|
+
return {
|
|
31543
|
+
ObjectTypeDefinition: checkDescription,
|
|
31544
|
+
InterfaceTypeDefinition: checkDescription,
|
|
31545
|
+
EnumTypeDefinition: checkDescription,
|
|
31546
|
+
InputObjectTypeDefinition: checkDescription,
|
|
31547
|
+
UnionTypeDefinition: checkDescription,
|
|
31548
|
+
ScalarTypeDefinition: checkDescription
|
|
31549
|
+
};
|
|
31550
|
+
};
|
|
31551
|
+
|
|
31552
|
+
// ../core/lib/rules/graphql/index.js
|
|
31553
|
+
var rules4 = {
|
|
31554
|
+
struct: Struct2,
|
|
31555
|
+
assertions: GraphqlAssertions,
|
|
31556
|
+
"no-unused-types": NoUnusedTypes,
|
|
31557
|
+
"type-description": TypeDescription
|
|
31558
|
+
};
|
|
31559
|
+
|
|
31202
31560
|
// ../core/lib/rules/common/info-license.js
|
|
31203
31561
|
var InfoLicense = () => {
|
|
31204
31562
|
return {
|
|
@@ -32345,7 +32703,7 @@ var ResponseMimeType = ({ allowedValues }) => {
|
|
|
32345
32703
|
};
|
|
32346
32704
|
|
|
32347
32705
|
// ../core/lib/rules/oas2/index.js
|
|
32348
|
-
var
|
|
32706
|
+
var rules5 = {
|
|
32349
32707
|
struct: Struct,
|
|
32350
32708
|
"no-invalid-schema-examples": NoInvalidSchemaExamples,
|
|
32351
32709
|
"no-invalid-parameter-examples": NoInvalidParameterExamples,
|
|
@@ -33366,7 +33724,7 @@ var SpecQuerystringParameters = () => {
|
|
|
33366
33724
|
};
|
|
33367
33725
|
|
|
33368
33726
|
// ../core/lib/rules/oas3/index.js
|
|
33369
|
-
var
|
|
33727
|
+
var rules6 = {
|
|
33370
33728
|
struct: Struct,
|
|
33371
33729
|
"info-contact": InfoContact,
|
|
33372
33730
|
"info-license": InfoLicense,
|
|
@@ -33579,7 +33937,7 @@ var NoRequiredParamsAfterOptional = () => {
|
|
|
33579
33937
|
};
|
|
33580
33938
|
|
|
33581
33939
|
// ../core/lib/rules/openrpc/index.js
|
|
33582
|
-
var
|
|
33940
|
+
var rules7 = {
|
|
33583
33941
|
struct: Struct,
|
|
33584
33942
|
"no-unresolved-refs": NoUnresolvedRefs,
|
|
33585
33943
|
assertions: Assertions2,
|
|
@@ -33592,7 +33950,7 @@ var rules6 = {
|
|
|
33592
33950
|
var preprocessors6 = {};
|
|
33593
33951
|
|
|
33594
33952
|
// ../core/lib/rules/overlay1/index.js
|
|
33595
|
-
var
|
|
33953
|
+
var rules8 = {
|
|
33596
33954
|
"info-contact": InfoContact,
|
|
33597
33955
|
struct: Struct,
|
|
33598
33956
|
"no-unresolved-refs": NoUnresolvedRefs,
|
|
@@ -33936,6 +34294,10 @@ var all = {
|
|
|
33936
34294
|
"no-unused-components": "error",
|
|
33937
34295
|
"spec-no-duplicated-method-params": "error",
|
|
33938
34296
|
"spec-no-required-params-after-optional": "error"
|
|
34297
|
+
},
|
|
34298
|
+
graphqlRules: {
|
|
34299
|
+
"no-unused-types": "error",
|
|
34300
|
+
"type-description": "error"
|
|
33939
34301
|
}
|
|
33940
34302
|
};
|
|
33941
34303
|
var all_default = all;
|
|
@@ -34249,6 +34611,10 @@ var minimal = {
|
|
|
34249
34611
|
overlay1Rules: {
|
|
34250
34612
|
"info-contact": "off"
|
|
34251
34613
|
},
|
|
34614
|
+
graphqlRules: {
|
|
34615
|
+
"no-unused-types": "off",
|
|
34616
|
+
"type-description": "off"
|
|
34617
|
+
},
|
|
34252
34618
|
openrpc1Rules: {
|
|
34253
34619
|
"info-contact": "off",
|
|
34254
34620
|
"info-license": "off",
|
|
@@ -34574,6 +34940,10 @@ var recommendedStrict = {
|
|
|
34574
34940
|
"no-unused-components": "error",
|
|
34575
34941
|
"spec-no-duplicated-method-params": "error",
|
|
34576
34942
|
"spec-no-required-params-after-optional": "error"
|
|
34943
|
+
},
|
|
34944
|
+
graphqlRules: {
|
|
34945
|
+
"no-unused-types": "error",
|
|
34946
|
+
"type-description": "off"
|
|
34577
34947
|
}
|
|
34578
34948
|
};
|
|
34579
34949
|
var recommended_strict_default = recommendedStrict;
|
|
@@ -34893,6 +35263,10 @@ var recommended = {
|
|
|
34893
35263
|
"info-contact": "off",
|
|
34894
35264
|
"spec-no-duplicated-method-params": "error",
|
|
34895
35265
|
"spec-no-required-params-after-optional": "error"
|
|
35266
|
+
},
|
|
35267
|
+
graphqlRules: {
|
|
35268
|
+
"no-unused-types": "warn",
|
|
35269
|
+
"type-description": "off"
|
|
34896
35270
|
}
|
|
34897
35271
|
};
|
|
34898
35272
|
var recommended_default = recommended;
|
|
@@ -35212,6 +35586,10 @@ var spec = {
|
|
|
35212
35586
|
"no-unused-components": "off",
|
|
35213
35587
|
"spec-no-duplicated-method-params": "error",
|
|
35214
35588
|
"spec-no-required-params-after-optional": "error"
|
|
35589
|
+
},
|
|
35590
|
+
graphqlRules: {
|
|
35591
|
+
"no-unused-types": "off",
|
|
35592
|
+
"type-description": "off"
|
|
35215
35593
|
}
|
|
35216
35594
|
};
|
|
35217
35595
|
var spec_default = spec;
|
|
@@ -35228,13 +35606,14 @@ var defaultPlugin = {
|
|
|
35228
35606
|
id: "",
|
|
35229
35607
|
// default plugin doesn't have id
|
|
35230
35608
|
rules: {
|
|
35231
|
-
oas3:
|
|
35232
|
-
oas2:
|
|
35609
|
+
oas3: rules6,
|
|
35610
|
+
oas2: rules5,
|
|
35233
35611
|
async2: rules2,
|
|
35234
35612
|
async3: rules3,
|
|
35235
35613
|
arazzo1: rules,
|
|
35236
|
-
overlay1:
|
|
35237
|
-
openrpc1:
|
|
35614
|
+
overlay1: rules8,
|
|
35615
|
+
openrpc1: rules7,
|
|
35616
|
+
graphql: rules4
|
|
35238
35617
|
},
|
|
35239
35618
|
preprocessors: {
|
|
35240
35619
|
oas3: preprocessors5,
|
|
@@ -35265,6 +35644,13 @@ import * as path9 from "node:path";
|
|
|
35265
35644
|
import * as fs4 from "node:fs";
|
|
35266
35645
|
import * as path6 from "node:path";
|
|
35267
35646
|
|
|
35647
|
+
// ../core/lib/graphql/detect-graphql.js
|
|
35648
|
+
var GRAPHQL_EXTENSIONS = [".graphql", ".gql"];
|
|
35649
|
+
function isGraphqlRef(ref) {
|
|
35650
|
+
const lowerCasedRef = ref.toLowerCase();
|
|
35651
|
+
return GRAPHQL_EXTENSIONS.some((ext) => lowerCasedRef.endsWith(ext));
|
|
35652
|
+
}
|
|
35653
|
+
|
|
35268
35654
|
// ../core/lib/utils/make-ref-id.js
|
|
35269
35655
|
function makeRefId(absoluteRef, pointer) {
|
|
35270
35656
|
return absoluteRef + "::" + pointer;
|
|
@@ -35318,6 +35704,9 @@ var ResolveError = class _ResolveError extends Error {
|
|
|
35318
35704
|
};
|
|
35319
35705
|
function makeDocumentFromString(sourceString, absoluteRef) {
|
|
35320
35706
|
const source = new Source(absoluteRef, sourceString);
|
|
35707
|
+
if (isGraphqlRef(absoluteRef)) {
|
|
35708
|
+
return { source, parsed: sourceString };
|
|
35709
|
+
}
|
|
35321
35710
|
try {
|
|
35322
35711
|
return {
|
|
35323
35712
|
source,
|
|
@@ -35363,6 +35752,9 @@ var BaseResolver = class {
|
|
|
35363
35752
|
}
|
|
35364
35753
|
}
|
|
35365
35754
|
parseDocument(source, isRoot = false) {
|
|
35755
|
+
if (isGraphqlRef(source.absoluteRef)) {
|
|
35756
|
+
return { source, parsed: source.body };
|
|
35757
|
+
}
|
|
35366
35758
|
if (!isSupportedExtension(source.absoluteRef) && !source.mimeType?.match(/(json|yaml|openapi)/) && !isRoot) {
|
|
35367
35759
|
return { source, parsed: source.body };
|
|
35368
35760
|
}
|
|
@@ -35791,12 +36183,12 @@ function parsePresetName(presetName) {
|
|
|
35791
36183
|
return { pluginId: "", configName: presetName };
|
|
35792
36184
|
}
|
|
35793
36185
|
}
|
|
35794
|
-
function prefixRules(
|
|
36186
|
+
function prefixRules(rules9, prefix) {
|
|
35795
36187
|
if (!prefix)
|
|
35796
|
-
return
|
|
36188
|
+
return rules9;
|
|
35797
36189
|
const res = {};
|
|
35798
|
-
for (const name of Object.keys(
|
|
35799
|
-
res[`${prefix}/${name}`] =
|
|
36190
|
+
for (const name of Object.keys(rules9)) {
|
|
36191
|
+
res[`${prefix}/${name}`] = rules9[name];
|
|
35800
36192
|
}
|
|
35801
36193
|
return res;
|
|
35802
36194
|
}
|
|
@@ -35813,6 +36205,7 @@ function mergeExtends(rulesConfList) {
|
|
|
35813
36205
|
arazzo1_1Rules: {},
|
|
35814
36206
|
overlay1Rules: {},
|
|
35815
36207
|
openrpc1Rules: {},
|
|
36208
|
+
graphqlRules: {},
|
|
35816
36209
|
preprocessors: {},
|
|
35817
36210
|
oas2Preprocessors: {},
|
|
35818
36211
|
oas3_0Preprocessors: {},
|
|
@@ -35862,6 +36255,8 @@ ${JSON.stringify(rulesConf, null, 2)}`);
|
|
|
35862
36255
|
assignOnlyExistingConfig(result.overlay1Rules, rulesConf.rules);
|
|
35863
36256
|
assignConfig(result.openrpc1Rules, rulesConf.openrpc1Rules);
|
|
35864
36257
|
assignOnlyExistingConfig(result.openrpc1Rules, rulesConf.rules);
|
|
36258
|
+
assignConfig(result.graphqlRules, rulesConf.graphqlRules);
|
|
36259
|
+
assignOnlyExistingConfig(result.graphqlRules, rulesConf.rules);
|
|
35865
36260
|
assignConfig(result.preprocessors, rulesConf.preprocessors);
|
|
35866
36261
|
assignConfig(result.oas2Preprocessors, rulesConf.oas2Preprocessors);
|
|
35867
36262
|
assignOnlyExistingConfig(result.oas2Preprocessors, rulesConf.preprocessors);
|
|
@@ -35970,12 +36365,7 @@ var pluginsCollectorVisitor = normalizeVisitors([
|
|
|
35970
36365
|
collectorHandleNode(node, ctx);
|
|
35971
36366
|
}
|
|
35972
36367
|
},
|
|
35973
|
-
[
|
|
35974
|
-
leave(node, ctx) {
|
|
35975
|
-
collectorHandleNode(node, ctx);
|
|
35976
|
-
}
|
|
35977
|
-
},
|
|
35978
|
-
"rootRedoclyConfigSchema.scorecardClassic.levels_items": {
|
|
36368
|
+
[s.ScorecardClassicLevel]: {
|
|
35979
36369
|
leave(node, ctx) {
|
|
35980
36370
|
collectorHandleNode(node, ctx);
|
|
35981
36371
|
}
|
|
@@ -36016,12 +36406,7 @@ var configBundlerVisitor = normalizeVisitors([
|
|
|
36016
36406
|
bundlerHandleNode(node, ctx);
|
|
36017
36407
|
}
|
|
36018
36408
|
},
|
|
36019
|
-
[
|
|
36020
|
-
leave(node, ctx) {
|
|
36021
|
-
bundlerHandleNode(node, ctx);
|
|
36022
|
-
}
|
|
36023
|
-
},
|
|
36024
|
-
"rootRedoclyConfigSchema.scorecardClassic.levels_items": {
|
|
36409
|
+
[s.ScorecardClassicLevel]: {
|
|
36025
36410
|
leave(node, ctx) {
|
|
36026
36411
|
bundlerHandleNode(node, ctx);
|
|
36027
36412
|
}
|
|
@@ -36416,6 +36801,8 @@ function mapTypeToComponent(typeName, version) {
|
|
|
36416
36801
|
default:
|
|
36417
36802
|
return null;
|
|
36418
36803
|
}
|
|
36804
|
+
case "graphql":
|
|
36805
|
+
// graphql is never bundled/$ref-resolved
|
|
36419
36806
|
default:
|
|
36420
36807
|
return null;
|
|
36421
36808
|
}
|
|
@@ -36616,10 +37003,10 @@ async function bundleDocument(opts) {
|
|
|
36616
37003
|
const { document, config, types: types2, externalRefResolver, dereference = false, removeUnusedComponents = false, keepUrlRefs = false, componentRenamingConflicts, componentNamesStrategy = "basename" } = opts;
|
|
36617
37004
|
const specVersion = detectSpec(document.parsed);
|
|
36618
37005
|
const specMajorVersion = getMajorSpecVersion(specVersion);
|
|
36619
|
-
const
|
|
37006
|
+
const rules9 = config.getRulesForSpecVersion(specMajorVersion);
|
|
36620
37007
|
const normalizedTypes = normalizeTypes(config.extendTypes(types2, specVersion), config);
|
|
36621
|
-
const preprocessors8 = initRules(
|
|
36622
|
-
const decorators8 = initRules(
|
|
37008
|
+
const preprocessors8 = initRules(rules9, config, "preprocessors", specVersion);
|
|
37009
|
+
const decorators8 = initRules(rules9, config, "decorators", specVersion);
|
|
36623
37010
|
const ctx = {
|
|
36624
37011
|
problems: [],
|
|
36625
37012
|
specVersion,
|
|
@@ -36949,8 +37336,8 @@ ${e2.stack}`);
|
|
|
36949
37336
|
...pluginInstance.typeExtension ? { typeExtension: pluginInstance.typeExtension } : {}
|
|
36950
37337
|
};
|
|
36951
37338
|
if (pluginInstance.rules) {
|
|
36952
|
-
if (!pluginInstance.rules.oas3 && !pluginInstance.rules.oas2 && !pluginInstance.rules.async2 && !pluginInstance.rules.async3 && !pluginInstance.rules.arazzo1 && !pluginInstance.rules.overlay1 && !pluginInstance.rules.openrpc1) {
|
|
36953
|
-
throw new Error(`Plugin rules must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo\`, \`overlay1\`, or \`
|
|
37339
|
+
if (!pluginInstance.rules.oas3 && !pluginInstance.rules.oas2 && !pluginInstance.rules.async2 && !pluginInstance.rules.async3 && !pluginInstance.rules.arazzo1 && !pluginInstance.rules.overlay1 && !pluginInstance.rules.openrpc1 && !pluginInstance.rules.graphql) {
|
|
37340
|
+
throw new Error(`Plugin rules must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo\`, \`overlay1\`, \`openrpc1\`, or \`graphql\` rules "${p2}.`);
|
|
36954
37341
|
}
|
|
36955
37342
|
plugin.rules = {};
|
|
36956
37343
|
if (pluginInstance.rules.oas3) {
|
|
@@ -36974,6 +37361,9 @@ ${e2.stack}`);
|
|
|
36974
37361
|
if (pluginInstance.rules.openrpc1) {
|
|
36975
37362
|
plugin.rules.openrpc1 = prefixRules(pluginInstance.rules.openrpc1, id);
|
|
36976
37363
|
}
|
|
37364
|
+
if (pluginInstance.rules.graphql) {
|
|
37365
|
+
plugin.rules.graphql = prefixRules(pluginInstance.rules.graphql, id);
|
|
37366
|
+
}
|
|
36977
37367
|
}
|
|
36978
37368
|
if (pluginInstance.preprocessors) {
|
|
36979
37369
|
if (!pluginInstance.preprocessors.oas3 && !pluginInstance.preprocessors.oas2 && !pluginInstance.preprocessors.async2 && !pluginInstance.preprocessors.async3 && !pluginInstance.preprocessors.arazzo1 && !pluginInstance.preprocessors.overlay1 && !pluginInstance.preprocessors.openrpc1) {
|
|
@@ -37727,9 +38117,9 @@ function outputForGithubActions(problems, cwd) {
|
|
|
37727
38117
|
}
|
|
37728
38118
|
|
|
37729
38119
|
// ../core/lib/lint.js
|
|
37730
|
-
var { theme: _3, ...propertiesWithoutTheme2 } =
|
|
38120
|
+
var { theme: _3, ...propertiesWithoutTheme2 } = eo.properties;
|
|
37731
38121
|
var redoclyConfigSchemaWithoutTheme2 = {
|
|
37732
|
-
...
|
|
38122
|
+
...eo,
|
|
37733
38123
|
properties: propertiesWithoutTheme2
|
|
37734
38124
|
};
|
|
37735
38125
|
async function lint(opts) {
|
|
@@ -37744,8 +38134,12 @@ async function lint(opts) {
|
|
|
37744
38134
|
}
|
|
37745
38135
|
async function lintDocument(opts) {
|
|
37746
38136
|
const { document, customTypes, externalRefResolver, config } = opts;
|
|
38137
|
+
if (isGraphqlRef(document.source.absoluteRef)) {
|
|
38138
|
+
const { lintGraphqlDocument } = await import("./ZK3QRKL5.js");
|
|
38139
|
+
return lintGraphqlDocument({ document, config });
|
|
38140
|
+
}
|
|
37747
38141
|
const specVersion = detectSpec(document.parsed);
|
|
37748
|
-
const
|
|
38142
|
+
const rules9 = config.getRulesForSpecVersion(getMajorSpecVersion(specVersion));
|
|
37749
38143
|
const types2 = normalizeTypes(config.extendTypes(customTypes ?? getTypes(specVersion), specVersion), config);
|
|
37750
38144
|
const ctx = {
|
|
37751
38145
|
problems: [],
|
|
@@ -37753,8 +38147,8 @@ async function lintDocument(opts) {
|
|
|
37753
38147
|
config,
|
|
37754
38148
|
visitorsData: {}
|
|
37755
38149
|
};
|
|
37756
|
-
const preprocessors8 = initRules(
|
|
37757
|
-
const regularRules = initRules(
|
|
38150
|
+
const preprocessors8 = initRules(rules9, config, "preprocessors", specVersion);
|
|
38151
|
+
const regularRules = initRules(rules9, config, "rules", specVersion);
|
|
37758
38152
|
let resolvedRefMap = await resolveDocument({
|
|
37759
38153
|
rootDocument: document,
|
|
37760
38154
|
rootType: types2.Root,
|
|
@@ -37796,7 +38190,7 @@ async function lintConfig(opts) {
|
|
|
37796
38190
|
visitorsData: {}
|
|
37797
38191
|
};
|
|
37798
38192
|
const types2 = normalizeTypes(opts.externalConfigTypes || createConfigTypes(redoclyConfigSchemaWithoutTheme2, config));
|
|
37799
|
-
const
|
|
38193
|
+
const rules9 = [
|
|
37800
38194
|
{
|
|
37801
38195
|
severity: severity || "error",
|
|
37802
38196
|
ruleId: "configuration struct",
|
|
@@ -37808,7 +38202,7 @@ async function lintConfig(opts) {
|
|
|
37808
38202
|
visitor: NoUnresolvedRefs({ severity: "error" })
|
|
37809
38203
|
}
|
|
37810
38204
|
];
|
|
37811
|
-
const normalizedVisitors = normalizeVisitors(
|
|
38205
|
+
const normalizedVisitors = normalizeVisitors(rules9, types2);
|
|
37812
38206
|
const resolvedRefMap = config.resolvedRefMap || await resolveDocument({
|
|
37813
38207
|
rootDocument: config.document,
|
|
37814
38208
|
rootType: types2.ConfigRoot,
|