@@ -153,30 +153,36 @@ Feature: Generate Slate documentation from test examples
153153
154154 ### Request
155155
156+ ```shell
157+ curl -g "http://localhost:3000/orders" -X GET \
158+ -H "Host: example.org" \
159+ -H "Cookie: "
160+ ```
161+
156162 #### Endpoint
157163
164+ `GET /orders`
165+
158166 ```plaintext
159167 GET /orders
160168 Host: example.org
161169 ```
162170
163- `GET /orders`
164-
165171 #### Parameters
166172
167173
168- None known.
169174
175+ None known.
170176
171177 ### Response
172178
179+
173180 ```plaintext
174181 Content-Type: application/json
175182 Content-Length: 137
176183 200 OK
177184 ```
178185
179-
180186 ```json
181187 {
182188 "page": 1,
@@ -196,45 +202,40 @@ Feature: Generate Slate documentation from test examples
196202 ```
197203
198204
199-
200205 #### Fields
201206
202207 | Name | Description |
203208 |:-----------|:--------------------|
204209 | page | Current page |
205-
206-
207- ```shell
208- curl -g "http://localhost:3000/orders" -X GET \
209- -H "Host: example.org" \
210- -H "Cookie: "
211210 """
212211
213212 Scenario : Example 'Creating an order' docs should look like we expect
214213 Then the file "doc/api/index.html.md" should contain:
215214 """
216- # Orders
217-
218- An Order represents an amount of money to be paid
219-
220215 ## Creating an order
221216
222217
223218 ### Request
219+
220+ ```shell
221+ curl "http://localhost:3000/orders" -d 'name=Order+3&amount=33.0' -X POST \
222+ -H "Host: example.org" \
223+ -H "Content-Type: application/x-www-form-urlencoded" \
224+ -H "Cookie: "
225+ ```
224226
225227 #### Endpoint
226228
229+ `POST /orders`
230+
227231 ```plaintext
228232 POST /orders
229233 Host: example.org
230234 Content-Type: application/x-www-form-urlencoded
231235 ```
232236
233- `POST /orders`
234-
235237 #### Parameters
236238
237-
238239 ```json
239240 name=Order+3&amount=33.0
240241 ```
@@ -246,10 +247,9 @@ Feature: Generate Slate documentation from test examples
246247 | amount *required* | Amount paid |
247248 | description | Some comments on the order |
248249
249-
250-
251250 ### Response
252251
252+
253253 ```plaintext
254254 Content-Type: text/html;charset=utf-8
255255 Content-Length: 0
@@ -258,13 +258,6 @@ Feature: Generate Slate documentation from test examples
258258
259259
260260
261-
262- ```shell
263- curl "http://localhost:3000/orders" -d 'name=Order+3&amount=33.0' -X POST \
264- -H "Host: example.org" \
265- -H "Content-Type: application/x-www-form-urlencoded" \
266- -H "Cookie: "
267- ```
268261 """
269262
270263 Scenario : Example 'Deleting an order' docs should be created
0 commit comments