-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
reference object throwing error in Studio #278
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. |
@michael-j-oreilly Hi! As I see you are using the local reference to the file and atm we don't support that because we do not have access to the filesystem in the browser.
We are using underneath the 3rd package to resolve all reference (to make pure JSON with all data) but sure, we should improve that output errors. Could you create feature request for that in the https://github.com/asyncapi/parser-js/issues repo? I would appreciate it. When we will support that #195 we can thinking how to handle local file system :) Do you want to add something? |
Thanks @magicmatatjahu for the quick response, really appreciated. That makes sense. I will reach out to the backstage repo with the bug and get that on their radar as well. I will also enter a feature request as advised. |
any updates on this? |
Describe the bug
I am receiving an error in studio when leveraging file paths as part of the reference object.
Offending yaml
- $ref: '../models/base-event.yaml#/components/schemas/BaseEvent'
Error shown
undefined is not an object (evaluating 'e.t0.errors[0]')
How to Reproduce
Leverage AsyncAPI studio to create the following schema (below)
Use a relative file path in the reference object.
But using studio or backstage.io to compile the html it throws the error above. Is there something I am not following or need to account for in these sorts of use cases?
It compiles fine using the generator
`asyncapi: 2.3.0
info:
title: Main App
version: 1.0.0
description: That old good app
channels:
client:
publish:
operationId: publishClient
message:
name: client
title: 'EOR Client'
description: 'Broadcasts create, update, and delete modifications to Customers.'
payload:
allOf:
- $ref: '../models/base-event.yaml#/components/schemas/BaseEvent'
- type: object
properties:
payload:
$ref: '../models/client.yaml#/components/schemas/Client'`
Expected behavior
Not to throw unclear error. Could look at graceful error handling/user experience maybe. Is it bad practice to divide or organise schemas internally this way?
The text was updated successfully, but these errors were encountered: