Syntax error


#1

In my Raml api definition I have this definition for a endpoint /teams. Getting the post method error-free gives me a headache.:

  post:
    body:
      application/json:
        type: object
        properties:
          teams:
            required: true
            type: array
            items:
              type: object
              properties:
                id: string
                displayName: string
                domainOwnerId: string
                members:
                  type: array
                  items:
                    type: object
                    properties:
                      firstName: string
                      infix: string
                      roleId: integer
                      lastName: string
                      personId: string
        example: |
          {
            "teams": [{
              "id": ""
              ,"displayName": "Team HR"
              ,"domainOwnerId": ""
              ,"members": [{
                "firstName": "Jean",
                "infix": "",
                "roleId": 20,
                "lastName": "Pieter",
                "personId": "fbabcb4b-bf44-4ce3-871c-118c1c5d322a"
              }]
            }]
          }

The error I get is

“example:node example can not be a scalar,example:missing required property value”

The error appears in the details pane of Atom Api-workbench. Not in te editor window.I have no idea what this means…What is missing here?


#2

You are not missing anything. Ignore the details pane for now. That seems to be a problem. Can you raise a bug on the api-workbench github repo and link it here again. I’ll take care of it.


#3

I cannot see any issue with your RAML design, everything looks fine.
The JSON example is also valid :slight_smile:
May be issue with API-Workbench as said above.