diff --git a/src/lib/openapi/spec/validate-edge-tokens-schema.ts b/src/lib/openapi/spec/validate-edge-tokens-schema.ts index 8c77d0a270..33691f40fb 100644 --- a/src/lib/openapi/spec/validate-edge-tokens-schema.ts +++ b/src/lib/openapi/spec/validate-edge-tokens-schema.ts @@ -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: { diff --git a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap index e574882aec..ed1dacfc77 100644 --- a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap +++ b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap @@ -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", }, },