How do I describe a calculated default value with RAML?

449 Views Asked by At

If I'm describing an API in RAML and I have a request object schema that has a property with a default value that is calculated (rather than explicitly set), how would I describe that?

For instance, let's say I have an integer value whose default value is the current UTC time in epoch format, how would I describe that?

1

There are 1 best solutions below

2
On

The default keyword is used to specify default values. But there is no way to say that it is a calculated value, other than stating it in the description.

foo:
    description: This value is calculated somehow
    type:        integer
    minimum:     10
    maximum:     200
    default:     30
    example:     50