Skip to content

Instantly share code, notes, and snippets.

@ponelat
Last active August 29, 2015 14:19
Show Gist options
  • Save ponelat/1e120f98e67e345f476e to your computer and use it in GitHub Desktop.
Save ponelat/1e120f98e67e345f476e to your computer and use it in GitHub Desktop.
Simple,complete spec relating to swagger-ui#1133
{
"swagger": "2.0",
"host": "petstore.swagger.wordnik.com",
"info": {
"title": "Test Spec",
"version": "1.0.0"
},
"paths": {
"/road": {
"get": {
"parameters": [
{
"in": "body",
"name": "josh",
"schema": {
"properties": {
"Favorite": {
"type": "boolean"
}
},
"type": "object"
}
}
],
"responses": {
"200": {
"description": "Successful response"
}
},
"summary": "Something cool"
}
}
}
}
{
"swagger": "2.0",
"host": "petstore.swagger.wordnik.com",
"info": {
"title": "Test Spec",
"version": "1.0.0"
},
"paths": {
"/road": {
"get": {
"parameters": [
{
"in": "body",
"name": "josh",
"schema": {
"properties": {
"Favorite": {
"type": "boolean"
}
},
"type": "object"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"schema": {
"properties": {
"Favorite": {
"type": "boolean"
}
},
"type": "object"
}
}
},
"summary": "Something cool"
}
}
}
}
@webron
Copy link

webron commented Apr 17, 2015

Try this:

{
  "swagger": "2.0",
  "host": "petstore.swagger.wordnik.com",
  "info": {
      "title": "Test Spec",
      "version": "1.0.0"
  },
  "paths": {
      "/road": {
          "get": {
              "parameters": [
                  {
                      "in": "body",
                      "name": "josh",
                      "schema": {
                        "properties": {
                            "Favorite": {
                                "type": "boolean"
                            }
                        },
                        "type": "object"
                      }
                  }
              ],
              "responses": {
                  "200": {
                      "description": "Successful response",
                       "schema": {
                        "properties": {
                            "Favorite": {
                                "type": "boolean"
                            }
                        },
                        "type": "object"
                      }
                  }
              },
              "summary": "Something cool"
          }
      }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment