raml-spec icon indicating copy to clipboard operation
raml-spec copied to clipboard

Add ability to have constants

Open rspremulli-sf opened this issue 4 years ago • 0 comments
trafficstars

Use case:

I have a discriminated type, and certain properties, such as the discriminator value itself, may only accept a single valid value. There is a need to pass the value to identify the type, but there is only one allowed value. Ideally, we could have a constant facet that simply says, "this is the value you must pass"

Current workaround:

required value with an enum that has only one value in it.

rspremulli-sf avatar Jul 03 '21 20:07 rspremulli-sf