You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regarding the changes in Parser-JS, we don’t really need to do a lot because we can keep the current API -> schema(): Schema | undefined
However, things like parameter.schema().example() will now require to return the value from the parameter.example() which is basically the parent level.
In that way, we don’t need to add a breaking change in the parser-api. Internally, we can create a new object called simplifiedSchema or similar, that inherits the behaviour from the Schema object, but only “allowing” the enum, default, and examples methods, logging a warning message when using the others.
Remember that including any non-supported field in the parameter will make any ASyncAPI v3 document to become invalid, so it is not expected developers call any other method from the schema (but still, logging a warning message its a good idea)
The text was updated successfully, but these errors were encountered:
Apply the changes introduced by asyncapi/spec#935
Regarding the changes in Parser-JS, we don’t really need to do a lot because we can keep the current API ->
schema(): Schema | undefined
However, things like
parameter.schema().example()
will now require to return the value from theparameter.example()
which is basically the parent level.In that way, we don’t need to add a breaking change in the parser-api. Internally, we can create a new object called
simplifiedSchema
or similar, that inherits the behaviour from theSchema
object, but only “allowing” the enum, default, and examples methods, logging a warning message when using the others.Remember that including any non-supported field in the parameter will make any ASyncAPI v3 document to become invalid, so it is not expected developers call any other method from the schema (but still, logging a warning message its a good idea)
The text was updated successfully, but these errors were encountered: