IntelliJ won't navigate to $ref component
skurlow-bigw opened this issue · 4 comments
Describe the bug
When I move the cursor over the word somePayLoad and press Cmd+B then IntelliJ won't navigate down to where somePayLoad is defined and instead IntelliJ says 'Cannot find declaration to go to'.
When I run: asyncapi validate; it reports 0 errors and 0 warnings so my yaml file is valid. What is the issue?
How to Reproduce
Using this excerpt of my yaml file I cannot navigate from $ref containing somePayLoad to schema definition of somePayLoad
components:
messages:
payload:
$ref: '#/components/schemas/somePayLoad'
schemas:
somePayLoad:
type: object
allOf:
- $ref: 'https://raw.githubusercontent.com/cloudevents/spec/v1.0.1/spec.json'
properties:
data:
$ref: '#/components/schemas/SomeDTO'
SomeDTO:
required:
- eventId
type: object
properties:
eventId:
type: string
Expected behavior
IntelliJ should navigate to reference schema definition
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.
What I found out was if I change from:
$ref: '#/components/schemas/SomeDTO'
to:
$ref: "#/components/schemas/SomeDTO"
the navigation to SomeDTO declaration works using macOS. Perhaps to help others you may want to indicate this in your doc. In some places in your doc you have examples using single quotes and others double quotes.
@skurlow-bigw hi! New version is available