In a Mule project we have a bunch of resources that support GET (Retreive), PUT (update) and POST (Create) operations. For the PUT and POST operations the resource properties have differing needs for required fields. Usually there are a bunch of fields that are required during a create that then become optional during an update. For a GET, you’re not so much showing the required nature as the data is coming from the server as you are showing the schema of the returned data.
How do you handle this requirement in RAML 1.0? Currently we are having to essentially create three data types for each resource - a base xxxxGet that has all fields, an xxxxCreate that has some required fields, and an xxxxUpdate that has pretty much all optional fields (but may only be a sub-set of the get if not everything can be updated).
Am I missing something in the RAML specification that would handle this more cleanly? Thanks in advance for any advice.