Implicit request response pairing
Pre-releaseThis release introduces implicit request response pairing into transaction example groups (#53) (see bellow).
In addition to the implicit request response pairing this release also introduces a warning on URI containing square brackets outside of the host definition (#58).
Implicit request response pairing
Consider following blueprint:
# Resource [/]
## Do Someting [POST]
+ request A
A
+ response 200
200
+ request B
B
+ response 400
400
+ response 500
500
Prior this release all the responses and request were part of one transaction example. As of v0.10.0 parser will "pair" request with responses automatically creating two transaction examples: Fist with request A and response 200, second with request B and response 400 and response 500.
Note this will technically allows multiple response of the same status code and content-type.
Parsed and serialized example (vnd.apiblueprint.ast.raw+yaml; version=2.0
):
_version: 2.0
metadata:
name:
description:
resourceGroups:
- name:
description:
resources:
- name: "Resource"
description:
uriTemplate: "/"
model:
parameters:
actions:
- name: "Do Someting"
description:
method: "POST"
parameters:
examples:
- name:
description:
requests:
- name: "A"
description:
headers:
body: "A\n"
schema:
responses:
- name: "200"
description:
headers:
body: "200\n"
schema:
- name:
description:
requests:
- name: "B"
description:
headers:
body: "B\n"
schema:
responses:
- name: "400"
description:
headers:
body: "400\n"
schema:
- name: "500"
description:
headers:
body: "500\n"
schema: