Skip to content
Jack Stenglein edited this page May 27, 2018 · 5 revisions

User

The User model represents an end user of rest-api-creator. The User model has the following attributes:

  • username (string, required, unique)
  • password (string, required)
  • projects ([Project], required) — A one-to-many relationship with the Project model. A User can have many Projects, while a Project can have only one User. Connected through owner field on Project.

Project

The Project model represents a REST API that an end user might create. The Project model has the following attributes:

  • name (string, required)
  • owner (User, required)
  • language (enum, required) — The language the REST API is written in.
  • objects ([Object], required) — A one-to-many relationship with the Object model. A Project can have many Objects, while an Object can have only one Project.
  • routes ([Route], required) — A one-to-many relationship with the Route model. A Project can have many Routes, while a Route can have only one Project.

Object

The Object model represents a model that would be acted on by the end user's REST API. The Object model has the following attributes:

  • project (Project, required) — The owning Project of the Object instance
  • name (string, required)
  • attributes ([Attribute], required) — A one-to-many relationship with the Attribute model. An Object can have many Attributes, while an Attribute can have only one Object.

Attribute

The Attribute model represents specific attributes of an Object. The Attribute model has the following attributes:

  • object (Object, required) — The owning Object of the Attribute instance
  • name (string, required)
  • type (enum, required) — Represents the data type of the attribute (string, int, boolean, etc.)
  • required (boolean, required) — Whether or not the attribute is required when creating a new instance of the Object

Route

Coming soon.

Clone this wiki locally