Page History
Info | ||||
---|---|---|---|---|
| ||||
The Domain schema editor can be used to define the structure of REST requests and responses, or to add a mapping from your application domain |
Table of contents
Table of Contents |
---|
The domain schema is a contract of communication. The purpose of the domain schema is to define what items are needed in a message and to specify its elements. For example the representation of a person. In this case the persons first name (1), always followed by his last name and his job(s). The right column represents the application domain, where the left column represents the domain schema of the message.
You start with an entity (2) that represents the begin and the end of the message. For every attribute/relation(3) you can select a name (43), what datatype (54) it is, if it is required (65) to be part of the message, if it is multivalued (6), add a validation (7), and any additional documentation (8) that will be part of the Swagger feed. It is also possible to add validation rules on the value (9).
Info |
---|
|
Hide root element
To define an unnamed array the 'Hide root element' checkbox corresponding to the domain schema root element must be ticked.
...
Code Block |
---|
[ { "John", 23 }, { "Rick", 30 }, { "Paul", 27 } ] |
When making use of unnamed arrays, only one child (relation or attribute) can follow the root element.
Domain Schema in another Domain Schema
If parts of the domain schema are being reused, or the size of the domain schema is getting too large to understand and/or maintain, it may be a good choice to cut up the large domain schema and use the sub domain schema's in the main domain schema.
Applying a sub-domain schema is only possible if one of the following appliesrules apply:
- a sub-domain schema can be added under the root entity or under a relation,
- the root entity of the sub-domain schema should be the target entity of the selected relation,
- the root entity of the sub-domain schema should have as base entity the target entity of the selected relation,
- adding a sub-schema which has root element hidden will trigger a validation message.
...