question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add rule for extensible enums

See original GitHub issue

If enum is used for a field a should rule violation should be fired because we recommend usage of x-extensible-enum, see http://zalando.github.io/restful-api-guidelines/compatibility/Compatibility.html (“Should: Used Open-Ended List of Values (x-extensible-enum) Instead of Enumerations”)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
ePaulcommented, Apr 28, 2017

Possibly this could be restricted to objects used for server → client communication (assuming the server is the API owner)? For client → server, enum is fine (and extensible).

0reactions
maxim-tschumakcommented, Jun 28, 2017

@netme

You can use the enum keyword to specify possible values of a request parameter or a model property.

(from Swagger Specs)

I’m working on it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Add rule for extensible enums - - Bountysource
If enum is used for a field a should rule violation should be fired because we recommend usage of x-extensible-enum ...
Read more >
Extensible Enums - Business Central - Microsoft Learn
Enums can be extended in order to add more values to the enumeration list in which case the Extensible property must be set...
Read more >
java - Can enums be subclassed to add new elements?
The recommended solution to this is the extensible enum pattern. This involves creating an interface and using that where you currently use the...
Read more >
Extensible Enumerations A Guide for Preparers - FASB
The purpose of this Guide is to explain an XBRL design feature(1), known as extensible enumerations, denoted in the Taxonomy as an element ......
Read more >
Extensible Enums in Dynamics 365 Business Central
Three scenarios spring to mind where extending an enum could be particularly useful. Adding On-premise Support. As a rule we try to write...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found