-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Extend the components model with has-like functions #173
Comments
I made a simple PR #175 and I checked that some models haven't relevant "info": {
"contact": {}
} then json-schema-parser won't throw error, because any field in contact object isn't required, so @derberg What do you think? |
@magicmatatjahu I totally agree, we need to properly handle those not mandatory fields that could be empty |
video about the issue https://youtu.be/Iqs_2BiNEEo?t=2060 |
@magicmatatjahu you can reopen your PR ;) |
🎉 This issue has been resolved in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Reason/Context
It would be very useful when working on docs/code generators to have a set of helper functions that let you easily determine if there is or not a specific component added to the
components
section of the AsyncAPI document and if it has any data. These components are not required and it is not required to have any data in them, so someone can add an empty object for example.Many models already have useful functions like
hasDescription
.Description
Add missing functions to Components model:
Example
hasParameter
function from Channels modelAdd missing tests here. Example test is here
The text was updated successfully, but these errors were encountered: