API Schemas
A schema represents a data type that can be used by other components. Schemas can be of primitive or complex type.
Create a schema
You can create a new (reusable) schema by using the Create capability on the Schemastab of the Overview page.
You must provide the following information for every schema:
Property | Description |
Type |
Defines the type of the schema to be created. This field is mandatory |
Local Identifier |
Identifier of the schema. This value must be unique within the namespace and cannot be changed afterwards. Please note, that only the characters A-z (without special characters), digits and the special character "_" are permitted for naming fields! Furthermore, identifiers may not begin with a digit. This field is mandatory |
Title |
Title of the schema This field is optional |
Description | Description of the schema. This field is optional |
The following types are available:
Name | Type | Remark |
String | Primitive | Text field for short, unformatted texts. While creating, it is also possible to set enumeration elements |
Boolean | Primitive | Type definition for truth values with the "true" or "false" property. |
Number | Primitive | Allows you to save a number with decimal places. While creating, it is also possible to set enumeration elements |
Integer | Primitive | Allows you to save a number without decimal places. While creating, it is also possible to set enumeration elements |
Object | Complex | Allows you to create an object with more than one properties that are all of different types. |
Array | Complex | Allows you to create an array of items of an existing or new schema. |
OneOf | Complex | Allows you to create a type that could take the form of exactly one schema out of a list of predefined subschemas. |
Defining a type specific behavior
While creating a schema you can define additional propertys based on the type of the schema:
Boolean, Object
No specific information.
String
Format | Selection List | date, date-time, email, password, url |
Pattern | String | This pattern is used for validation within any modifying action by defining a regular expression. |
Min. length
|
Integer | |
Max. length | Integer |
Number
Format | Selection List | double, float |
Min. value
|
Number | Defines the smallest valid value (minimum value) for a numeric property. |
Max. value | Number |
Defines the largest valid value (maximum value) for a numeric property. If filled, it must be bigger or equal than the min. value |
Integer
Format | Selection List | int32, int64 |
Min. value
|
Number | Defines the smallest valid value (minimum value) for a numeric property. |
Max. value | Number |
Defines the largest valid value (maximum value) for a numeric property. If filled, it must be bigger or equal than the min. value |
Array
Array items | Selection List |
Shows a list of all existing (reuseable) schemas that can be used as items in that array schema. This information is mandatory. |
OneOf
OneOfSchemas | List |
Define a list of subschemas Minimum one object schemas has to be chosen. This information is mandatory. |
Discriminator |
Discriminators are property names used to distinguish between the subscemas of the oneOf schema. When defining a property name as discriminator, this property will be automatically generated. The discriminator name must be unique within an object. The discriminator value is always set automatically to refer to the corresponding schema type. The discriminator hast to start with a lower case letter and can contain letters, numbers or underscores. This information is mandatory. |
Edit a schema
All types of (reuseable) schemas can be edited either via the inline Edit capability in the Schema tab's Overview page or by using the inline Information capability and navigating to the Master Data section and using the Edit Master Data capability.
Within these actions you can adjust all schema specific properties (see chapter before) exept the type of a schema and its local identifier.
For some schema types there are additional information to maintain described as the following:
Managing a String schema
You can add enumeration elements to string by using the inline Information capability and navigating to the Enumeration Elements section and using the Add capability. The only property needed to add an enumeration element is the key of the new enumeration element.
You can remove an enumeration element by using the inline or overhead Remove capability.
Managing an Object schema
Properties can be added, edited and removed only in object schemas.
There are two options when adding a property: add inline or add referenced properties. To add a new property use the Add capability.
Inline are the properties that are created from scratch with a new schema definition that has not been created before. After the creation of an inline property, the newly created schema will not be reusable.
Inline properties are defined using the following master data:
Property | Description |
Name |
This is the name of the inline property. It is unique within a namespace. Please note, that only the characters A-z (without special characters), digits and the special character "_" are permitted for naming inline entities! Furthermore, names may not begin with a digit and the first character must be lowecase. The identifier can not be changed after creation. This field is mandatory. |
Property Type |
This is the schema type of the property that is being created. It can either be a primitive type schema or it can reference a schema that was previously created.
This field is mandatory. |
Required | This is a Boolean. If it is checked, then the property is required, otherwise it is optional. |
The rest of the properties depend on the type of the chosen schema.
Referenced properties contain schema types that have already been created and can be found in the schema overview page.
Property | Description |
Name |
This is the name of the referenced property. It is unique within a namespace. Please note, that only the characters A-z (without special characters), digits and the special character "_" are permitted for naming referenced properties! Furthermore, names may not begin with a digit and the first character must be upercase. The identifier can not be changed after creation. This field is mandatory. |
Schema |
This is a list of the schema types that have already been created. the one chosen will be the schema type of the property that s being created.
This field is mandatory. |
Required | This is a Boolean. If it is checked then the property is required, otherwise it is optional. |
You can add a new or an already created (referenced) property by using the Add capability. For referenced properties it is only possible to edit the Required flag and set the name of the added property.
It is possible to import properties from the domain layer by using the Import capability. You can select one or more properties of any entity in the domain layer and rename them accordingly.
Mapping rules when importing properties:
Domain Namespace Property | Is a List | Property to create | Schema ype |
Reference | false | referenced schema property | mapped to an existing or new reusable schema |
Reference | true | inline property of type array | mapped to an existing or new reusable array of object schema |
External Reference | false | referenced schema property | mapped to an existing or new reusable schema |
External Reference | true | inline property of type array | mapped to an existing or new reusable array of object schema |
Local Entity | false | referenced schema property | mapped to an existing or new reusable object schema |
Local Entity | true | inline property of type array | mapped to an existing or new reusable array of objects schema |
Currency | - | referenced schema property | mapped to an existing or new reusable schema |
GeoPoint | - | referenced schema property | mapped to an existing or new reusable schema |
Text | - | inline property | primitive type String |
Text/Email | - | inline property | primitive type String |
Text/URL | - | inline property | primitive type String |
Boolean | - | inline property | primitive type Boolean |
Date | - | inline property | primitive type String |
Timestamp | - | inline property | primitive type String |
Selection Element | - | inline property | primitive type String |
Localized Text | - | referenced schema property | mapped to an existing or new reusable schema |
Decimal | - | inline property | primitive type Number |
Integer | - | inline property | primitive type Integer |
Managing an oneOf schema
By using the Add Schema capability you can add one or more schemas from the schema components list. You can also remove a schema by using the Remove capability.
Delete a schema
You can delete the schema by using the inline Delete capability or by using it within the Details view. Alternativerly, you can use the Information capabilityto access the Details view and there you can use the Delete capability.
You will need to confirm the action before the selected schema is permanetely deleted.