Skip to content

Commit cb26843

Browse files
committed
Remove trailing spaces
1 parent 765d9ee commit cb26843

16 files changed

+91
-91
lines changed

API Blueprint Specification.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ All of the blueprint sections are optional. However, when present, a section **m
8181
+ [`0-1` **API Name & overview** section](#def-api-name-section)
8282
+ [`0+` **Resource** sections](#def-resource-section)
8383
+ [`0-1` **URI Parameters** section](#def-uriparameters-section)
84-
+ [`0-1` **Attributes** section](#def-attributes-section)
84+
+ [`0-1` **Attributes** section](#def-attributes-section)
8585
+ [`0-1` **Model** section](#def-model-section)
8686
+ [`0-1` **Headers** section](#def-headers-section)
8787
+ [`0-1` **Attributes** section](#def-attributes-section)
@@ -593,13 +593,13 @@ The payload defined in this section **may** be referenced in any response or req
593593
#### Example
594594

595595
# My Resource [/resource]
596-
596+
597597
+ Model (text/plain)
598598

599599
Hello World
600600

601601
## Retrieve My Resource [GET]
602-
602+
603603
+ Response 200
604604

605605
[My Resource][]
@@ -680,7 +680,7 @@ Multiple Request and Response nested sections within one transaction example **s
680680

681681
+ Attributes
682682

683-
...
683+
...
684684

685685
+ Request
686686

@@ -888,21 +888,21 @@ Defined by the `Attributes` keyword followed by an optional [MSON Type Definitio
888888

889889
`<Type Definition>` is the type definition of the data structure being described. If the `<Type Definition>` is not specified, an `object` base type is assumed. See [MSON Type Definition][] for details.
890890

891-
##### Example
891+
##### Example
892892

893893
+ Attributes (object)
894894

895895
#### Description
896896
This section describes a data structure using the **[Markdown Syntax for Object Notation][MSON] (MSON)**. Based on the parent section, the data structure being described is one of the following:
897-
897+
898898
1. Resource data structure attributes ([Resource section](#def-resource-section))
899899
2. Action request attributes ([Action section](#def-action-section))
900900
3. Payload message-body attributes ([Payload section](#def-payload-section))
901901

902902
Data structures defined in this section **may** refer to any arbitrary data structures defined in the [Data Structures section](#def-data-structures) as well as to any data structures defined by a named resource attributes description (see below).
903903

904904
#### Resource Attributes description
905-
Description of the resource data structure.
905+
Description of the resource data structure.
906906

907907
If defined in a named [Resource section](#def-resource-section), this data structure **may** be referenced by other data structures using the resource name.
908908

@@ -917,9 +917,9 @@ If defined in a named [Resource section](#def-resource-section), this data struc
917917
+ author: [email protected] (string) - Author of the blog post
918918

919919
> **NOTE:** This data structure can be later referred as:
920-
>
920+
>
921921
> + Attributes (Blog Post)
922-
>
922+
>
923923
924924
#### Action Attributes description
925925
Description of the default request message-body data structure.
@@ -932,7 +932,7 @@ If defined, all the [Request sections](#def-request-section) of the respective [
932932

933933
+ Attributes
934934
+ message (string) - The blog post article
935-
+ author: [email protected] (string) - Author of the blog post
935+
+ author: [email protected] (string) - Author of the blog post
936936

937937
+ Request (application/json)
938938

@@ -1032,7 +1032,7 @@ Defined by the `Data Structures` keyword.
10321032
# Data Structures
10331033

10341034
#### Description
1035-
This section holds arbitrary data structures definitions defined in the form of [MSON Named Types][].
1035+
This section holds arbitrary data structures definitions defined in the form of [MSON Named Types][].
10361036

10371037
Data structures defined in this section **may** be used in any [Attributes section][]. Similarly, any data structures defined in a [Attributes section][] of a named [Resource Section][] **may** be used in a data structure definition.
10381038

@@ -1053,7 +1053,7 @@ Refer to the [MSON][] specification for full details on how to define an MSON Na
10531053
10541054

10551055

1056-
#### Example reusing Data Structure in Resource
1056+
#### Example reusing Data Structure in Resource
10571057

10581058
# User [/user]
10591059

@@ -1108,9 +1108,9 @@ This section specifies a [link relation type](https://tools.ietf.org/html/rfc598
11081108

11091109
+ Relation: task
11101110
+ Response 200
1111-
1111+
11121112
{ ... }
1113-
1113+
11141114
## Delete Task [DELETE]
11151115

11161116
+ Relation: delete

Glossary of Terms.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ A brief list of terms as used in the [API Blueprint](http://apiblueprint.org) co
66

77
<a name="def-action"></a>
88
### Action
9-
An **HTTP transaction** (a request-response transaction).
9+
An **HTTP transaction** (a request-response transaction).
1010

11-
Actions are specified by an [HTTP request method](#def-method) within a [resource](#def-resource).
11+
Actions are specified by an [HTTP request method](#def-method) within a [resource](#def-resource).
1212

1313
<a name="def-api"></a>
1414
### API
@@ -52,14 +52,14 @@ An **HTTP transaction message**.
5252

5353
<a name="def-message-body"></a>
5454
### Message body
55-
An [**asset**](#def-asset) representing [**HTTP transaction message body**](http://en.wikipedia.org/wiki/HTTP_body_data).
55+
An [**asset**](#def-asset) representing [**HTTP transaction message body**](http://en.wikipedia.org/wiki/HTTP_body_data).
5656

5757
<a name="def-message-header"></a>
5858
### Message header
59-
An [**asset**](#def-asset) representing [**HTTP transaction message header**](http://en.wikipedia.org/wiki/List_of_HTTP_header_fields).
59+
An [**asset**](#def-asset) representing [**HTTP transaction message header**](http://en.wikipedia.org/wiki/List_of_HTTP_header_fields).
6060
<a name="def-parameter"></a>
6161
### Parameter
62-
An [**URI template**](#def-uri-template) **variable**.
62+
An [**URI template**](#def-uri-template) **variable**.
6363

6464
<a name="def-payload"></a>
6565
### Payload

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ It is the task for the API Blueprint parser – [Drafter][] or one of its langua
6464

6565
If you are interested in building tools for API Blueprint or just to integrate it with your workflow check out the [Developing tools for API Blueprint](https://github.com/apiaryio/api-blueprint/wiki/Developing-tools-for-API-Blueprint).
6666

67-
## Media Type
68-
The media type for API Blueprint is `text/vnd.apiblueprint+markdown`.
67+
## Media Type
68+
The media type for API Blueprint is `text/vnd.apiblueprint+markdown`.
6969

7070
## Learn more
7171
+ [Tutorial](Tutorial.md)

examples/01. Simplest API.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
FORMAT: 1A
22

33
# The Simplest API
4-
This is one of the simplest APIs written in the **API Blueprint**.
4+
This is one of the simplest APIs written in the **API Blueprint**.
55
One plain resource combined with a method and that's it! We will explain what is going on in the next installment - [Resource and Actions](02.%20Resource%20and%20Actions.md).
66

7-
**Note:** As we progress through the examples, do not also forget to view the [Raw](https://raw.github.com/apiaryio/api-blueprint/master/examples/01.%20Simplest%20API.md) code to see what is really going on in the API Blueprint, as opposed to just seeing the output of the Github Markdown parser.
7+
**Note:** As we progress through the examples, do not also forget to view the [Raw](https://raw.github.com/apiaryio/api-blueprint/master/examples/01.%20Simplest%20API.md) code to see what is really going on in the API Blueprint, as opposed to just seeing the output of the Github Markdown parser.
88

99
Also please keep in mind that every single example in this course is a **real API Blueprint** and as such you can **parse** it with the [API Blueprint parser](https://github.com/apiaryio/drafter) or one of its [bindings](https://github.com/apiaryio/drafter#bindings).
1010

@@ -14,5 +14,5 @@ Also please keep in mind that every single example in this course is a **real AP
1414

1515
# GET /message
1616
+ Response 200 (text/plain)
17-
17+
1818
Hello World!

examples/02. Resource and Actions.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@ FORMAT: 1A
44
This API example demonstrates how to define a resource with multiple actions.
55

66
## API Blueprint
7-
+ [Previous: The Simplest API](01.%20Simplest%20API.md)
7+
+ [Previous: The Simplest API](01.%20Simplest%20API.md)
88
+ [This: Raw API Blueprint](https://raw.github.com/apiaryio/api-blueprint/master/examples/02.%20Resource%20and%20Actions.md)
99
+ [Next: Named Resource and Actions](03.%20Named%20Resource%20and%20Actions.md)
1010

1111
# /message
1212
This is our [resource](http://www.w3.org/TR/di-gloss/#def-resource). It is defined by its [URI](http://www.w3.org/TR/di-gloss/#def-uniform-resource-identifier) or, more precisely, by its [URI Template](http://tools.ietf.org/html/rfc6570).
1313

14-
This resource has no actions specified but we will fix that soon.
14+
This resource has no actions specified but we will fix that soon.
1515

16-
## GET
16+
## GET
1717
Here we define an action using the `GET` [HTTP request method](http://www.w3schools.com/tags/ref_httpmethods.asp) for our resource `/message`.
1818

1919
As with every good action it should return a [response](http://www.w3.org/TR/di-gloss/#def-http-response). A response always bears a status code. Code 200 is great as it means all is green. Responding with some data can be a great idea as well so let's add a plain text message to our response.
2020

2121
+ Response 200 (text/plain)
2222

2323
Hello World!
24-
25-
## PUT
24+
25+
## PUT
2626
OK, let's add another action. This time to put new data to our resource (essentially an update action). We will need to send something in a [request](http://www.w3.org/TR/di-gloss/#def-http-request) and then send a response back confirming the posting was a success (HTTP Status Code 204 ~ Resource updated successfully, no content is returned).
2727

2828
+ Request (text/plain)
2929

30-
All your base are belong to us.
31-
30+
All your base are belong to us.
31+
3232
+ Response 204
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FORMAT: 1A
22

3-
# Named Resource and Actions API
3+
# Named Resource and Actions API
44
This API example demonstrates how to name a resource and its actions, to give the reader a better idea about what the resource is used for.
55

66
## API Blueprint
@@ -9,20 +9,20 @@ This API example demonstrates how to name a resource and its actions, to give th
99
+ [Next: Grouping Resources](04.%20Grouping%20Resources.md)
1010

1111
# My Message [/message]
12-
OK, `My Message` probably isn't the best name for our resource but it will do for now. Note the URI `/message` is enclosed in square brackets.
12+
OK, `My Message` probably isn't the best name for our resource but it will do for now. Note the URI `/message` is enclosed in square brackets.
1313

1414
## Retrieve a Message [GET]
1515
Now this is informative! No extra explanation needed here. This action clearly retrieves the message.
1616

1717
+ Response 200 (text/plain)
1818

1919
Hello World!
20-
20+
2121
## Update a Message [PUT]
2222
`Update a message` - nice and simple naming is the best way to go.
2323

2424
+ Request (text/plain)
2525

2626
All your base are belong to us.
27-
27+
2828
+ Response 204

examples/04. Grouping Resources.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Any following resource definition is considered to be a part of this group until
2222
+ Response 200 (text/plain)
2323

2424
Hello World!
25-
25+
2626
### Update a Message [PUT]
2727

2828
+ Request (text/plain)
2929

3030
All your base are belong to us.
31-
31+
3232
+ Response 204
3333

3434
# Group Users

examples/05. Responses.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Group of all messages-related resources.
1414
## My Message [/message]
1515

1616
### Retrieve a Message [GET]
17-
This action has **two** responses defined: One returing a plain text and the other a JSON representation of our resource. Both has the same HTTP status code. Also both responses bear additional information in the form of a custom HTTP header. Note that both responses have set the `Content-Type` HTTP header just by specifying `(text/plain)` or `(application/json)` in their respective signatures.
17+
This action has **two** responses defined: One returing a plain text and the other a JSON representation of our resource. Both has the same HTTP status code. Also both responses bear additional information in the form of a custom HTTP header. Note that both responses have set the `Content-Type` HTTP header just by specifying `(text/plain)` or `(application/json)` in their respective signatures.
1818

1919
+ Response 200 (text/plain)
2020

@@ -41,5 +41,5 @@ This action has **two** responses defined: One returing a plain text and the oth
4141
+ Request (text/plain)
4242

4343
All your base are belong to us.
44-
44+
4545
+ Response 204

examples/06. Requests.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Group of all messages-related resources.
1414
## My Message [/message]
1515

1616
### Retrieve a Message [GET]
17-
In API Blueprint requests can hold exactly the same kind of information and can be described by exactly the same structure as responses, only with different signature – using the `Request` keyword. The string that follows after the `Request` keyword is a request identifier. Again, using an explanatory and simple naming is the best way to go.
17+
In API Blueprint requests can hold exactly the same kind of information and can be described by exactly the same structure as responses, only with different signature – using the `Request` keyword. The string that follows after the `Request` keyword is a request identifier. Again, using an explanatory and simple naming is the best way to go.
1818

1919
+ Request Plain Text Message
20-
20+
2121
+ Headers
2222

2323
Accept: text/plain
@@ -33,7 +33,7 @@ In API Blueprint requests can hold exactly the same kind of information and can
3333
Hello World!
3434

3535
+ Request JSON Message
36-
36+
3737
+ Headers
3838

3939
Accept: application/json
@@ -46,7 +46,7 @@ In API Blueprint requests can hold exactly the same kind of information and can
4646

4747
+ Body
4848

49-
{ "message": "Hello World!" }
49+
{ "message": "Hello World!" }
5050

5151
### Update a Message [PUT]
5252

examples/07. Parameters.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FORMAT: 1A
22

33
# Parameters API
4-
In this installment of the API Blueprint course we will discuss how to describe URI parameters.
4+
In this installment of the API Blueprint course we will discuss how to describe URI parameters.
55

6-
But first let's add more messages to our system. For that we would need introduce an message identifier – id. This id will be our parameter when communicating with our API about messages.
6+
But first let's add more messages to our system. For that we would need introduce an message identifier – id. This id will be our parameter when communicating with our API about messages.
77

88
## API Blueprint
99
+ [Previous: Requests](06.%20Requests.md)
@@ -14,7 +14,7 @@ But first let's add more messages to our system. For that we would need introduc
1414
Group of all messages-related resources.
1515

1616
## My Message [/message/{id}]
17-
Here we have added the message `id` parameter as an [URI Template variable](http://tools.ietf.org/html/rfc6570) in the Message resource's URI.
17+
Here we have added the message `id` parameter as an [URI Template variable](http://tools.ietf.org/html/rfc6570) in the Message resource's URI.
1818
Note the parameter name `id` is enclosed in curly brackets. We will discuss this parameter in the `Parameters` section below, where we will also set its example value to `1` and declare it of an arbitrary 'number' type.
1919

2020
+ Parameters
@@ -24,7 +24,7 @@ Note the parameter name `id` is enclosed in curly brackets. We will discuss this
2424
### Retrieve a Message [GET]
2525

2626
+ Request Plain Text Message
27-
27+
2828
+ Headers
2929

3030
Accept: text/plain
@@ -40,7 +40,7 @@ Note the parameter name `id` is enclosed in curly brackets. We will discuss this
4040
Hello World!
4141

4242
+ Request JSON Message
43-
43+
4444
+ Headers
4545

4646
Accept: application/json
@@ -53,10 +53,10 @@ Note the parameter name `id` is enclosed in curly brackets. We will discuss this
5353

5454
+ Body
5555

56-
{
56+
{
5757
"id": 1,
58-
"message": "Hello World!"
59-
}
58+
"message": "Hello World!"
59+
}
6060

6161
### Update a Message [PUT]
6262

@@ -74,7 +74,7 @@ Note the parameter name `id` is enclosed in curly brackets. We will discuss this
7474
A resource representing all of my messages in the system.
7575

7676
We have added the query URI template parameter - `limit`. This parameter is used for limiting the number of results returned by some actions on this resource. It does not affect every possible action of this resource therefore we will discuss it only at the particular action level below.
77-
77+
7878
### Retrieve all Messages [GET]
7979

8080
+ Parameters
@@ -83,7 +83,7 @@ We have added the query URI template parameter - `limit`. This parameter is used
8383
+ Default: `20`
8484

8585
+ Response 200 (application/json)
86-
86+
8787
[
8888
{
8989
"id": 1,

examples/09. Advanced Attributes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FORMAT: 1A
22

33
# Advanced Attributes API
4-
Improving the previous [Attributes](08.%20Attributes.md) description example, this API example describes the `Coupon` resource attributes (data structure) regardless of the serialization format. These attributes can be later referenced using the resource name
4+
Improving the previous [Attributes](08.%20Attributes.md) description example, this API example describes the `Coupon` resource attributes (data structure) regardless of the serialization format. These attributes can be later referenced using the resource name
55

66
These attributes are then reused in the `Retrieve a Coupon` action. Since they describe the complete message, no explicit JSON body example is needed.
77

examples/10. Data Structures.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FORMAT: 1A
22

33
# Data Structures API
4-
Following [Advanced Attributes](09.%20Advanced%20Attributes.md), this example demonstrates defining arbitrary data structure to be reused by various attribute descriptions.
4+
Following [Advanced Attributes](09.%20Advanced%20Attributes.md), this example demonstrates defining arbitrary data structure to be reused by various attribute descriptions.
55

66
Since a portion of the `Coupon` data structure is shared between the `Coupon` definition itself and the `Create a Coupon` action, it was separated into a `Coupon Base` data structure in the `Data Strucutes` API Blueprint Section. Doing so enables us to reuse it as a base-type of other attribute definitions.
77

0 commit comments

Comments
 (0)