convert 'style' param to enum (#9853)

* convert 'style' param to enum

* update test
This commit is contained in:
chris48s
2023-12-30 17:38:42 +00:00
committed by GitHub
parent 7404d4e207
commit e548414edd
2 changed files with 7 additions and 5 deletions

View File

@@ -241,10 +241,10 @@ function category2openapi(category, services) {
name: 'style',
in: 'query',
required: false,
description:
'One of: flat (default), flat-square, plastic, for-the-badge, social',
description: 'If not specified, the defautl style is "flat".',
schema: {
type: 'string',
enum: ['flat', 'flat-square', 'plastic', 'for-the-badge', 'social'],
},
example: 'flat',
},

View File

@@ -88,9 +88,11 @@ const expected = {
name: 'style',
in: 'query',
required: false,
description:
'One of: flat (default), flat-square, plastic, for-the-badge, social',
schema: { type: 'string' },
description: 'If not specified, the defautl style is "flat".',
schema: {
enum: ['flat', 'flat-square', 'plastic', 'for-the-badge', 'social'],
type: 'string',
},
example: 'flat',
},
logo: {