Open orangejohny opened 3 hours ago
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.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Describe the bug.
Hi!
There is an error showed in UI when trying to preview
asyncapi.yaml
containing a reference to a local file. The error isTypeError: i.readFile is not a function
.Vscode info:
Version: 1.95.2 (Universal) Commit: e8653663e8840adaf45af01eab5c627a5af81807 Date: 2024-11-07T11:07:22.054Z Electron: 32.2.1 ElectronBuildId: 10427718 Chromium: 128.0.6613.186 Node.js: 20.18.0 V8: 12.8.374.38-electron.0 OS: Darwin x64 24.1.0
asyncapi-preview version: v0.6.5
Expected behavior
asyncapi.yaml
renders correctly.Screenshots
How to Reproduce
Create
asyncapi.yaml
file with following content:asyncapi.yaml
```yaml asyncapi: 2.6.0 info: title: Example version: '0.1.0' defaultContentType: application/json servers: nats: protocol: nats url: '{protocol}://{host}:{port}' variables: protocol: default: nats host: default: localhost port: default: '4222' channels: event/example: publish: operationId: example bindings: nats: queue: 'event.example' message: messageId: example payload: type: object allOf: - $ref: 'https://raw.githubusercontent.com/cloudevents/spec/v1.0.2/cloudevents/formats/cloudevents.json' properties: data: $ref: 'cluster.yaml' ```Create
cluster.yaml
file with following content:cluster.yaml
```yaml type: object properties: id: type: string ```asyncapi.yaml
preview.🥦 Browser
None
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
None