Skip to content

Commit

Permalink
fix default style docs for social badges (#9869)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
chris48s and PyvesB authored Jan 4, 2024
1 parent e8a148e commit 26ae5a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/base-service/openapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
3 changes: 2 additions & 1 deletion core/base-service/openapi.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 26ae5a0

Please sign in to comment.