📋Project configuration
Each project created or edited through the CLI is configured using a JSON file which defines your project's configuration. This is a complete reference of the available properties.
Project object
Property name | Type | Description |
---|---|---|
name |
| The name of your project. This can be changed later |
models |
| An object whose keys are the name of a model, and the value is a model object. |
api | The configuration of your API. |
Model object
Property name | Type | Description |
---|---|---|
primary_key |
| The name of your primary key. This must match the name of one of your properties. To use a composite index, pass an array. Primary key must always be non-nullable. |
properties | An object whose keys are the name of a property, and the value is a property object. |
Property object
Property name | Type | Description |
---|---|---|
type |
| The type of your property. If it set to |
nullable |
| Indicates whether the property is nullable in the database or not. If not specified, the default value is |
readonly |
| A readonly property will never be able to be set by the client, on create or update operations. |
unique |
| Indicates that the associated value can only exist once in the database. |
reference |
| A reference to an existing property. It must only be used if |
items | Must only be used if |
API object
Property name | Type | Description |
---|---|---|
info | A description of your API. | |
paths | An object whose keys are paths (eg. |
Info object
Property name | Type | Description |
---|---|---|
title |
| The name of your API |
description |
| A short description of your API |
version |
| A semver-compatible version (eg. |
Path object
Property name | Type | Description |
---|---|---|
methods | An object whose keys are HTTP verbs such as | |
parameters | An array of parameter objects. | |
paths |
| An object whose keys are paths (eg. |
Parameters defined at the path level apply to all its methods, but also its subpath methods. If you only wish to define a parameter for a single method, define the parameter at the method level.
Method object
Property name | Type | Description |
---|---|---|
operationId |
| A unique identifier for your endpoint |
description |
| A short description of what your endpoint does |
parameters | An array of parameter objects. | |
body | A property describing the body of the HTTP request. It must only be used on | |
responses | An object whose keys are HTTP status codes as strings, and whose values are property objects. Response objects must include a |
Parameter object
Property name | Type | Description |
---|---|---|
name |
| The name of your parameter. The couple ( |
description |
| A description of what your parameter does. |
in |
| Defines where to expect the parameter, either in path or query. If it set to |
required |
| Makes the parameter mandatory. It can only be used for |
Last updated