Data Field Types
Here you'll find a list of all available data types for use in the inputs and output schemas.
If you are familiar with the JSON schema format this will look very familiar.
All fields have the same fundamental structure:
anyField:
title: A human readable name #A friendly name for the user - required
type: string #The type goes here - required
sortOrder: 1 #The sort order of the fields - not required
Primitive Types
Primitive types are all types available in JSON normally:
- string
- number
- boolean
Which all have the same structure as seen below:
stringField:
title: A string field
type: string
sortOrder: 1
numberField:
title: A number field
type: string
sortOrder: 2
booleanField:
title: A boolean field
type: boolean
sortOrder: 3
Complex Types (Objects and Arrays)
Complex types are types that consists of other types.
- object
- array
Objects are defined similar to how JSON Schema defines them:
objectField:
title: A object field
type: object
sortOrder: 1
properties: #For objects with no fixed or known type simply skip defining properties
mySubField:
type: string
title: This is a field belonging to the object
Arrays are also defined similar to how JSON Schema defines them:
arrayField:
title: A object field
type: array
sortOrder: 1
items: #This has a schema identical to fields
type: string #Could also be object
Or you can combine them:
arrayField:
title: A object field
type: object
sortOrder: 1
items:
type: object
properties:
mySubField:
type: string
title: This is a field belonging to the object
File or Image
Lastly Dexi also supports files and/or image types for transferring binary contents
- file
- image
The structure of these are quite similar to the primitive types
fileField:
title: A file field
type: file
sortOrder: 1
imageField:
title: An image field
type: image
sortOrder: 2
Note: when receiving files you will be receiving a so-called "Dexi File Pointer" - which contains a small piece of meta information about the file - not the file itself.
You can read more about file pointers here here.
Updated almost 5 years ago