Azure / Azure/azure-openapi-validator
Disallow non-primitive underlying types for enums
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 57
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
OpenAPI specs actually allow us to specify any type as the underlying type for an enum. AutoRest does not support this, not to mention specifying actual complex values in the enum is difficult in itself.
Moreover, with features like extensible enums this would become unyielding and hard to maintain.
tl;dr We need a new validation rule that disallows authors from specifying underlying type as anything other than the primitive types (string, integer, boolean, etc)
Severity should ideally be error since AutoRest has no way of handling complex underlying types
Category should be SDKViolation(?)
@shahabhijeet @fearthecowboy FYI
Contributor guide
Assessment
This issue has not been assessed yet.