Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const t = require('koa-joi-router').Joi;
const Order = t.object().label('Order').keys({
id: t.number(),
petId: t.number(),
quantity: t.number(),
shipDate: t.date(),
status: t.string().valid(['placed', 'approved', 'delivered']),
complete: t.boolean()
});
const Quantity = t.number().integer().label('Quantity');
const storeInventory = {
method: 'get',
path: '/inventory',
meta: {
friendlyName: 'Store inventory',
description: 'Returns pet inventories by status',
extendedDescription: `
**Implementation notes**
* Returns a map of status codes to quantities
`
},
validate: {