1
0
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:
Thomas Heartman 2023-08-17 16:55:52 +02:00 committed by GitHub
parent 169a3167da
commit 3d7393c340
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {