mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-24 01:18:01 +02: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({});
|
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user