-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
asyncapi CLI model generation fails if AnyModel is used #1561
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
Lets change it to warn then, which is probably a better representation anyway 😄 Mind helping out with it @PeteAudinate? |
This is needed to prevent the asyncapi CLI from aborting when an AnyModel is encountered.
🎉 This issue has been resolved in version 1.9.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 2.0.0-next.25 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe the bug
If a schema includes an "Any" type, the code in
CommonModelToMetaModel.js
logs an error then returns an AnyModel (modelina/src/helpers/CommonModelToMetaModel.ts
Line 95 in 68e9a23
This error logging causes the
asyncapi generate model
command to abort and not generate any output.How to Reproduce
With the following:
Running:
Produces:
..and no generated files.
Expected behavior
The above should generate the rust model with a
serde_json::Value
type.If I manually change the
Logger.error
toLogger.warn
inCommonModelToMetaModel.js
, it works as expected.The text was updated successfully, but these errors were encountered: