Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfiel committed Jan 17, 2025
1 parent d754c73 commit b823fe8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 101 deletions.
112 changes: 14 additions & 98 deletions packages/core/src/__tests__/lint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,20 @@ describe('lint', () => {
"severity": "error",
"suggest": [],
},
{
"from": undefined,
"location": [
{
"pointer": "#/ssoDirect",
"reportOnKey": true,
"source": "",
},
],
"message": "Property \`ssoDirect\` is not expected here.",
"ruleId": "configuration spec",
"severity": "error",
"suggest": [],
},
{
"from": undefined,
"location": [
Expand Down Expand Up @@ -787,104 +801,6 @@ describe('lint', () => {
"severity": "error",
"suggest": [],
},
{
"from": undefined,
"location": [
{
"pointer": "#/ssoDirect/oidc/title",
"reportOnKey": false,
"source": "",
},
],
"message": "Expected type \`string\` but got \`integer\`.",
"ruleId": "configuration spec",
"severity": "error",
"suggest": [],
},
{
"from": undefined,
"location": [
{
"pointer": "#/ssoDirect/oidc/defaultTeams/0",
"reportOnKey": false,
"source": "",
},
],
"message": "Expected type \`string\` but got \`integer\`.",
"ruleId": "configuration spec",
"severity": "error",
"suggest": [],
},
{
"from": undefined,
"location": [
{
"pointer": "#/ssoDirect/oidc/configuration",
"reportOnKey": true,
"source": "",
},
],
"message": "The field \`authorization_endpoint\` must be present on this level.",
"ruleId": "configuration spec",
"severity": "error",
"suggest": [],
},
{
"from": undefined,
"location": [
{
"pointer": "#/ssoDirect/oidc/configuration/token_endpoint",
"reportOnKey": false,
"source": "",
},
],
"message": "Expected type \`string\` but got \`integer\`.",
"ruleId": "configuration spec",
"severity": "error",
"suggest": [],
},
{
"from": undefined,
"location": [
{
"pointer": "#/ssoDirect/oidc/authorizationRequestCustomParams/login_hint",
"reportOnKey": false,
"source": "",
},
],
"message": "Expected type \`string\` but got \`integer\`.",
"ruleId": "configuration spec",
"severity": "error",
"suggest": [],
},
{
"from": undefined,
"location": [
{
"pointer": "#/ssoDirect/sso-config-schema-without-configurationUrl",
"reportOnKey": true,
"source": "",
},
],
"message": "The field \`clientId\` must be present on this level.",
"ruleId": "configuration spec",
"severity": "error",
"suggest": [],
},
{
"from": undefined,
"location": [
{
"pointer": "#/ssoDirect/sso-config-schema-without-configurationUrl",
"reportOnKey": true,
"source": "",
},
],
"message": "The field \`configurationUrl\` must be present on this level.",
"ruleId": "configuration spec",
"severity": "error",
"suggest": [],
},
{
"from": undefined,
"location": [
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export { ConfigTypes } from './types/redocly-yaml';
export type {
Oas3Definition,
Oas3_1Definition,
Oas3ComponentsBase,
Oas3Components,
Oas3_1Components,
Oas3PathItem,
Oas3Paths,
Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/typings/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export interface Oas3RequestBody<T extends Oas3Schema | Oas3_1Schema = Oas3Schem
content: { [mime: string]: Oas3MediaType<T> };
}

export interface Oas3Responses<T extends Oas3Schema | Oas3_1Schema> {
export interface Oas3Responses<T extends Oas3Schema | Oas3_1Schema = Oas3Schema | Oas3_1Schema> {
[code: string]: Oas3Response<T>;
}

Expand Down Expand Up @@ -284,7 +284,8 @@ export interface Oas3_1Components extends Oas3ComponentsBase<Oas3_1Schema> {

export interface Oas3Components extends Oas3ComponentsBase<Oas3Schema> {}

export type Oas3ComponentName<T extends Oas3Schema | Oas3_1Schema> = keyof Oas3ComponentsBase<T>;
export type Oas3ComponentName<T extends Oas3Schema | Oas3_1Schema = Oas3Schema | Oas3_1Schema> =
keyof Oas3ComponentsBase<T>;

export interface Oas3SecurityRequirement {
[name: string]: string[];
Expand Down

0 comments on commit b823fe8

Please sign in to comment.