Azure / Azure/api-management-developer-portal

Enum values are not displayed for simple types with enum

Open
#408 4 comments 1 reaction 0 assignees View on GitHub
(t) Improvement (u) OpenAPI + API ref P2
Dominant language
TypeScript
Stars
545
Forks
360
PR merge metrics
No merged PRs in 30d

Description

Given string property defined with enum listed values.

```json
"accountType": {
"enum": [
"CEHQUING",
"SAVINGS",
"CREDIT_CARD",
"LOAN",
"OTHER"
],
"type": "string"
},
```

The displayed model in the portal does not list the enum values.

Maybe a separate column after description listing the values would work but that could waste a lot of room for properties that have no enum values to list. I think its best to let the description column stay expanded.

I think instead it might be best to offer a dropdown to view allowed values in some way, here is an example:

![image](https://user-images.githubusercontent.com/8837910/72298821-0935fb80-3614-11ea-9376-83df583ada4c.png)

Thank you.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the portal model view with the provided string property schema and inspect how simple properties are rendered. Compare the current display with the linked example, then determine how allowed enum values should be exposed without wasting space for properties that have none. Done means enum values are accessible in the model view while non-enum properties remain usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.