Skip to content

Commit

Permalink
fix(validation): add additional validations
Browse files Browse the repository at this point in the history
add validations to detect empty objects in the info block

fix #198
  • Loading branch information
syroegkin committed Mar 7, 2023
1 parent 1efc623 commit 73aeaf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ export function transformInfo(info: OpenAPIV2.InfoObject) {
.line();
}

if ('contact' in info) {
if ('contact' in info && Object.keys(info.contact).length) {
md.line(transformContact(info.contact));
}

if ('license' in info) {
if ('license' in info && Object.keys(info.contact).length) {
md.line(transformLicense(info.license));
}
}
Expand Down

0 comments on commit 73aeaf8

Please sign in to comment.