Skip to content

Instantly share code, notes, and snippets.

View jvarness's full-sized avatar

Jake Varness jvarness

View GitHub Profile
{
"swagger": "2.0",
"info": {
"description": "The RESTful endpoints for the Foo Service.",
"version": "1.0.0",
"title": "Foo REST",
"contact": {
"name": "Jake Varness",
"email": "jake.varness@gmail.com"
}
function validate(api) {
const schema = Joi.object({
paths: Joi.object().pattern(
/.+/i,
Joi.object().pattern(
/.+/i,
Joi.object({
parameters: Joi.array().items(
Joi.object({
in: Joi.string().valid('header').required(),