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

Asyncapi: 3.0.0 .$ref has no suggestions/autocomplete and navigation #47

Closed
korifey91 opened this issue Feb 12, 2024 · 8 comments · Fixed by #104
Closed

Asyncapi: 3.0.0 .$ref has no suggestions/autocomplete and navigation #47

korifey91 opened this issue Feb 12, 2024 · 8 comments · Fixed by #104
Labels
bug Something isn't working

Comments

@korifey91
Copy link

Describe the bug

I'm having a problem with $ref.

Asyncapi 2.6.0 in WebStorm works well, I can see autocomplete\suggestions and navigate to components by clicking on $ref paths.

But with asyncapi: 3.0.0 I can't do the same.

I assume that with 2.6.0 all is fine due to OpenAPI Specifications bundled plugin, but it doesn't support v3.

How to Reproduce

WebStorm info

WebStorm 2023.3.3
Build #WS-233.14015.89, built on January 23, 2024
Runtime version: 17.0.9+7-b1087.11 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.6.3
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Metal Rendering is ON
Registry:
  ide.balloon.shadow.size=0
  debugger.watches.in.variables=false
  debugger.new.tool.window.layout=true
  ide.experimental.ui=true
Non-Bundled Plugins:
  com.asyncapi.plugin.idea (2.4.0+jre17)
  com.intellij.ideolog (222.3.1.0)
  github.cweijan.test-theme (1.6)
  com.intellij.ml.llm (233.14015.147)
  com.mallowigi (94.1.0)
  mobi.hsz.idea.gitignore (4.5.2)
  com.intellij.mermaid (0.0.19+IJ.232)
  com.intellij.lang.jsgraphql (233.13135.65)
  com.emberjs (2023.3.2)
  ru.adelf.idea.dotenv (2024.1)

Here is the yaml file

asyncapi: 3.0.0
info:
  title: Cool Example
  version: 0.1.0
channels:
  userSignedUp:
    address: user/signedup
    messages:
      userSignedUp:
        description: An event describing that a user just signed up.
        payload:
          type: object
          properties:
            fullName:
              $ref: '#/components/schemas/fullName'
            email:
              type: string
              format: email
            age:
              type: integer
              minimum: 18
operations:
  userSignedUp:
    action: send
    channel:
      $ref: '#/channels/userSignedUp'
components:
  schemas:
    fullName:
      type:
        string

Video

screencast.2024-02-12.10-42-34.mp4

Expected behavior

It is expected that navigation\autocomplete\suggestions work well with v3 as well as with v2.6

@korifey91 korifey91 added the bug Something isn't working label Feb 12, 2024
Copy link

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.

@Pakisan
Copy link
Member

Pakisan commented Feb 12, 2024

@korifey91 hi!

Can you try to replace ' with "?

@korifey91
Copy link
Author

Hi @Pakisan !

Thank you! Yes, it works with double quotes.

Is this expected behavior?
I assume that there should be no difference in which quotes to use. Otherwise, some external (which I cannot control) specifications will not work for me, as a WebStorm user.

@Pakisan
Copy link
Member

Pakisan commented Feb 12, 2024

Hi @Pakisan !

Thank you! Yes, it works with double quotes.

Is this expected behavior?

I assume that there should be no difference in which quotes to use. Otherwise, some external (which I cannot control) specifications will not work for me, as a WebStorm user.

No, it's not expected behavior. Will check IDEA sdk for better method to recognize properly string values in single and double quotes

This bug must not block using of components from others schemas

@theschles
Copy link
Member

Hi @Pakisan any updates on this?

@adammfrank
Copy link

There are no autocomplete suggestions for local file references regardless of which quotes I use.

@Pakisan Pakisan mentioned this issue Aug 28, 2024
@Pakisan
Copy link
Member

Pakisan commented Aug 28, 2024

@adammfrank @korifey91

fyi: #101

@Pakisan
Copy link
Member

Pakisan commented Sep 3, 2024

@adammfrank @korifey91 hi! New version is available

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

Successfully merging a pull request may close this issue.

4 participants