| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- {
- "definitions": {
- "ExampleDefinition": {
- "properties": {
- "status": {
- "default": "available",
- "description": "The status of a product",
- "enum": [
- "available",
- "discontinued"
- ],
- "type": "string"
- }
- }
- },
- "Product": {
- "properties": {
- "id": {
- "description": "",
- "format": "int64",
- "type": "integer"
- },
- "status": {
- "description": "",
- "format": "boolean",
- "type": "boolean"
- }
- }
- }
- },
- "info": {
- "title": "Example of using references in swagger-php",
- "version": "1.0.0"
- },
- "paths": {
- "/api/path": {
- "post": {
- "parameters": [
- {
- "in": "body",
- "name": "body",
- "required": true,
- "schema": {
- "properties": {
- "description": {
- "type": "string"
- },
- "name": {
- "maximum": 64,
- "type": "string"
- }
- }
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Example extended response",
- "schema": {
- "properties": {
- "data": {
- "$ref": "#/definitions/Product"
- },
- "errors": {
- "type": "object"
- },
- "status": {
- "default": "available",
- "description": "The status of a product",
- "enum": [
- "available",
- "discontinued"
- ],
- "type": "string"
- },
- "success": {
- "type": "boolean"
- },
- "token": {
- "type": "string"
- }
- }
- }
- }
- },
- "security": [
- {
- "Bearer": []
- }
- ],
- "summary": "Post to URL"
- }
- }
- },
- "responses": {
- "Json": {
- "description": "the basic response",
- "schema": {
- "properties": {
- "data": {},
- "errors": {
- "type": "object"
- },
- "status": {
- "default": "available",
- "description": "The status of a product",
- "enum": [
- "available",
- "discontinued"
- ],
- "type": "string"
- },
- "success": {
- "type": "boolean"
- },
- "token": {
- "type": "string"
- }
- }
- }
- }
- },
- "swagger": "2.0"
- }
|