1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-24 01:18:01 +02:00

fix: disallow empty summaries and descriptions ()

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({}); 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 const { body: spec } = await app.request
.get('/docs/openapi.json') .get('/docs/openapi.json')
.expect('Content-Type', /json/) .expect('Content-Type', /json/)
@ -203,8 +203,8 @@ test('all API operations have summaries and descriptions', async () => {
return Object.entries(data) return Object.entries(data)
.map(([verb, operationDescription]) => { .map(([verb, operationDescription]) => {
if ( if (
'summary' in operationDescription && operationDescription.summary &&
'description' in operationDescription operationDescription.description
) { ) {
return undefined; return undefined;
} else { } else {