1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

Fix validate-edge-tokens OpenAPI schema (#2055)

* fix: varidate-edge-tokens-schema tokens type

This change fixes the description of the 'tokens' array of the
validate edge tokens schema.

The source of the error was a simple inverson of anyOf and items.

* fix: update snapshot
This commit is contained in:
Thomas Heartman 2022-09-12 15:51:52 +02:00 committed by GitHub
parent 721cd20b5d
commit 518fee1a8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -9,10 +9,12 @@ export const validateEdgeTokensSchema = {
properties: {
tokens: {
type: 'array',
anyOf: [
{ items: { $ref: '#/components/schemas/edgeTokenSchema' } },
{ items: { type: 'string' } },
],
items: {
anyOf: [
{ $ref: '#/components/schemas/edgeTokenSchema' },
{ type: 'string' },
],
},
},
},
components: {

View File

@ -3169,18 +3169,16 @@ exports[`should serve the OpenAPI spec 1`] = `
"additionalProperties": false,
"properties": {
"tokens": {
"anyOf": [
{
"items": {
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/edgeTokenSchema",
},
},
{
"items": {
{
"type": "string",
},
},
],
],
},
"type": "array",
},
},