@redocly/openapi-core 1.0.0-beta.128 → 1.0.0-beta.129
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/lib/config/config-resolvers.js +1 -1
- package/lib/config/config.d.ts +2 -1
- package/lib/config/config.js +1 -0
- package/lib/config/types.d.ts +12 -0
- package/lib/config/types.js +13 -0
- package/lib/rules/common/assertions/index.js +3 -4
- package/lib/types/config-external-schemas.d.ts +1619 -0
- package/lib/types/config-external-schemas.js +736 -0
- package/lib/types/redocly-yaml.js +5 -7
- package/package.json +1 -1
|
@@ -268,7 +268,7 @@ function groupStyleguideAssertionRules({ rules, plugins, }) {
|
|
|
268
268
|
registerCustomAssertions(plugins, context);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
assertions.push(Object.assign(Object.assign({}, assertion), { assertionId: ruleKey
|
|
271
|
+
assertions.push(Object.assign(Object.assign({}, assertion), { assertionId: ruleKey }));
|
|
272
272
|
}
|
|
273
273
|
else {
|
|
274
274
|
// If it's not an assertion, keep it as is
|
package/lib/config/config.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NormalizedProblem } from '../walk';
|
|
2
2
|
import { OasVersion, OasMajorVersion, Oas2RuleSet, Oas3RuleSet } from '../oas-types';
|
|
3
3
|
import type { NodeType } from '../types';
|
|
4
|
-
import type { DecoratorConfig, Plugin, PreprocessorConfig, Region, ResolveConfig, ResolvedApi, ResolvedConfig, ResolvedStyleguideConfig, RuleConfig, RuleSettings, ThemeRawConfig } from './types';
|
|
4
|
+
import type { DecoratorConfig, Plugin, PreprocessorConfig, Region, ResolveConfig, ResolvedApi, ResolvedConfig, ResolvedStyleguideConfig, RuleConfig, RuleSettings, Telemetry, ThemeRawConfig } from './types';
|
|
5
5
|
export declare const IGNORE_FILE = ".redocly.lint-ignore.yaml";
|
|
6
6
|
export declare const DEFAULT_REGION = "us";
|
|
7
7
|
export declare const DOMAINS: {
|
|
@@ -53,5 +53,6 @@ export declare class Config {
|
|
|
53
53
|
theme: ThemeRawConfig;
|
|
54
54
|
organization?: string;
|
|
55
55
|
files: string[];
|
|
56
|
+
telemetry?: Telemetry;
|
|
56
57
|
constructor(rawConfig: ResolvedConfig, configFile?: string | undefined);
|
|
57
58
|
}
|
package/lib/config/config.js
CHANGED
package/lib/config/types.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ export declare type ResolveConfig = {
|
|
|
97
97
|
http: HttpResolveConfig;
|
|
98
98
|
};
|
|
99
99
|
export declare type Region = 'us' | 'eu';
|
|
100
|
+
export declare type Telemetry = 'on' | 'off';
|
|
100
101
|
export declare type AccessTokens = {
|
|
101
102
|
[region in Region]?: string;
|
|
102
103
|
};
|
|
@@ -125,6 +126,7 @@ export declare type RawConfig = {
|
|
|
125
126
|
region?: Region;
|
|
126
127
|
organization?: string;
|
|
127
128
|
files?: string[];
|
|
129
|
+
telemetry?: Telemetry;
|
|
128
130
|
} & ThemeConfig;
|
|
129
131
|
export declare type FlatApi = Omit<Api, 'styleguide'> & Omit<ApiStyleguideRawConfig, 'doNotResolveExamples'>;
|
|
130
132
|
export declare type FlatRawConfig = Omit<RawConfig, 'styleguide' | 'resolve' | 'apis'> & Omit<StyleguideRawConfig, 'doNotResolveExamples'> & {
|
|
@@ -147,4 +149,14 @@ export declare type ThemeRawConfig = {
|
|
|
147
149
|
mockServer?: Record<string, any>;
|
|
148
150
|
};
|
|
149
151
|
export declare type RulesFields = 'rules' | 'oas2Rules' | 'oas3_0Rules' | 'oas3_1Rules' | 'preprocessors' | 'oas2Preprocessors' | 'oas3_0Preprocessors' | 'oas3_1Preprocessors' | 'decorators' | 'oas2Decorators' | 'oas3_0Decorators' | 'oas3_1Decorators';
|
|
152
|
+
export declare enum AuthProviderType {
|
|
153
|
+
OIDC = "OIDC",
|
|
154
|
+
SAML2 = "SAML2",
|
|
155
|
+
BASIC = "BASIC"
|
|
156
|
+
}
|
|
157
|
+
export declare enum ApigeeDevOnboardingIntegrationAuthType {
|
|
158
|
+
SERVICE_ACCOUNT = "SERVICE_ACCOUNT",
|
|
159
|
+
OAUTH2 = "OAUTH2"
|
|
160
|
+
}
|
|
161
|
+
export declare const DEFAULT_TEAM_CLAIM_NAME = "https://redocly.com/sso/teams";
|
|
150
162
|
export {};
|
package/lib/config/types.js
CHANGED
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_TEAM_CLAIM_NAME = exports.ApigeeDevOnboardingIntegrationAuthType = exports.AuthProviderType = void 0;
|
|
4
|
+
var AuthProviderType;
|
|
5
|
+
(function (AuthProviderType) {
|
|
6
|
+
AuthProviderType["OIDC"] = "OIDC";
|
|
7
|
+
AuthProviderType["SAML2"] = "SAML2";
|
|
8
|
+
AuthProviderType["BASIC"] = "BASIC";
|
|
9
|
+
})(AuthProviderType = exports.AuthProviderType || (exports.AuthProviderType = {}));
|
|
10
|
+
var ApigeeDevOnboardingIntegrationAuthType;
|
|
11
|
+
(function (ApigeeDevOnboardingIntegrationAuthType) {
|
|
12
|
+
ApigeeDevOnboardingIntegrationAuthType["SERVICE_ACCOUNT"] = "SERVICE_ACCOUNT";
|
|
13
|
+
ApigeeDevOnboardingIntegrationAuthType["OAUTH2"] = "OAUTH2";
|
|
14
|
+
})(ApigeeDevOnboardingIntegrationAuthType = exports.ApigeeDevOnboardingIntegrationAuthType || (exports.ApigeeDevOnboardingIntegrationAuthType = {}));
|
|
15
|
+
exports.DEFAULT_TEAM_CLAIM_NAME = 'https://redocly.com/sso/teams';
|
|
@@ -11,12 +11,11 @@ const Assertions = (opts) => {
|
|
|
11
11
|
// that is why we need to iterate through 'opts' values;
|
|
12
12
|
// before - filter only object 'opts' values
|
|
13
13
|
const assertions = Object.values(opts).filter((opt) => typeof opt === 'object' && opt !== null);
|
|
14
|
-
for (const [
|
|
15
|
-
const assertId = (assertion.assertionId && `${assertion.assertionId} assertion`) || `assertion #${index + 1}`;
|
|
14
|
+
for (const [_, assertion] of assertions.entries()) {
|
|
16
15
|
if (!utils_2.isString(assertion.subject.type)) {
|
|
17
|
-
throw new Error(`${
|
|
16
|
+
throw new Error(`${assertion.assertionId}: 'type' (String) is required`);
|
|
18
17
|
}
|
|
19
|
-
const subjectVisitor = utils_1.buildSubjectVisitor(
|
|
18
|
+
const subjectVisitor = utils_1.buildSubjectVisitor(assertion.assertionId, assertion);
|
|
20
19
|
const visitorObject = utils_1.buildVisitorObject(assertion, subjectVisitor);
|
|
21
20
|
visitors.push(visitorObject);
|
|
22
21
|
}
|