-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
fix: change metadata of models and fix minor things #663
fix: change metadata of models and fix minor things #663
Conversation
if (typeof additionalItems === 'boolean') return additionalItems; | ||
if (additionalItems === undefined) return true; | ||
if (additionalItems === null) return false; | ||
if (additionalItems === undefined || additionalItems === null) return; |
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.
We have to be consistent with implementation in v1 parser - current logic in next-major
has breaking change in additionalItems
and additionalProperties
methods and some templates won't work.
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.
@@ -2,6 +2,5 @@ import type { BaseModel } from './base'; | |||
|
|||
export interface ExtensionInterface<T = any> extends BaseModel { | |||
id(): string; | |||
version(): string; |
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.
Please ensure this change is proposed in asyncapi/parser-api#71
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.
Done asyncapi/parser-api#71 (comment) :)
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!! Just one very minor, feel free to discard
Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com>
Kudos, SonarCloud Quality Gate passed! |
@smoya Thanks! |
/rtm |
🎉 This PR is included in version 2.0.0-next-major.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
input
to theasyncapi
metadata of models.source
in model metadata now points to the source of file/document, not to the input.x-parser-schema-id
so I will add proper if insetExtension
function.validate
andparse
functions.version()
method fromExtension
model - we don't have clarified it in spec, so we shouldn't add that in current api.additionalItems
andadditionalProperties
methods from old Schema model - we havw to consistent with old logic.cc @smoya