Skip to content

Commit

Permalink
chore(eslint): eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloab committed Apr 18, 2022
1 parent 19ac386 commit dfca1e1
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/specification.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,25 @@ function prepare(definition) {
'securityDefinitions',
'components',
],
v4: [
'components',
'channels',
],
v4: ['components', 'channels'],
};

const getVersion = () => {
if(swaggerObject.asyncapi) {
if (swaggerObject.asyncapi) {
return 'v4';
}

if(swaggerObject.openapi) {
if (swaggerObject.openapi) {
return 'v3';
}

if(swaggerObject.swagger) {
if (swaggerObject.swagger) {
return 'v2';
}

swaggerObject.swagger = '2.0';
return 'v2';
}
};

const version = getVersion();

Expand Down

0 comments on commit dfca1e1

Please sign in to comment.