mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: disallow empty summaries and descriptions (#4529)
This commit is contained in:
parent
169a3167da
commit
3d7393c340
@ -193,7 +193,7 @@ test('all tags are listed in the root "tags" list', async () => {
|
||||
expect(invalidTags).toStrictEqual({});
|
||||
});
|
||||
|
||||
test('all API operations have summaries and descriptions', async () => {
|
||||
test('all API operations have non-empty summaries and descriptions', async () => {
|
||||
const { body: spec } = await app.request
|
||||
.get('/docs/openapi.json')
|
||||
.expect('Content-Type', /json/)
|
||||
@ -203,8 +203,8 @@ test('all API operations have summaries and descriptions', async () => {
|
||||
return Object.entries(data)
|
||||
.map(([verb, operationDescription]) => {
|
||||
if (
|
||||
'summary' in operationDescription &&
|
||||
'description' in operationDescription
|
||||
operationDescription.summary &&
|
||||
operationDescription.description
|
||||
) {
|
||||
return undefined;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user