RAML Error recursive shape

In the below RAML, I am getting “Error recursive shape”. RAML is below with the error from line starting at ListInventory1 to type: ListInventoryResponse1

#%RAML 1.0

title: Test API

version: 1.0

baseUri: http://xxx.yyy.mmm.com/

baseUriParameters: {}

protocols:

  • HTTP

types:

APIUsageInformation:

displayName: APIUsageInformation

description: ''

type: object

properties:

  apiCallsRemaining:

    required: true

    displayName: apiCallsRemaining

    xml:

      attribute: false

      wrapped: false

      name: apiCallsRemaining

    type: integer

    format: int32

AuthenticationHeader:

displayName: AuthenticationHeader

description: ''

type: object

properties:

  apiKey:

    required: true

    displayName: apiKey

    xml:

      attribute: false

      wrapped: false

      name: apiKey

    type: string

TshirtFault:

displayName: TshirtFault

description: ''

type: object

properties:

  errorMessage:

    required: true

    displayName: errorMessage

    xml:

      attribute: false

      wrapped: false

      name: errorMessage

    type: string

ListInventory:

displayName: ListInventory

description: ''

type: object

properties: {}

ListInventoryResponse:

displayName: ListInventoryResponse

description: ''

type: object

properties:

  inventory:

    required: false

    displayName: inventory

    xml:

      attribute: false

      wrapped: false

    type: array

    items:

      xml:

        name: inventory

      type: InventoryItem

InventoryItem:

displayName: InventoryItem

description: ''

type: object

properties:

  size:

    required: true

    displayName: size

    xml:

      attribute: false

      wrapped: false

      name: size

    type: string

    enum:

    - XS

    - S

    - M

    - L

    - XL

    - XXL

    - NA

  description:

    required: true

    displayName: description

    xml:

      attribute: false

      wrapped: false

      name: description

    type: string

  count:

    required: true

    displayName: count

    xml:

      attribute: false

      wrapped: false

      name: count

    type: integer

    format: int32

ListInventory1:

displayName: ListInventory1

type: object

properties:

  ListInventory:

    required: true

    displayName: ListInventory

    type: ListInventory1

ListInventoryResponse1:

displayName: ListInventoryResponse1

type: object

properties:

  ListInventoryResponse:

    required: true

    displayName: ListInventoryResponse

    xml:

      attribute: false

      wrapped: false

      name: ListInventoryResponse

    type: ListInventoryResponse1

TshirtFaultException_Error:

  displayName: TshirtFaultException_Error

  type: object

  properties:

    TshirtFault:

      required: true

      displayName: TshirtFault

      type: TshirtFault

/ListInventory:

post:

displayName: ListInventory

body:

  application/json:

    displayName: Body

    xml:

      attribute: false

      wrapped: false

      name: ListInventory

    type: ListInventory1

responses:

  200:

    description: Success

    body:

      application/json:

        displayName: ListInventory Response

        xml:

          attribute: false

          wrapped: false

          name: ListInventoryResponse

        type: ListInventoryResponse1

  500:

    description: Error in retrieving response

    body:

      application/json:

        description: Error in retrieving response

        type: TshirtFaultException_Error

Issue fixed

Changed Type to ListInventoryResponse instead of ListInventoryResponse1 as it was pointing to itself

1 Like