Redocly/redoc

Array of enums ignores enum's schema description when rendered

Open

#905 opened on May 8, 2019

View on GitHub
 (4 comments) (0 reactions) (0 assignees)TypeScript (21,877 stars) (2,272 forks)batch import
Type: Enhancementhelp wanted

Description

Example array schema:

{
  "description": "Роли пользователя.",
  "items": {
    "description": "Роль пользователя.\n\n* `ROLE_DEVELOPER`. Разработчик (имеет все возможные права).\n* `ROLE_MANAGER`. Менеджер (на данный момент является синонимом слова \"админ\").\n* `ROLE_MEDICAL_REPRESENTATIVE`. Медицинский представитель.",
    "example": "ROLE_DEVELOPER",
    "title": "Role",
    "type": "string",
    "nullable": false,
    "readOnly": false,
    "writeOnly": false,
    "enum": [
      "ROLE_DEVELOPER",
      "ROLE_MANAGER",
      "ROLE_MEDICAL_REPRESENTATIVE"
    ]
  },
  "maxItems": 3,
  "minItems": 0,
  "uniqueItems": true,
  "type": "array",
  "nullable": false
}

That's how ReDoc renders it in response section:

image

That's how ReDoc renders it in parameters section:

image

As you may see, ReDoc ignores description of enum schema. I didn't tested how ReDoc renders it in request section, but I'm sure result will be the same as in response section.

Contributor guide