Open RaySinnema opened 9 years ago
It's useful but also brings the further complexity for RADL creators. Per my experience, REST client developers tend to read representation samples (e.g. for HAL) to construct the REST requests. What are the use cases that tools need to work with these samples directly?
As I wrote above,
these structured examples could be used to generate a skeleton server or a test client.
Furthermore, structured examples can help with #4. Finally, with a generated server and test client, we can also record the examples as they appear in representations.
We have examples now in
<representation>
, but that is just unstructured text. For the structured data in a<property-group>
that doesn't work very well. We want tools to be able to understand the structure of the example and work with that. For instance, these structured examples could be used to generate a skeleton server or a test client.Here's one possible approach:
There are some complexities because of repeats, references and nesting.
Here's how we could handle repeats and references:
Here's how we could handle nesting: