Skip to content

Commit

Permalink
Revert "fix: api token schema" (#4638)
Browse files Browse the repository at this point in the history
Reverts #4633 because of
#4633 (comment)
  • Loading branch information
gastonfournier authored Sep 7, 2023
1 parent cd2eac2 commit feab6db
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/lib/openapi/spec/__snapshots__/api-token-schema.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ exports[`apiTokenSchema empty 1`] = `
},
"schemaPath": "#/required",
},
{
"instancePath": "",
"keyword": "required",
"message": "must have required property 'project'",
"params": {
"missingProperty": "project",
},
"schemaPath": "#/required",
},
{
"instancePath": "",
"keyword": "required",
"message": "must have required property 'projects'",
"params": {
"missingProperty": "projects",
},
"schemaPath": "#/required",
},
{
"instancePath": "",
"keyword": "required",
Expand Down
9 changes: 8 additions & 1 deletion src/lib/openapi/spec/api-token-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ export const apiTokenSchema = {
$id: '#/components/schemas/apiTokenSchema',
type: 'object',
additionalProperties: false,
required: ['secret', 'tokenName', 'type', 'createdAt'],
required: [
'secret',
'tokenName',
'type',
'project',
'projects',
'createdAt',
],
description:
'An overview of an [Unleash API token](https://docs.getunleash.io/reference/api-tokens-and-client-keys).',
properties: {
Expand Down

0 comments on commit feab6db

Please sign in to comment.