-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update release branch #426
chore: update release branch #426
Conversation
Contributes to: asyncapi/spec#675 Signed-off-by: Dale Lane <[email protected]>
Contributes to: asyncapi/spec#675 Signed-off-by: Dale Lane <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
@fmvilas have a look
lib/asyncapiSchemaFormatParser.js
Outdated
'application/vnd.aai.asyncapi;version=2.0.0', | ||
'application/vnd.aai.asyncapi;version=2.1.0', | ||
'application/vnd.aai.asyncapi;version=2.2.0', | ||
'application/vnd.aai.asyncapi;version=2.3.0', | ||
'application/vnd.aai.asyncapi+json;version=2.0.0', | ||
'application/vnd.aai.asyncapi+json;version=2.1.0', | ||
'application/vnd.aai.asyncapi+json;version=2.2.0', | ||
'application/vnd.aai.asyncapi+json;version=2.3.0', | ||
'application/vnd.aai.asyncapi+yaml;version=2.0.0', | ||
'application/vnd.aai.asyncapi+yaml;version=2.1.0', | ||
'application/vnd.aai.asyncapi+yaml;version=2.2.0', | ||
'application/vnd.aai.asyncapi+yaml;version=2.3.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point, I'm already wondering if we should refactor this to something like:
'application/vnd.aai.asyncapi;version=2.0.0', | |
'application/vnd.aai.asyncapi;version=2.1.0', | |
'application/vnd.aai.asyncapi;version=2.2.0', | |
'application/vnd.aai.asyncapi;version=2.3.0', | |
'application/vnd.aai.asyncapi+json;version=2.0.0', | |
'application/vnd.aai.asyncapi+json;version=2.1.0', | |
'application/vnd.aai.asyncapi+json;version=2.2.0', | |
'application/vnd.aai.asyncapi+json;version=2.3.0', | |
'application/vnd.aai.asyncapi+yaml;version=2.0.0', | |
'application/vnd.aai.asyncapi+yaml;version=2.1.0', | |
'application/vnd.aai.asyncapi+yaml;version=2.2.0', | |
'application/vnd.aai.asyncapi+yaml;version=2.3.0', | |
...['2.0.0', '2.1.0', '2.2.0', '2.3.0'].map((version) => { | |
[ | |
`application/vnd.aai.asyncapi;version=${version}`, | |
`application/vnd.aai.asyncapi+json;version=${version}`, | |
`application/vnd.aai.asyncapi+yaml;version=${version}`, | |
] | |
}).flat() |
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fmvilas Definitely makes sense as then it is just a matter of adding new version to the list once, no copy/paste.
Just small improvement, missing return and generic mime types:
function getMimeTypes() {
return [
...['2.0.0', '2.1.0', '2.2.0', '2.3.0'].map((version) => {
return [
`application/vnd.aai.asyncapi;version=${version}`,
`application/vnd.aai.asyncapi+json;version=${version}`,
`application/vnd.aai.asyncapi+yaml;version=${version}`,
]
}).flat().concat(['application/schema;version=draft-07', 'application/schema+json;version=draft-07', 'application/schema+yaml;version=draft-07'])
];
}
Kudos, SonarCloud Quality Gate passed! |
1 similar comment
Kudos, SonarCloud Quality Gate passed! |
/rtm |
🎉 This PR is included in version 1.14.0-2022-01-release.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Contributes to: asyncapi/spec#675
Signed-off-by: Dale Lane [email protected]