-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/spring-rest-docs' into develop
- Loading branch information
Showing
30 changed files
with
958 additions
and
299 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
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,16 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
HTTP/1.1 404 | ||
Content-Length: 213 | ||
Content-Type: application/json;charset=UTF-8 | ||
{ | ||
"timestamp": "2018-12-12T13:16:11.771539Z", | ||
"method": "GET", | ||
"path": "/api/...", | ||
"status": 404, | ||
"statusText": "Not Found", | ||
"exceptionClass": "java.util.NoSuchElementException", | ||
"exceptionMessage": "No value present" | ||
} | ||
---- |
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,32 @@ | ||
|=== | ||
|Path|Type|Description | ||
|
||
|`+timestamp+` | ||
|`+String+` | ||
|The time the error occurred. | ||
|
||
|`+method+` | ||
|`+String+` | ||
|The HTTP method. | ||
|
||
|`+path+` | ||
|`+String+` | ||
|The request context path. | ||
|
||
|`+status+` | ||
|`+Number+` | ||
|The response HTTP status code. | ||
|
||
|`+statusText+` | ||
|`+String+` | ||
|The response HTTP status text. | ||
|
||
|`+exceptionClass+` | ||
|`+String+` | ||
|The exception class. | ||
|
||
|`+exceptionMessage+` | ||
|`+String+` | ||
|The exception message. | ||
|
||
|=== |
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,40 @@ | ||
= API Endpoint - Create Greeting | ||
LeanStacks; | ||
:doctype: book | ||
:icons: font | ||
:source-highlighter: highlightjs | ||
:includedir: _includes | ||
|
||
== Create a new greeting | ||
|
||
=== POST /api/greetings | ||
|
||
Create a new greeting. | ||
|
||
=== Request Body Parameters | ||
|
||
include::{snippets}/create-greeting/request-fields.adoc[] | ||
|
||
=== Response Body Parameters | ||
|
||
include::{snippets}/create-greeting/response-fields.adoc[] | ||
|
||
=== Example Request | ||
|
||
Using cURL: | ||
|
||
include::{snippets}/create-greeting/curl-request.adoc[] | ||
|
||
The HTTP request: | ||
|
||
include::{snippets}/create-greeting/http-request.adoc[] | ||
|
||
=== Example Response | ||
|
||
include::{snippets}/create-greeting/http-response.adoc[] | ||
|
||
=== Example Error Response | ||
|
||
include::{includedir}/http-response-error.adoc[] | ||
|
||
include::{includedir}/response-fields-error.adoc[] |
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,32 @@ | ||
= API Endpoint - Delete Greeting | ||
LeanStacks; | ||
:doctype: book | ||
:icons: font | ||
:source-highlighter: highlightjs | ||
:includedir: _includes | ||
|
||
== Delete a greeting | ||
|
||
=== DELETE /api/greetings/{id} | ||
|
||
Delete all information about a specific greeting. | ||
|
||
=== Example Request | ||
|
||
Using cURL: | ||
|
||
include::{snippets}/delete-greeting/curl-request.adoc[] | ||
|
||
The HTTP request: | ||
|
||
include::{snippets}/delete-greeting/http-request.adoc[] | ||
|
||
=== Example Response | ||
|
||
include::{snippets}/delete-greeting/http-response.adoc[] | ||
|
||
=== Example Error Response | ||
|
||
include::{includedir}/http-response-error.adoc[] | ||
|
||
include::{includedir}/response-fields-error.adoc[] |
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,40 @@ | ||
= API Endpoint - Get Greeting | ||
LeanStacks; | ||
:doctype: book | ||
:icons: font | ||
:source-highlighter: highlightjs | ||
:includedir: _includes | ||
|
||
== Get a specific greeting | ||
|
||
=== GET /api/greetings/{id} | ||
|
||
Get the information about a specific greeting. | ||
|
||
=== Path Parameters | ||
|
||
include::{snippets}/get-greeting/path-parameters.adoc[] | ||
|
||
=== Response Body Parameters | ||
|
||
include::{snippets}/get-greeting/response-fields.adoc[] | ||
|
||
=== Example Request | ||
|
||
Using cURL: | ||
|
||
include::{snippets}/get-greeting/curl-request.adoc[] | ||
|
||
The HTTP request: | ||
|
||
include::{snippets}/get-greeting/http-request.adoc[] | ||
|
||
=== Example Response | ||
|
||
include::{snippets}/get-greeting/http-response.adoc[] | ||
|
||
=== Example Error Response | ||
|
||
include::{includedir}/http-response-error.adoc[] | ||
|
||
include::{includedir}/response-fields-error.adoc[] |
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,36 @@ | ||
= API Endpoint - Get Greetings | ||
LeanStacks; | ||
:doctype: book | ||
:icons: font | ||
:source-highlighter: highlightjs | ||
:includedir: _includes | ||
|
||
== Get a list of greetings | ||
|
||
=== GET /api/greetings | ||
|
||
Get a list of all greetings. | ||
|
||
=== Response Body Parameters | ||
|
||
include::{snippets}/get-greeting/response-fields.adoc[] | ||
|
||
=== Example Request | ||
|
||
Using cURL: | ||
|
||
include::{snippets}/get-greetings/curl-request.adoc[] | ||
|
||
The HTTP request: | ||
|
||
include::{snippets}/get-greetings/http-request.adoc[] | ||
|
||
=== Example Response | ||
|
||
include::{snippets}/get-greetings/http-response.adoc[] | ||
|
||
=== Example Error Response | ||
|
||
include::{includedir}/http-response-error.adoc[] | ||
|
||
include::{includedir}/response-fields-error.adoc[] |
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,27 @@ | ||
= Overview | ||
:doctype: book | ||
:icons: font | ||
:source-highlighter: highlightjs | ||
|
||
Review the available resources from the LeanStacks API. Click any endpoint for additional information. | ||
|
||
=== Greetings | ||
|
||
[cols="2,4,4",options="header"] | ||
|=== | ||
|
||
| HTTP method | Endpoint | Function | ||
|
||
| GET | <<get-greetings.adoc#,/api/greetings>> | Get a list of greetings | ||
|
||
| GET | <<get-greeting.adoc#,/api/greetings/{id}>> | Get a specific greeting | ||
|
||
| POST | <<create-greeting.adoc#,/api/greetings>> | Create a greeting | ||
|
||
| PUT | <<update-greeting.adoc#,/api/greetings/{id}>> | Update a greeting | ||
|
||
| DELETE | <<delete-greeting.adoc#,/api/greetings/{id}>> | Delete a greeting | ||
|
||
| POST | <<send-greeting.adoc#,/api/greetings/{id}/send>> | Send a greeting | ||
|
||
|=== |
Oops, something went wrong.