Redocly/redoc

Array of enums ignores enum's schema description when rendered

Open

#905 aperta il 8 mag 2019

Vedi su GitHub
 (4 commenti) (0 reazioni) (0 assegnatari)TypeScript (2272 fork)batch import
Type: Enhancementhelp wanted

Metriche repository

Star
 (21.877 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor