-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
feat: add simplified channel parameter #816
feat: add simplified channel parameter #816
Conversation
Would you consider throwing warning log lines for those methods that users are unexpected to use? |
@smoya I considered it, but I could not justify it with any reason. Cause it's not like the functions are deprecated or anything 🤷 They just wont return anything if paired with v3 documents, but will with v2. So not sure who the logging is for? Owners of tools that use it? No cause it's not until the users provide a document those things are caught. |
@jonaslagoni I don't know if it was discussed but you can reuse v3.SchemaModel but passing as
etc. - all data will be handled in Creating new model for this is not a good idea. |
@magicmatatjahu you right, thats way cleaner, let me refactor it. |
Something like: schema(): SchemaInterface | undefined {
if (!this.hasSchema()) return undefined;
return this.createModel(Schema, {
type: 'string',
description: this._json.description,
examples: this._json.examples,
// etc...
}, { pointer: `${this._meta.pointer}` });
} |
Done 👍 |
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.
Only one comment, rest is good :)
Co-authored-by: Maciej Urbańczyk <[email protected]>
Co-authored-by: Maciej Urbańczyk <[email protected]>
@magicmatatjahu do you have a bit of OCD by any chance? 😄 |
Kudos, SonarCloud Quality Gate passed! |
/rtm |
🎉 This PR is included in version 2.1.0-next-major-spec.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.2.0-next-major-spec.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
This PR adds the support for the simplified channel parameters by utilizing a custom implementation of Schema that just looks in the parent parameter object for the values instead of under a
.schema
property that no longer exist for v3.Related issue(s)
Fixes #815