Closed VasiliyLysokobylko closed 8 years ago
The spec currently states:
The definitions of resource types and traits MAY contain parameters, whose values MUST be specified when applying the resource type or trait ...
This means that Resource Type parameters are currently mandatory, even if they're not being used. Given a snippet like this:
# ... resourceTypes: - Resource: get: description: Get one <<ResourceName>> record. patch?: description: Some info about <<TextAboutPatch>>. # ...
In the case of a resource with no patch support, I still have to provide a blank TextAboutPatch property:
patch
TextAboutPatch
/MyThing type: Resource: ResourceName: MyThing TextAboutPatch: get: description: Override the default Resource description here.
It would be nice if the spec would allow for parameters to be optional if their corresponding resource type properties are unused for the given resource.
https://github.com/raml-org/raml-spec/issues/143
Implemented
The spec currently states:
The definitions of resource types and traits MAY contain parameters, whose values MUST be specified when applying the resource type or trait ...
This means that Resource Type parameters are currently mandatory, even if they're not being used. Given a snippet like this:
In the case of a resource with no
patch
support, I still have to provide a blankTextAboutPatch
property:It would be nice if the spec would allow for parameters to be optional if their corresponding resource type properties are unused for the given resource.