Update the samples to use the new operation macro
Closes gh-362
This commit is contained in:
@@ -6,6 +6,8 @@ Andy Wilkinson; Jenn Strater
|
|||||||
:toc: left
|
:toc: left
|
||||||
:toclevels: 4
|
:toclevels: 4
|
||||||
:sectlinks:
|
:sectlinks:
|
||||||
|
:operation-curl-request-title: Example request
|
||||||
|
:operation-http-response-title: Example response
|
||||||
|
|
||||||
[[overview]]
|
[[overview]]
|
||||||
= Overview
|
= Overview
|
||||||
@@ -75,17 +77,7 @@ The Notes resources is used to create and list notes
|
|||||||
|
|
||||||
A `GET` request will list all of the service's notes.
|
A `GET` request will list all of the service's notes.
|
||||||
|
|
||||||
==== Response structure
|
operation::notes-list-example[snippets='response-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/notes-list-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/notes-list-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/notes-list-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -94,31 +86,13 @@ include::{snippets}/notes-list-example/http-response.adoc[]
|
|||||||
|
|
||||||
A `POST` request is used to create a note
|
A `POST` request is used to create a note
|
||||||
|
|
||||||
==== Request structure
|
operation::notes-create-example[snippets='request-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/notes-create-example/request-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/notes-create-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/notes-create-example/http-response.adoc[]
|
|
||||||
|
|
||||||
[[resources-note-retrieve]]
|
[[resources-note-retrieve]]
|
||||||
=== Retrieve a note
|
=== Retrieve a note
|
||||||
|
|
||||||
A `GET` request will retrieve the details of a note
|
A `GET` request will retrieve the details of a note
|
||||||
|
|
||||||
==== Response structure
|
operation::note-get-example[snippets='response-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/note-get-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/note-get-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/note-get-example/http-response.adoc[]
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ Andy Wilkinson;
|
|||||||
:toc: left
|
:toc: left
|
||||||
:toclevels: 4
|
:toclevels: 4
|
||||||
:sectlinks:
|
:sectlinks:
|
||||||
|
:operation-curl-request-title: Example request
|
||||||
|
:operation-http-response-title: Example response
|
||||||
|
|
||||||
[[overview]]
|
[[overview]]
|
||||||
= Overview
|
= Overview
|
||||||
@@ -97,20 +99,7 @@ The index provides the entry point into the service.
|
|||||||
|
|
||||||
A `GET` request is used to access the index
|
A `GET` request is used to access the index
|
||||||
|
|
||||||
==== Response structure
|
operation::index-example[snippets='response-fields,http-response,links']
|
||||||
|
|
||||||
include::{snippets}/index-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/index-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[[resources-index-links]]
|
|
||||||
==== Links
|
|
||||||
|
|
||||||
include::{snippets}/index-example/links.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -126,40 +115,16 @@ The Notes resources is used to create and list notes
|
|||||||
|
|
||||||
A `GET` request will list all of the service's notes.
|
A `GET` request will list all of the service's notes.
|
||||||
|
|
||||||
==== Response structure
|
operation::notes-list-example[snippets='response-fields,curl-request,http-response,links']
|
||||||
|
|
||||||
include::{snippets}/notes-list-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/notes-list-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/notes-list-example/http-response.adoc[]
|
|
||||||
|
|
||||||
[[resources-notes-list-links]]
|
|
||||||
==== Links
|
|
||||||
|
|
||||||
include::{snippets}/notes-list-example/links.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
[[resources-notes-create]]
|
[[resources-notes-create]]
|
||||||
=== Creating a note
|
=== Creating a note
|
||||||
|
|
||||||
A `POST` request is used to create a note
|
A `POST` request is used to create a note.
|
||||||
|
|
||||||
==== Request structure
|
operation::notes-create-example[snippets='request-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/notes-create-example/request-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/notes-create-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/notes-create-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -175,22 +140,7 @@ The Tags resource is used to create and list tags.
|
|||||||
|
|
||||||
A `GET` request will list all of the service's tags.
|
A `GET` request will list all of the service's tags.
|
||||||
|
|
||||||
==== Response structure
|
operation::tags-list-example[snippets='response-fields,curl-request,http-response,links']
|
||||||
|
|
||||||
include::{snippets}/tags-list-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/tags-list-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/tags-list-example/http-response.adoc[]
|
|
||||||
|
|
||||||
[[resources-tags-list-links]]
|
|
||||||
==== Links
|
|
||||||
|
|
||||||
include::{snippets}/tags-list-example/links.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -199,17 +149,7 @@ include::{snippets}/tags-list-example/links.adoc[]
|
|||||||
|
|
||||||
A `POST` request is used to create a note
|
A `POST` request is used to create a note
|
||||||
|
|
||||||
==== Request structure
|
operation::tags-create-example[snippets='request-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/tags-create-example/request-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/tags-create-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/tags-create-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -232,17 +172,7 @@ include::{snippets}/note-get-example/links.adoc[]
|
|||||||
|
|
||||||
A `GET` request will retrieve the details of a note
|
A `GET` request will retrieve the details of a note
|
||||||
|
|
||||||
==== Response structure
|
operation::note-get-example[snippets='response-fields,curl-request-http-response']
|
||||||
|
|
||||||
include::{snippets}/note-get-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/note-get-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/note-get-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -286,17 +216,7 @@ include::{snippets}/tag-get-example/links.adoc[]
|
|||||||
|
|
||||||
A `GET` request will retrieve the details of a tag
|
A `GET` request will retrieve the details of a tag
|
||||||
|
|
||||||
==== Response structure
|
operation::tag-get-example[snippets='response-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/tag-get-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/tag-get-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/tag-get-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -305,14 +225,4 @@ include::{snippets}/tag-get-example/http-response.adoc[]
|
|||||||
|
|
||||||
A `PATCH` request is used to update a tag
|
A `PATCH` request is used to update a tag
|
||||||
|
|
||||||
==== Request structure
|
operation::tag-update-example[snippets='request-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/tag-update-example/request-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/tag-update-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/tag-update-example/http-response.adoc[]
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ Andy Wilkinson;
|
|||||||
:toc: left
|
:toc: left
|
||||||
:toclevels: 4
|
:toclevels: 4
|
||||||
:sectlinks:
|
:sectlinks:
|
||||||
|
:operation-curl-request-title: Example request
|
||||||
|
:operation-http-response-title: Example response
|
||||||
|
|
||||||
[[overview]]
|
[[overview]]
|
||||||
= Overview
|
= Overview
|
||||||
@@ -104,20 +106,7 @@ The index provides the entry point into the service.
|
|||||||
|
|
||||||
A `GET` request is used to access the index
|
A `GET` request is used to access the index
|
||||||
|
|
||||||
==== Response structure
|
operation::index-example[snippets='response-fields,http-response,links']
|
||||||
|
|
||||||
include::{snippets}/index-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/index-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[[resources-index-links]]
|
|
||||||
==== Links
|
|
||||||
|
|
||||||
include::{snippets}/index-example/links.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -133,36 +122,16 @@ The Notes resources is used to create and list notes
|
|||||||
|
|
||||||
A `GET` request will list all of the service's notes.
|
A `GET` request will list all of the service's notes.
|
||||||
|
|
||||||
==== Response structure
|
operation::notes-list-example[snippets='response-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/notes-list-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/notes-list-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/notes-list-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[[resources-notes-create]]
|
[[resources-notes-create]]
|
||||||
=== Creating a note
|
=== Creating a note
|
||||||
|
|
||||||
A `POST` request is used to create a note
|
A `POST` request is used to create a note.
|
||||||
|
|
||||||
==== Request structure
|
operation::notes-create-example[snippets='request-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/notes-create-example/request-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/notes-create-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/notes-create-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -178,17 +147,7 @@ The Tags resource is used to create and list tags.
|
|||||||
|
|
||||||
A `GET` request will list all of the service's tags.
|
A `GET` request will list all of the service's tags.
|
||||||
|
|
||||||
==== Response structure
|
operation::tags-list-example[snippets='response-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/tags-list-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/tags-list-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/tags-list-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -197,17 +156,7 @@ include::{snippets}/tags-list-example/http-response.adoc[]
|
|||||||
|
|
||||||
A `POST` request is used to create a note
|
A `POST` request is used to create a note
|
||||||
|
|
||||||
==== Request structure
|
operation::tags-create-example[snippets='request-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/tags-create-example/request-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/tags-create-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/tags-create-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -230,17 +179,7 @@ include::{snippets}/note-get-example/links.adoc[]
|
|||||||
|
|
||||||
A `GET` request will retrieve the details of a note
|
A `GET` request will retrieve the details of a note
|
||||||
|
|
||||||
==== Response structure
|
operation::note-get-example[snippets='response-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/note-get-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/note-get-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/note-get-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -255,13 +194,8 @@ include::{snippets}/note-update-example/request-fields.adoc[]
|
|||||||
|
|
||||||
To leave an attribute of a note unchanged, any of the above may be omitted from the request.
|
To leave an attribute of a note unchanged, any of the above may be omitted from the request.
|
||||||
|
|
||||||
==== Example request
|
operation::note-update-example[snippets='curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/note-update-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/note-update-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
[[resources-tag]]
|
[[resources-tag]]
|
||||||
@@ -283,17 +217,7 @@ include::{snippets}/tag-get-example/links.adoc[]
|
|||||||
|
|
||||||
A `GET` request will retrieve the details of a tag
|
A `GET` request will retrieve the details of a tag
|
||||||
|
|
||||||
==== Response structure
|
operation::tag-get-example[snippets='response-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/tag-get-example/response-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/tag-get-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/tag-get-example/http-response.adoc[]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -302,14 +226,4 @@ include::{snippets}/tag-get-example/http-response.adoc[]
|
|||||||
|
|
||||||
A `PATCH` request is used to update a tag
|
A `PATCH` request is used to update a tag
|
||||||
|
|
||||||
==== Request structure
|
operation::tag-update-example[snippets='request-fields,curl-request,http-response']
|
||||||
|
|
||||||
include::{snippets}/tag-update-example/request-fields.adoc[]
|
|
||||||
|
|
||||||
==== Example request
|
|
||||||
|
|
||||||
include::{snippets}/tag-update-example/curl-request.adoc[]
|
|
||||||
|
|
||||||
==== Example response
|
|
||||||
|
|
||||||
include::{snippets}/tag-update-example/http-response.adoc[]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user