Skip to content

Instantly share code, notes, and snippets.

@DavidBiesack
Last active November 23, 2015 20:38
Show Gist options
  • Save DavidBiesack/9cda3bb134216b4b0530 to your computer and use it in GitHub Desktop.
Save DavidBiesack/9cda3bb134216b4b0530 to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info":
{
"version": "1.0.0",
"title": "Ref Demo",
"description": "This demonstrates references to parameter that have references to definitions do not display properly in the swagger UI."
},
"parameters":
{
"ObjectParm":
{
"name": "object information",
"in": "body",
"description": "The object's information",
"required": true,
"schema": { "$ref": "#/definitions/Object" }
}
},
"paths":
{
"/parms":
{
"post":
{
"summary": "Create the object",
"description": "Create a new object",
"parameters":
[
{ "$ref": "#/parameters/ObjectParm" }
],
"responses":
{
"201":
{
"description": "Created",
"schema": { "$ref": "#/definitions/Object" }
},
"400": { "description": "Bad request"},
"401": { "description": "Not authenticated" },
"403": { "description": "Forbidden - the user does not have permission to complete this request" }
}
}
}
},
"definitions":
{
"Object":
{
"properties":
{
"name":
{
"type": "string",
"description": "localizable server name"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment