Making properties writeable at creation only
A "writeable only at creation" property is a property whose value can only be specified in a POST and not in any PATCH. This is used for fields that, once set, cannot be modified.
To specify a property is writeable only at creation, set the
x-gw-extensions
object's create-only
property to
true:
"x-gw-extensions": {
"create-only": true
}
For example, suppose the CustomEntity_Ext
entity has an
ExpirationDate
field. This field can be set on a POST, but not in
any PATCH. The property declaration would be:
"definitions": {
"CustomEntityExt": {
...
"properties": {
...
"expirationDate": {
"x-gw-extensions": {
"create-only": true
}
}
}
}
}