Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions fern/products/fern-def/pages/types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,24 @@ Types describe the data model of your API.

## Built-in types

- `string`
- `integer`
- `long`
- `double`
- `boolean`
- `datetime` _An [RFC 3339, section 5.6 datetime](https://ijmacd.github.io/rfc3339-iso8601/). For example, `2017-07-21T17:32:28Z`._
- `date` _An RFC 3339, section 5.6 date (YYYY-MM-DD). For example, `2017-07-21`._
- `uuid`
- `base64`
- `list` _e.g., list\<string\>_
- `set` _e.g., set\<string\>_
- `map` _e.g., map\<string, integer\>_
- `optional` _e.g., optional\<string\>_
- `literal` _e.g., literal\<"Plants"\>_
- `file` _e.g., [file uploads](/learn/api-definition/fern/endpoints/multipart)_
- `unknown` _Represents arbitrary JSON._
| Type | Description |
|------|-------------|
| `string` | Basic string type |
| `integer` | Integer number type |
| `long` | Long integer type |
| `double` | Double precision floating point |
| `boolean` | Boolean true/false |
| `datetime` | An [RFC 3339, section 5.6 datetime](https://ijmacd.github.io/rfc3339-iso8601/). For example, `2017-07-21T17:32:28Z` |
| `date` | An RFC 3339, section 5.6 date (YYYY-MM-DD). For example, `2017-07-21` |
| `uuid` | UUID identifier |
| `base64` | Base64 encoded data |
| `list` | An ordered collection that allows duplicates, e.g., `list<string>` |
| `set` | An unordered collection with unique elements, e.g., `set<string>` |
| `map` | Key-value mapping, e.g., `map<string, integer>` |
| `optional` | Optional value, e.g., `optional<string>` |
| `literal` | Literal value, e.g., `literal<"Plants">` |
| `file` | File upload type, e.g., [file uploads](/learn/api-definition/fern/endpoints/multipart) |
| `unknown` | Represents arbitrary JSON |

## Custom types

Expand Down Expand Up @@ -276,4 +278,4 @@ interface Person {
age: number;
}
```
</CodeBlock>
</CodeBlock>