mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
95 lines
1.8 KiB
JSON
95 lines
1.8 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "Sample API",
|
|
"description": "API description in Markdown.",
|
|
"version": "1.0.0"
|
|
},
|
|
"host": "api.example.com",
|
|
"basePath": "/v1",
|
|
"schemes": [
|
|
"https"
|
|
],
|
|
"paths": {
|
|
"/pets": null,
|
|
"get": {
|
|
"description": "Returns all pets from the system that the user has access to",
|
|
"operationId": "findPets",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/parameters/Parameter1"
|
|
},
|
|
{
|
|
"$ref": "#/parameters/Parameter2"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "pet response",
|
|
"schema": {
|
|
"$ref": "#/definitions/Pet"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"Pet": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
},
|
|
"Color": {
|
|
"$ref": "#/definitions/~1pet.yaml%23~1Color"
|
|
}
|
|
}
|
|
},
|
|
"/pet.yaml#/Color": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"uses": {
|
|
"type": "string"
|
|
},
|
|
"color": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": {
|
|
"Parameter1": {
|
|
"name": "tags",
|
|
"in": "query",
|
|
"description": "tags to filter by",
|
|
"required": false,
|
|
"type": "array",
|
|
"collectionFormat": "csv",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Parameter2": {
|
|
"name": "limit",
|
|
"in": "query",
|
|
"description": "maximum number of results to return",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
} |