Skip to content

allOf inside items doesn't work #2271

@andresz1

Description

@andresz1
  • Description: Usage of allOf inside items only shows the first element
  • Version: 2.1.4
  • Example:

I'm trying to add an id field to user's definition. A part of my swagger.json file:

"docs": {
  "type": "array",
  "items": {
    "allOf": [
      {
        "$ref": "#/definitions/User"
      },
      {
        "properties": {
          "id": {
            "type": "string"
          }
        }
      }
    ]
  }
}

The example value showed in the ui is the following:

{
  "docs": [
    {
      "email": "string",
      "createdAt": "2016-07-12T19:40:42.290Z",
      "updatedAt": "2016-07-12T19:40:42.290Z"
    }
  ],
  "total": 0,
  "limit": 0,
  "offset": 0
}

As you can see, the id field is not shown. Any idea ? I would highly appreciate any help.
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions