Difference between revisions of "Swagger"

From air
Jump to navigation Jump to search
Line 33: Line 33:
   
 
http://editor.swagger.io
 
http://editor.swagger.io
  +
  +
[[VT2016 Swagger]]

Revision as of 11:12, 25 October 2016

http://swagger.io/specification/

What is Swagger? The goal of Swagger™ is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined via Swagger, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, Swagger removes the guesswork in calling the service.


{
  "/pets": {
    "get": {
      "description": "Returns all pets from the system that the user has access to",
      "produces": [
        "application/json"
      ],
      "responses": {
        "200": {
          "description": "A list of pets.",
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/pet"
            }
          }
        }
      }
    }
  }
}

Editeur Swagger

http://editor.swagger.io

VT2016 Swagger