-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Failing to process Compliant AsyncAPI Document - Component/Schema Failure #4
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
Sorry I missed this one, I'll look at it over the next few days. |
…mbedded inside an operation, as is the case with the Streetlights demo.
… there is an anonymous one in an operation. (#13) * First commit with samples. * Work in progress. * Work in progress. * First commit with code worth sharing. * Fixed merge messages in README. * fixes #4 This template now works when the payload schema is embedded inside an operation, as is the case with the Streetlights demo.
* First commit with samples. * Work in progress. * Work in progress. * First commit with code worth sharing. * Fixed merge messages in README. * fixes #4 This template now works when the payload schema is embedded inside an operation, as is the case with the Streetlights demo. * fix: dummy commit to push through the fix for issue/4.
🎉 This issue has been resolved in version 0.2.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe the bug
When trying to generate classes from a compliant sample without a seperate defined schema the generator fails with following error.
Error: Unable to call `the return value of (asyncapi["components"])["schemas"]
How to Reproduce
Failure can be seen when trying to process Streetlights tutorial.
asyncapi: '2.0.0'
info:
title: Streetlights API
version: '1.0.0'
description: |
The Smartylighting Streetlights API allows you
to remotely manage the city lights.
license:
name: Apache 2.0
url: 'https://www.apache.org/licenses/LICENSE-2.0'
servers:
mosquitto:
url: mqtt://test.mosquitto.org
protocol: mqtt
channels:
light/measured:
publish:
summary: Inform about environmental lighting conditions for a particular streetlight.
operationId: onLightMeasured
message:
payload:
type: object
properties:
id:
type: integer
minimum: 0
description: Id of the streetlight.
lumens:
type: integer
minimum: 0
description: Light intensity measured in lumens.
sentAt:
type: string
format: date-time
description: Date and time when the message was sent.
Expected behavior
AsyncAPI 2.0 compliant files should be processed correctly.
The text was updated successfully, but these errors were encountered: