studio icon indicating copy to clipboard operation
studio copied to clipboard

studio gets blank white while writing complex binding

Open derberg opened this issue 3 years ago • 1 comments

Describe the bug

I took this file and it works:

asyncapi: 2.4.0
info:
  title: Shrek App
  version: 1.0.0
  description: >
    Purpose of this app is to have some fun with AsyncAPI and WebSocket and
    define an interface for ... Shrek.

    ![](https://media.giphy.com/media/10Ug6rDDuG3YoU/giphy-downsized.gif)

    You can use this API to chat with Shrek bot or to get updates about
    artifical travels to different locations.
servers:
  swamp:
    url: localhost
    protocol: ws
channels:
  /chat:
    subscribe:
      summary: Client can receive chat messages.
      operationId: subChatMessage
      message:
        $ref: '#/components/messages/chatMessage'
    publish:
      summary: Client can send chat messages.
      operationId: pubChatMessage
      message:
        $ref: '#/components/messages/chatMessage'
  /travel/status:
    subscribe:
      summary: Client can receive travel info status.
      operationId: subTravelInfo
      message:
        $ref: '#/components/messages/travelInfo'
    bindings: 
      ws:
        bindingVersion: 0.1.0
        query:
          type: object
          description: |
            You can specify to receive travel status info from specific location
          properties:
            destination:
              type: string
              description: Airport code
              enum:
                - BCN
                - KTW
                - LCY
components:
  messages:
    chatMessage:
      summary: Message that you send or receive from chat
      payload:
        type: string
      x-response:
        description: Location of the information about where reply should be sent to
        location: "$message.payload#/replyTo" 
    travelInfo:
      summary: Message that contains information about travel status.
      payload: 
        $ref: "#/components/schemas/travelData"
      examples:
        - payload:
            destination: Far far away
            distance: Beyond the seven mountains and seven forests
            arrival: Pretty soon
  schemas: # payload
    travelData:
        type: object
        properties:
          destination:
            description: Name of travel destination.
            type: string
          distance:
            description: How much distance left to the target.
            type: string
          arrival:
            description: Time left to get there.
            type: string

but you not always copy/paste, sometimes you write document from scratch. And error happens when I add info manually.

this file breaks UI:

asyncapi: 2.4.0
info:
  title: Shrek App
  version: 1.0.0
  description: >
    Purpose of this app is to have some fun with AsyncAPI and WebSocket and
    define an interface for ... Shrek.

    ![](https://media.giphy.com/media/10Ug6rDDuG3YoU/giphy-downsized.gif)

    You can use this API to chat with Shrek bot or to get updates about
    artifical travels to different locations.
servers:
  swamp:
    url: localhost
    protocol: ws
channels:
  /chat:
    subscribe:
      summary: Client can receive chat messages.
      operationId: subChatMessage
      message:
        $ref: '#/components/messages/chatMessage'
    publish:
      summary: Client can send chat messages.
      operationId: pubChatMessage
      message:
        $ref: '#/components/messages/chatMessage'
  /travel/status:
    subscribe:
      summary: Client can receive travel info status.
      operationId: subTravelInfo
      message:
        $ref: '#/components/messages/travelInfo'
    bindings: 
      ws:
        bindingVersion: 0.1.0
        query:
          type: object
          description: |
            You can specify to receive travel status info from specific location
          properties:
            destination:
components:
  messages:
    chatMessage:
      summary: Message that you send or receive from chat
      payload:
        type: string
      x-response:
        description: Location of the information about where reply should be sent to
        location: "$message.payload#/replyTo" 
    travelInfo:
      summary: Message that contains information about travel status.
      payload: 
        $ref: "#/components/schemas/travelData"
      examples:
        - payload:
            destination: Far far away
            distance: Beyond the seven mountains and seven forests
            arrival: Pretty soon
  schemas: # payload
    travelData:
        type: object
        properties:
          destination:
            description: Name of travel destination.
            type: string
          distance:
            description: How much distance left to the target.
            type: string
          arrival:
            description: Time left to get there.
            type: string

notice the part I removed:

              type: string
              description: Airport code
              enum:
                - BCN
                - KTW
                - LCY

derberg avatar Jul 21 '22 10:07 derberg

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.

github-actions[bot] avatar Jul 21 '22 10:07 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Nov 19 '22 00:11 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Mar 22 '23 00:03 github-actions[bot]

@magicmatatjahu Can I take this up?

Shurtu-gal avatar May 22 '23 14:05 Shurtu-gal

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Sep 21 '23 00:09 github-actions[bot]