This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #198 from LinusU/patch-1
spec: allow named endpoints
- Loading branch information
Showing
4 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FORMAT: 1A | ||
|
||
# Named Endpoints API | ||
This API example demonstrates how to define a standalone endpoint with an identifier. | ||
|
||
## API Blueprint | ||
+ [Previous: Advanced Action](12.%20Advanced%20Action.md) | ||
+ [This: Raw API Blueprint](https://raw.github.com/apiaryio/api-blueprint/master/examples/13.%20Named%20Endpoints.md) | ||
|
||
# Group Quick start | ||
|
||
## Create message [POST /messages] | ||
|
||
Start out by creating a message for the world to see. | ||
|
||
+ Request (application/json) | ||
|
||
{ "message": "Hello World!" } | ||
|
||
+ Response 201 | ||
|
||
+ Headers | ||
|
||
Location: /messages/1337 | ||
|
||
## Create a new task [POST /tasks] | ||
|
||
Now create a task that you need to do at a later date. | ||
|
||
+ Request (application/json) | ||
|
||
{ | ||
"name": "Exercise in gym", | ||
"done": false, | ||
"type": "task" | ||
} | ||
|
||
+ Response 201 | ||
|
||
+ Headers | ||
|
||
Location: /tasks/1992 |