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

Plugin cannot deal with separate files #35

Closed
rost5000 opened this issue Aug 22, 2023 · 9 comments · Fixed by #104
Closed

Plugin cannot deal with separate files #35

rost5000 opened this issue Aug 22, 2023 · 9 comments · Fixed by #104
Assignees
Labels
bug Something isn't working

Comments

@rost5000
Copy link

Describe the bug

I have the following structure of the assyncapi:

  1. assyncapi.yml:
    asyncapi: '2.6.0'
    info:
      title: Account Service
      version: 1.0.0
      description: This service is in charge of processing user signups
    channels:
      user/signedup:
        subscribe:
          message:
            $ref: './messages/common.yaml#/components/messages/UserSignedUp'
  2. ./messages/common.yaml
     asyncapi: '2.6.0'
     info:
       title: Account Service
       version: 1.0.0
       description: This service is in charge of processing user signups
     channels:
       {}
     components:
       messages:
         UserSignedUp:
           payload:
             type: object
             properties:
               displayName:
                 type: string
                 description: Name of the user
               email:
                 type: string
                 format: email
                 description: Email of the user

When I press a preview button . I see the error:
image

How to Reproduce

  1. Open IntelijIdea (I have 2023.2)
  2. Clone the project: https://github.com/rost5000/assyncapi-dummy-view.git
  3. Open the file: src/main/resources/assyncapi.yml
  4. Press the button preview

Expected behavior

I expect the view in idea like: this

@rost5000 rost5000 added the bug Something isn't working label Aug 22, 2023
@github-actions
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.

@theschles
Copy link
Member

theschles commented Aug 23, 2023

Hi! Out of curiosity, does it work with absolute paths?

@Pakisan
Copy link
Member

Pakisan commented Aug 24, 2023

@rost5000 Hi!

It's because of 2.6.0. I submitted update to JetBrains. Will be available on Monday(few days for review from their side)

@Pakisan
Copy link
Member

Pakisan commented Sep 4, 2023

@rost5000 hi!

I checked both variants on current and new versions- 2.2.0, 2.3.0. Reference resolving works great, with specs that you were provided

Scenario 1:

spec(assyncapi.yml):

asyncapi: 2.5.0
info:
  title: Account Service
  version: 1.0.0
  description: This service is in charge of processing user signups
channels:
  user/signedup:
    subscribe:
      message:
        $ref: "./messages/userSignedUp.yaml"

ref:

payload:
  type: object
  properties:
    displayName:
      type: string
      description: Name of the user(2_2)
    email:
      type: string
      format: email
      description: Email of the user(3_3)
Screenshot 2023-09-04 at 10 04 57

Scenario 2:
spec(assyncapi.yml):

asyncapi: 2.6.0
info:
  title: Account Service 22
  version: 1.0.0
  description: This service is in charge of processing user signups
channels:
  user/signedup:
    subscribe:
      message:
        $ref: './messages/common.yaml#/components/messages/UserSignedUp'

ref:

asyncapi: 2.6.0
info:
  title: Account Service--
  version: 1.0.0
  description: This service is in charge of processing user signups
channels:
  {}
components:
  messages:
    UserSignedUp:
      payload:
        type: object
        properties:
          displayName:
            type: string
            description: Name of the user
          email:
            type: string
            format: email
            description: Email of the user
Screenshot 2023-09-04 at 10 03 11

Looks like problem is only in preview view which was provided by IDEA, not my plugin. Will try to research what went wrong and create an issue

For now, you can still use the preview in the browser button. It allows to render specifications inside IDEA or in any installed browser with refresh on save

Screenshot 2023-09-04 at 10 07 16

@Pakisan Pakisan self-assigned this Sep 4, 2023
@Pakisan Pakisan closed this as completed Sep 5, 2023
@rost5000
Copy link
Author

rost5000 commented Sep 8, 2023

@Pakisan, thanks for your researching. The problem is still reproducing. Probably, it is connected to comparbility with your plugin and openapi view plugin. I will try to check out

@Pakisan
Copy link
Member

Pakisan commented Sep 8, 2023

@rost5000 I hope folks from JetBrains fix this issue soon, but unfortunately it will be available only in next IDEA release

@Pakisan
Copy link
Member

Pakisan commented Aug 28, 2024

@rost5000

fyi: #101

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

Pakisan commented Sep 3, 2024

@rost5000 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.

3 participants