Created
July 8, 2012 17:31
-
-
Save zircote/3071937 to your computer and use it in GitHub Desktop.
Swagger-PHP example output from tests/fixtures/*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./bin/swagger -p tests/fixtures/ -f | |
/usr/local/zend/apache2/htdocs/Swagger-PHP/resources.json created | |
/usr/local/zend/apache2/htdocs/Swagger-PHP//leadresponder.json created | |
$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apis":[ | |
{ | |
"operations":[ | |
{ | |
"tags":[ | |
"MLR" | |
], | |
"errorResponses":[ | |
{ | |
"code":"403", | |
"reason":"User Not Authorized" | |
} | |
], | |
"parameters":[ | |
], | |
"httpMethod":"GET", | |
"responseClass":"List[leadresonder_route]", | |
"summary":"Fetches the leadresponder corresponding the the provided ID", | |
"responseTypeInternal":"Model_LeadResponder_RouteCollection" | |
}, | |
{ | |
"tags":[ | |
"MLR" | |
], | |
"errorResponses":[ | |
{ | |
"code":"403", | |
"reason":"User Not Authorized" | |
} | |
], | |
"parameters":[ | |
{ | |
"description":"leadresponder_route being created", | |
"required":"true", | |
"allowMultiple":"false", | |
"dataType":"leadresponder_route", | |
"name":"leadresponder_route", | |
"paramType":"body" | |
} | |
], | |
"httpMethod":"POST", | |
"responseClass":"leadresonder_route", | |
"summary":"Creates a new leadresponder", | |
"responseTypeInternal":"Model_LeadResponder_Route" | |
} | |
], | |
"path":"/leadresponder" | |
}, | |
{ | |
"operations":[ | |
{ | |
"tags":[ | |
"MLR" | |
], | |
"errorResponses":[ | |
{ | |
"code":"400", | |
"reason":"Invalid ID Provided" | |
}, | |
{ | |
"code":"403", | |
"reason":"User Not Authorized" | |
}, | |
{ | |
"code":"404", | |
"reason":"Lead Responder Not Found" | |
} | |
], | |
"parameters":[ | |
{ | |
"description":"ID of the leadresponder being requested", | |
"required":"true", | |
"allowMultiple":"false", | |
"dataType":"integer", | |
"name":"leadresponder_id", | |
"paramType":"path" | |
}, | |
{ | |
"description":"leadresponder_route being updated", | |
"required":"true", | |
"allowMultiple":"false", | |
"dataType":"leadresponder_route", | |
"name":"leadresponder_route", | |
"paramType":"body" | |
} | |
], | |
"httpMethod":"PUT", | |
"path":"/{leadresponder_id}", | |
"responseClass":"leadresonder_route", | |
"summary":"Updates the existing leadresponder designated by the {leadresponder_id}", | |
"responseTypeInternal":"Model_LeadResponder_Route" | |
} | |
], | |
"path":"/leadresponder/{leadresponder_id}" | |
} | |
], | |
"basePath":"http://org.local/v1", | |
"swaggerVersion":"1.0", | |
"apiVersion":"1", | |
"path":"/leadresponder", | |
"value":"Gets collection of leadresponders", | |
"description":"This is a long description of what it does", | |
"produces":[ | |
"application/json", | |
"application/json+hal", | |
"application/json-p", | |
"application/json-p+hal", | |
"application/xml", | |
"application/xml", | |
"application/xml+hal" | |
], | |
"models":{ | |
"leadresonder_route":{ | |
"id":"leadresonder_route", | |
"description":"some long description of the model", | |
"properties":{ | |
"usr_mlr_route_id":{ | |
"type":"integer", | |
"description":"some long winded description." | |
}, | |
"route":{ | |
"type":"string", | |
"description":"some long description of the model." | |
}, | |
"createdDate":{ | |
"type":"string", | |
"description":"" | |
}, | |
"tags":{ | |
"type":"array", | |
"description":"this is a reference to `tag`", | |
"items":{ | |
"$ref":"tag" | |
} | |
}, | |
"arrayItem":{ | |
"type":"array", | |
"description":"This is an array of strings", | |
"items":{ | |
"type":"string" | |
} | |
}, | |
"refArr":{ | |
"type":"array", | |
"description":"This is an array of integers.", | |
"items":{ | |
"type":"integer" | |
} | |
}, | |
"enumVal":{ | |
"type":"string", | |
"description":"This is an enum value.", | |
"enum":[ | |
"Two Pigs", | |
"One Duck", | |
"And a Cow" | |
] | |
}, | |
"integerParam":{ | |
"description":"This is an integer Param", | |
"type":"integer" | |
} | |
} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apis":[ | |
{ | |
"path":"/leadresponder", | |
"description":"Gets collection of leadresponders" | |
} | |
], | |
"basePath":"http://org.local/v1", | |
"swaggerVersion":"1.0", | |
"apiVersion":"1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for more information: