Azure / Azure/oav

Can linter help us standardize on how comma-separated values in enumerations should look?

Open
#661 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
104
Forks
62
Avg merge
2d 12h
Merged PRs (30d)
5

Description

An example of inconsistency creeping in to swagger specs that this would address is enum values where one service declares their version of the acceptable enum values as

"SystemAssigned, UserAssigned"

and another declares it without spaces

"SystemAssigned,UserAssigned"

Which will probably lead to user experience issues where what works with one service does not work with another, as well as make code commonalization harder.

This could happen on various enum types represented as well as managed identity scenario, which is the top area I'm noticing it today.

Can we reduce the scope of this problem in future by having a linter rule added to ban/require spaces in the swagger definition? (Do we have a guideline on which is the correct way to declare such enum values already?)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing linter rules and the handling of enum values in Swagger/OpenAPI validation. Determine whether a guideline already defines spacing, then specify the preferred representation and add a rule that consistently enforces it across enum types, including managed identity cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.