This article is outdated. Please click here to see the newer version.
A model is a representation of a complex type used in an API. All complex types used for API requests and responses must be described in the API either through the import procedure or using the API specification UI. Further information about the specification UI is presented as follows.
Model Settings
Model settings contain the basic information about a complex type i.e., its name and base type.
Element |
Description |
||||
---|---|---|---|---|---|
Name | Name of the Model. This is a unique identifier of a complex type. | ||||
Description | General description of the Model e.g., comments, notes or remarks about this Model. | ||||
Base Model | The base model is used for inheritance of the field members of the complex type. All models defined in the API are listed here automatically for selection. | ||||
Model Type | Describes the nature of the implementation of the complex type e.g., the following.
|
Fields
A model consists of one or more fields representing either the data-element or an enumeration value.
Element |
Description |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Field Name | Name of the field. This is a unique identifier of a complex type member. | ||||||||||||
Description | General description of the field e.g., comments, notes or remarks about this Model. | ||||||||||||
Default Value | This is the default value of the field and is used for member initialization. The format of the value must match the type of the field e.g., a boolean parameter must have either True or False as the default value. | ||||||||||||
Type | This is the type of the field, which can be a primitive or a complex type.
|
||||||||||||
Is Array | This flag indicates whether the field is an array or a collection. When set, code generation creates appropriate collection structure, e.g. List or NSMutableArray*. | ||||||||||||
Is Map | This flag indicates whether the field is a dictionary. When set, the generated field will be a dictionary with keys that are strings, e.g. Dictionary<String, type> or NSDictionary | ||||||||||||
Is ReadOnly | This flag indicates whether the property should be read only in the generated model. When set, the generated code will have a public getter but no public setter for this property. |
Comments
0 comments
Please sign in to leave a comment.