@@ -248,7 +248,8 @@ Feature: Generate API Blueprint documentation from test examples
248248 Scenario : Index file should look like we expect
249249 Then the file "doc/api/index.apib" should contain exactly:
250250 """
251- FORMAT: A1
251+ FORMAT: 1A
252+ # Example API
252253
253254 # Group Instructions
254255
@@ -262,18 +263,17 @@ Feature: Generate API Blueprint documentation from test examples
262263
263264 + Headers
264265
265- Host: example.org
266+ Host: example.org
266267
267268 + Response 200 (text/html;charset=utf-8)
268269
269270 + Headers
270271
271- Content-Type: text/html;charset=utf-8
272- Content-Length: 57
272+ Content-Length: 57
273273
274274 + Body
275275
276- {"data":{"id":"1","type":"instructions","attributes":{}}}
276+ {"data":{"id":"1","type":"instructions","attributes":{}}}
277277
278278 # Group Orders
279279
@@ -287,73 +287,70 @@ Feature: Generate API Blueprint documentation from test examples
287287
288288 + Headers
289289
290- Content-Type: application/json
291- Host: example.org
290+ Host: example.org
292291
293292 + Body
294293
295- {
296- "data": {
297- "type": "order",
298- "attributes": {
299- "name": "Order 1",
300- "amount": 100.0,
301- "description": "A description"
294+ {
295+ "data": {
296+ "type": "order",
297+ "attributes": {
298+ "name": "Order 1",
299+ "amount": 100.0,
300+ "description": "A description"
301+ }
302+ }
302303 }
303- }
304- }
305304
306305 + Response 201 (application/json)
307306
308307 + Headers
309308
310- Content-Type: application/json
311- Content-Length: 73
309+ Content-Length: 73
312310
313311 + Body
314312
315- {
316- "order": {
317- "name": "Order 1",
318- "amount": 100.0,
319- "description": "A great order"
320- }
321- }
313+ {
314+ "order": {
315+ "name": "Order 1",
316+ "amount": 100.0,
317+ "description": "A great order"
318+ }
319+ }
322320
323321 ### Return all orders [GET]
324322
325323 + Request Getting a list of orders
326324
327325 + Headers
328326
329- Host: example.org
327+ Host: example.org
330328
331329 + Response 200 (application/vnd.api+json)
332330
333331 + Headers
334332
335- Content-Type: application/vnd.api+json
336- Content-Length: 137
333+ Content-Length: 137
337334
338335 + Body
339336
340- {
341- "page": 1,
342- "orders": [
343- {
344- "name": "Order 1",
345- "amount": 9.99,
346- "description": null
347- },
348337 {
349- "name": "Order 2",
350- "amount": 100.0,
351- "description": "A great order"
338+ "page": 1,
339+ "orders": [
340+ {
341+ "name": "Order 1",
342+ "amount": 9.99,
343+ "description": null
344+ },
345+ {
346+ "name": "Order 2",
347+ "amount": 100.0,
348+ "description": "A great order"
349+ }
350+ ]
352351 }
353- ]
354- }
355352
356- ## Single Order [/orders/:id {?optional=:optional}]
353+ ## Single Order [/orders/{id} {?optional=:optional}]
357354
358355 + Parameters
359356 + id: 1 (required, string) - Order id
@@ -370,96 +367,89 @@ Feature: Generate API Blueprint documentation from test examples
370367
371368 + Headers
372369
373- Host: example.org
374- Content-Type: application/x-www-form-urlencoded
370+ Host: example.org
375371
376372 + Response 200 (text/html;charset=utf-8)
377373
378374 + Headers
379375
380- Content-Type: text/html;charset=utf-8
381- Content-Length: 0
376+ Content-Length: 0
382377
383378 ### Returns a single order [GET]
384379
385380 + Request Getting a specific order
386381
387382 + Headers
388383
389- Host: example.org
384+ Host: example.org
390385
391386 + Response 200 (application/json)
392387
393388 + Headers
394389
395- Content-Type: application/json
396- Content-Length: 73
390+ Content-Length: 73
397391
398392 + Body
399393
400- {
401- "order": {
402- "name": "Order 1",
403- "amount": 100.0,
404- "description": "A great order"
405- }
406- }
394+ {
395+ "order": {
396+ "name": "Order 1",
397+ "amount": 100.0,
398+ "description": "A great order"
399+ }
400+ }
407401
408402 ### Updates a single order [PUT]
409403
410404 + Request Invalid request (application/json; charset=utf-16)
411405
412406 + Headers
413407
414- Content-Type: application/json; charset=utf-16
415- Host: example.org
408+ Host: example.org
416409
417410 + Response 400 (application/json)
418411
419412 + Headers
420413
421- Content-Type: application/json
422- Content-Length: 0
414+ Content-Length: 0
423415
424416 + Request Update an order (application/json; charset=utf-16)
425417
426418 + Headers
427419
428- Content-Type: application/json; charset=utf-16
429- Host: example.org
420+ Host: example.org
430421
431422 + Body
432423
433- {
434- "data": {
435- "id": "1",
436- "type": "order",
437- "attributes": {
438- "name": "Order 1"
424+ {
425+ "data": {
426+ "id": "1",
427+ "type": "order",
428+ "attributes": {
429+ "name": "Order 1"
430+ }
431+ }
439432 }
440- }
441- }
442433
443434 + Response 200 (application/json)
444435
445436 + Headers
446437
447- Content-Type: application/json
448- Content-Length: 111
438+ Content-Length: 111
449439
450440 + Body
451441
452- {
453- "data": {
454- "id": "1",
455- "type": "order",
456- "attributes": {
457- "name": "Order 1",
458- "amount": 100.0,
459- "description": "A description"
442+ {
443+ "data": {
444+ "id": "1",
445+ "type": "order",
446+ "attributes": {
447+ "name": "Order 1",
448+ "amount": 100.0,
449+ "description": "A description"
450+ }
451+ }
460452 }
461- }
462- }
463453 """
464454
465455 Scenario : Example 'Deleting an order' file should not be created
0 commit comments