-
-
Notifications
You must be signed in to change notification settings - Fork 197
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: infer name for object schema #65
chore: infer name for object schema #65
Conversation
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.
Most of the things looks good I however got a few things that needs to be addressed first:
- Does it really make sense to call it
originalSchema
anymore? since it is no longer the original but a modified version? - Does it make sense to have
$id
as part of the CommonModel anymore since your new name kinda replaces this right? This also means you can remove the anonymous schema id naming functionality. - Skipped tests need to be unskipped
- I would love to see unit tests for this function instead of relying on integration tests to show it.
@jonaslagoni Thanks for review!
I know, but we have an architectural problem. As you know we have this problem with additional iteration in Also extension shouldn't be treated as changing schema -> this same we make inside our parser-js. |
@jonaslagoni I removed |
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.
So my requirement for this infer name is that name is unique for all schemas, this might be wrong, but then I dont see how we can use this in replacement of the anon schema naming?
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.
Just have two comments, looking great overall!
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.
🥳
🎉 This PR is included in version 0.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
declarations
,definitions
,properties
by propertyName and save them inx-modelgen-inferred-name
, then infer this name to$id
CommonModel's propertyRelated issue(s)
See also asyncapi/shape-up-process#45