@@ -110,12 +110,6 @@ markdown :: API -> String
110That lets us see what our API docs look down in markdown, by looking at `markdown apiDocs`.
110That lets us see what our API docs look down in markdown, by looking at `markdown apiDocs`.
112````````` text
112````````` text
115−This is our super webservice's API.
119## GET /hello
113## GET /hello
121#### GET Parameters:
115#### GET Parameters:
@@ -132,19 +126,20 @@ Enjoy!
133- Supported content types are:
127- Supported content types are:
129+ - `application/json;charset=utf-8`
135 - `application/json`
130 - `application/json`
137−- When a value is provided for 'name'
132+- When a value is provided for 'name' (`application/json;charset=utf-8`, `application/json`):
139− ```javascript
134+ ```javascript
140− {"msg":"Hello, Alp"}
135+{"msg":"Hello, Alp"}
143−- When 'name' is not specified
138+- When 'name' is not specified (`application/json;charset=utf-8`, `application/json`):
145− ```javascript
140+ ```javascript
146− {"msg":"Hello, anonymous coward"}
141+{"msg":"Hello, anonymous coward"}
149## POST /marketing
144## POST /marketing
@@ -152,28 +147,30 @@ Enjoy!
153- Supported content types are:
148- Supported content types are:
150+ - `application/json;charset=utf-8`
155 - `application/json`
151 - `application/json`
157−- Example: `application/json`
153+- Example (`application/json;charset=utf-8`, `application/json`):
159− ```javascript
155+ ```javascript
160− {"email":"alp@foo.com","interested_in":["haskell","mathematics"],"age":26,"name":"Alp"}
156+{"clientAge":26,"clientEmail":"alp@foo.com","clientName":"Alp","clientInterestedIn":["haskell","mathematics"]}
163#### Response:
159#### Response:
165−- Status code 201
161+- Status code 200
166- Headers: []
162- Headers: []
168- Supported content types are:
164- Supported content types are:
166+ - `application/json;charset=utf-8`
170 - `application/json`
167 - `application/json`
172−- Response body as below.
169+- Example (`application/json;charset=utf-8`, `application/json`):
174− ```javascript
171+ ```javascript
175− {"subject":"Hey Alp, we miss you!","body":"Hi Alp,\n\nSince you've recently turned 26, have you checked out our latest haskell, mathematics products? Give us a visit!","to":"alp@foo.com","from":"great@company.com"}
172+{"subject":"Hey Alp, we miss you!","body":"Hi Alp,\n\nSince you've recently turned 26, have you checked out our latest haskell, mathematics products? Give us a visit!","to":"alp@foo.com","from":"great@company.com"}
178## GET /position/:x/:y
175## GET /position/:x/:y
@@ -189,13 +186,14 @@ Enjoy!
190- Supported content types are:
187- Supported content types are:
189+ - `application/json;charset=utf-8`
192 - `application/json`
190 - `application/json`
194−- Response body as below.
192+- Example (`application/json;charset=utf-8`, `application/json`):
196− ```javascript
194+ ```javascript
197− {"x":3,"y":14}
195+{"yCoord":14,"xCoord":3}