@redocly/openapi-core 1.13.0 → 1.15.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/CHANGELOG.md +16 -0
- package/lib/rules/common/no-invalid-parameter-examples.js +1 -1
- package/lib/rules/common/no-invalid-schema-examples.js +1 -1
- package/lib/rules/common/security-defined.js +18 -6
- package/lib/rules/oas3/no-invalid-media-type-examples.js +1 -1
- package/lib/types/redocly-yaml.d.ts +0 -1
- package/lib/types/redocly-yaml.js +3 -7
- package/package.json +2 -2
- package/src/__tests__/lint.test.ts +15 -36
- package/src/config/__tests__/load.test.ts +13 -13
- package/src/rules/common/__tests__/no-invalid-parameter-examples.test.ts +53 -0
- package/src/rules/common/__tests__/no-invalid-schema-examples.test.ts +51 -0
- package/src/rules/common/__tests__/security-defined.test.ts +103 -0
- package/src/rules/common/no-invalid-parameter-examples.ts +1 -1
- package/src/rules/common/no-invalid-schema-examples.ts +1 -1
- package/src/rules/common/security-defined.ts +31 -8
- package/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts +52 -0
- package/src/rules/oas3/no-invalid-media-type-examples.ts +1 -1
- package/src/types/redocly-yaml.ts +3 -13
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -256,7 +256,6 @@ const createConfigRoot = (nodeTypes: Record<string, NodeType>): NodeType => ({
|
|
|
256
256
|
...nodeTypes.rootRedoclyConfigSchema.properties,
|
|
257
257
|
...ConfigStyleguide.properties,
|
|
258
258
|
apis: 'ConfigApis', // Override apis with internal format
|
|
259
|
-
theme: 'ConfigRootTheme', // Override theme with internal format
|
|
260
259
|
'features.openapi': 'ConfigReferenceDocs', // deprecated
|
|
261
260
|
'features.mockServer': 'ConfigMockServer', // deprecated
|
|
262
261
|
organization: { type: 'string' },
|
|
@@ -315,14 +314,6 @@ const ConfigHTTP: NodeType = {
|
|
|
315
314
|
},
|
|
316
315
|
};
|
|
317
316
|
|
|
318
|
-
const createConfigRootTheme = (nodeTypes: Record<string, NodeType>): NodeType => ({
|
|
319
|
-
...nodeTypes['rootRedoclyConfigSchema.theme'],
|
|
320
|
-
properties: {
|
|
321
|
-
...nodeTypes['rootRedoclyConfigSchema.theme']?.properties,
|
|
322
|
-
openapi: 'ConfigReferenceDocs', // Override theme.openapi with internal format
|
|
323
|
-
},
|
|
324
|
-
});
|
|
325
|
-
|
|
326
317
|
const Rules: NodeType = {
|
|
327
318
|
properties: {},
|
|
328
319
|
additionalProperties: (value: unknown, key: string) => {
|
|
@@ -932,10 +923,10 @@ const GenerateCodeSamples: NodeType = {
|
|
|
932
923
|
required: ['languages'],
|
|
933
924
|
};
|
|
934
925
|
|
|
926
|
+
// TODO: deprecated
|
|
935
927
|
const ConfigReferenceDocs: NodeType = {
|
|
936
|
-
// TODO: partially invalid @Viacheslav
|
|
937
928
|
properties: {
|
|
938
|
-
theme: 'ConfigTheme',
|
|
929
|
+
theme: 'ConfigTheme',
|
|
939
930
|
corsProxyUrl: { type: 'string' },
|
|
940
931
|
ctrlFHijack: { type: 'boolean' },
|
|
941
932
|
defaultSampleLanguage: { type: 'string' },
|
|
@@ -1072,9 +1063,8 @@ export const createConfigTypes = (extraSchemas: JSONSchema) => {
|
|
|
1072
1063
|
|
|
1073
1064
|
return {
|
|
1074
1065
|
...CoreConfigTypes,
|
|
1075
|
-
ConfigRoot: createConfigRoot(nodeTypes),
|
|
1066
|
+
ConfigRoot: createConfigRoot(nodeTypes), // This is the REAL config root type
|
|
1076
1067
|
ConfigApisProperties: createConfigApisProperties(nodeTypes),
|
|
1077
|
-
ConfigRootTheme: createConfigRootTheme(nodeTypes),
|
|
1078
1068
|
...nodeTypes,
|
|
1079
1069
|
};
|
|
1080
1070
|
};
|