Files
fastapi-openapi-to-postman/test/data/toBundleExamples/swagger20/multipleRefFromRootComponents/bundleExpected.json
Erik Mendoza b227ed326c Fixing properties resolving
Properties should be resolved as independant schema not always inline
2022-06-06 19:29:42 -05:00

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"
}
}
}