Random API response generator
npm i
npm start
rando-api has all the necessary pieces to be deployed to Heroku and shouldn't need any configuration to do so.
The API provides four endpoints:
Responds with "OK" if the API is running.
Responds with a relatively-predictable JSON payload.
- Has a root
products
array products
array has between 1 and 10 objects.- Every object has the same property keys:
name
Stringorigin
Stringprice
Numberquantity
NumberinStock
BooleanavailableColors
Array
- Every object property value is randomized. Strings are unique among the other response members.
Responds with an unpredictable JSON payload.
- Has a root
products
array products
array has between 1 and 10 objects.- Every object has at least some, but not necessarily all of the following property keys:
name
Stringorigin
Stringprice
Numberquantity
NumberinStock
BooleanavailableColors
Array
- Every object property value is randomized. Strings are unique among the other response members.
Responds with an unpredictable, nested JSON payload.
- Has a root
products
array products
array has between 1 and 10 objects.- Every object has at least some, but not necessarily all of the following property keys:
name
Stringorigin
Stringprice
Numberquantity
NumberinStock
BooleanavailableColors
Array
- Every object may or may not have a
relatedProducts
array, which mimics the rootproducts
array in all ways. - Every object in a
relatedProducts
array may or may not itself have arelatedProducts
array.- The rabbit hole doesn't go further than that. Maximum three total levels.
- Every object property value is randomized. Strings are unique among the other response members at the same nesting level.
npm test