Skip to content

Instantly share code, notes, and snippets.

@bendavies
Last active December 31, 2015 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bendavies/8004361 to your computer and use it in GitHub Desktop.
Save bendavies/8004361 to your computer and use it in GitHub Desktop.
{
"operations": {
"GetMessages": {
"httpMethod": "GET",
"uri": "/messages",
"summary": "Gets a list of messages",
"responseClass": "GetMessagesOutput"
},
"GetMessage": {
"httpMethod": "GET",
"uri": "/messages/{id}",
"summary": "Retrieves a single message",
"responseClass": "GetMessageOutput",
"parameters": {
"id": {
"location": "uri",
"description": "Message to retrieve by ID",
"required": true
}
}
}
},
"models": {
"Message": {
"type": "object",
"properties": {
"id": {
"location": "json",
"type": "integer"
},
"subject": {
"location": "json",
"type": "string"
},
"text": {
"location": "json",
"type": "string"
}
}
},
"GetMessagesOutput": {
"type": "object",
"additionalProperties": {
"location": "json",
"type": "object",
"properties": {
"id": {
"location": "json",
"type": "integer"
},
"subject": {
"location": "json",
"type": "string"
},
"text": {
"location": "json",
"type": "string"
}
}
}
},
"GetMessageOutput": {
"$ref": "Message"
}
}
}
{
"operations": {
"GetMessages": {
"httpMethod": "GET",
"uri": "/messages",
"summary": "Gets a list of messages",
"responseClass": "GetMessagesOutput"
},
"GetMessage": {
"httpMethod": "GET",
"uri": "/messages/{id}",
"summary": "Retrieves a single message",
"responseClass": "GetMessageOutput",
"parameters": {
"id": {
"location": "uri",
"description": "Message to retrieve by ID",
"required": true
}
}
}
},
"models": {
"Message": {
"type": "object",
"properties": {
"id": {
"location": "json",
"type": "integer"
},
"subject": {
"location": "json",
"type": "string"
},
"text": {
"location": "json",
"type": "string"
}
}
},
"GetMessagesOutput": {
"type": "object",
"additionalProperties": {
"location": "json",
"$ref": "Message"
}
},
"GetMessageOutput": {
"$ref": "Message"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment