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

date/time types need support for a sysdate or now default value.

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

A common use case for dates on a property is to default them to whatever the current date is. A classic example of this is a property representing the creation datetime of an object. It would be defaulted to whatever the current datetime is on the system for auditing purposes. There is no way to define such a default value today however, there is no keyword that is valid for the default value facet; only a datetime is legal.

Expectation: support similar functionality to the below:

SampleType:
  properties:
    creationDate?:
      type:datetime-only
      default: now

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