Fake Better API
This is a basic example API for our talk at http://betterapis.com.
Version: 1.0.0
BasePath:/
Apache 2.0
http://www.apache.org/licenses/LICENSE-2.0.html
Access
[ Jump to Models ]
Table of Contents
get /foo/{fooId}
get /foo
post /foo
put /foo
(getFooByID)
Path parameters
fooId (required)
Path Parameter — ID of the foo
Consumes
This API call consumes the following media types via the
Content-Type request header:
Return type
Object
Example data
Content-Type: application/json
"{}"
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Foo with the specified ID
Object
404
Foo with specified ID not found
(listFoo)
Consumes
This API call consumes the following media types via the
Content-Type request header:
Query parameters
limit (optional)
Query Parameter — maximum number of foo to return default: 10 format: int32
Return type
Example data
Content-Type: application/json
[ {
"score" : 123,
"name" : "aeiou"
} ]
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
List all foo
(postFoo)
Consumes
This API call consumes the following media types via the
Content-Type request header:
Request body
foo (required)
Body Parameter — Data representing a foo
Return type
Object
Example data
Content-Type: application/json
"{}"
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Creates a foo
Object
400
Invalid foo data
(putFoo)
Consumes
This API call consumes the following media types via the
Content-Type request header:
Request body
foo (required)
Body Parameter — Data representing a foo
Return type
Object
Example data
Content-Type: application/json
"{}"
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Updates a foo
Object
400
Invalid foo data
[ Jump to Methods ]
Table of Contents
Foo
name (optional)
score (optional)