This document explains the various API models, retrieved from Swagger's API docs.
To view the Swagger docs yourself, see the Readme.
The largest API with the most amount of data provided.
A recipe is comprised up of some top level metadata about the recipe, and a list of ingredients.
This data structure is created from the Recipe API provided by the MealDB. Items are renamed, reorganized, and regrouped to make a fluid and well structured recipe object that allows for easy iteration within the Angular front end application.
Recipe {
category: string
id: integer
ingredient: [Ingredient{...}]
instructions: [string]
locale: string
name: string
source: string
tags: [string]
thumbnail: string
video: string
}
A supporting object of a recipe that contains the ingredient information.
Ingredient {
amount: string
name: string
}
A simple API responsible for linking and tracking user ids with recipe ids.
A Cookbook is nothing more than a record of the user id (cookbook owner) and a list of recipe ids that they have added to their cookbook. As this application grows, we can track more metadata about a recipe with a user by simply providing a complex object in the recipes object to contain things like user rating, notes, etc.
Cookbook {
recipes: [string]
userId: string
}
An API responsible for logging a user in and maintaining their session.
This object comes from the Okta authentication module, and contains enough information for us to verify a user is logged in,
and to track them in the system. The idToken
and accessToken
are both Okta provided JWTs.
Login {
authenticated: boolean
idToken: string
accessToken: string
}
The User object is our view of the current user. We create it by deserializing the Okta token in order to create or log in a user to the system.
User {
email: string
lastLogin: string($date-time)
name: string
userId: string
username: string
}