fix default style docs for social badges (#9869)

* fix default style docs for social badges

* Update core/base-service/openapi.js

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>

* update test

---------

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>
This commit is contained in:
chris48s
2024-01-04 20:23:27 +00:00
committed by GitHub
parent e8a148eed3
commit 26ae5a0cf4
2 changed files with 5 additions and 2 deletions

View File

@@ -241,7 +241,9 @@ function category2openapi(category, services) {
name: 'style',
in: 'query',
required: false,
description: 'If not specified, the default style is "flat".',
description: `If not specified, the default style for this badge is "${
category.name.toLowerCase() === 'social' ? 'social' : 'flat'
}".`,
schema: {
type: 'string',
enum: ['flat', 'flat-square', 'plastic', 'for-the-badge', 'social'],

View File

@@ -88,7 +88,8 @@ const expected = {
name: 'style',
in: 'query',
required: false,
description: 'If not specified, the default style is "flat".',
description:
'If not specified, the default style for this badge is "flat".',
schema: {
enum: ['flat', 'flat-square', 'plastic', 'for-the-badge', 'social'],
type: 'string',