Skip to content
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

Closed
Paul-T-AU opened this issue May 22, 2020 · 4 comments · Fixed by #13
Closed

Failing to process Compliant AsyncAPI Document - Component/Schema Failure #4

Paul-T-AU opened this issue May 22, 2020 · 4 comments · Fixed by #13
Labels
bug Something isn't working released

Comments

@Paul-T-AU
Copy link

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.

@Paul-T-AU Paul-T-AU added the bug Something isn't working label May 22, 2020
@github-actions
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Jul 21, 2020
@damaru-inc
Copy link
Contributor

Sorry I missed this one, I'll look at it over the next few days.

@damaru-inc damaru-inc added bug Something isn't working and removed bug Something isn't working stale labels Jul 30, 2020
damaru-inc added a commit to damaru-inc/python-paho-template that referenced this issue Aug 6, 2020
…mbedded inside an operation, as is the case with the Streetlights demo.
damaru-inc added a commit that referenced this issue Aug 6, 2020
… 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.
damaru-inc added a commit that referenced this issue Aug 18, 2020
* 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.
@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 0.2.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
3 participants