This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Requests and Responses do not have source maps #259
Labels
Comments
By trial and error, I found out the following cases won't allow me to reconstruct the original document. While the combinations are not often very useful on their own and sometimes they produce warnings, they're still non-erroneous API Blueprint notation which could appear in Dredd. Problematic CasesBare Request+ Request
+ Response 200 Request with Bare Attributes Section+ Request
+ Attributes
+ Response 200 Request with Bare Headers Section+ Request
+ Headers
+ Response 200 Request with Bare Body Section+ Request
+ Body
+ Response 200 Request with Bare Schema Section+ Request
+ Schema
+ Response 200 Bare Response+ Request (application/json)
+ Response Response with Bare Attributes Section+ Request (application/json)
+ Response
+ Attributes Response with Bare Headers Section+ Request (application/json)
+ Response
+ Headers Response with Bare Body Section+ Request (application/json)
+ Response
+ Body Response with Bare Schema Section+ Request (application/json)
+ Response
+ Schema |
kylef
added a commit
to apiaryio/snowcrash
that referenced
this issue
Mar 23, 2016
kylef
added a commit
that referenced
this issue
Mar 23, 2016
This was referenced Mar 23, 2016
kylef
added a commit
that referenced
this issue
Apr 1, 2016
kylef
added a commit
that referenced
this issue
Apr 1, 2016
I can confirm this has been resolved in |
honzajavorek
added a commit
to apiaryio/dredd-transactions
that referenced
this issue
Apr 5, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, HTTP Requests and HTTP Responses do not have source maps in the
refract
output. Their sub-elements and attributes have source maps, but there's no way to determine where the actual+ Request
or+ Response
happened to be in the original document.In following situation I can distinguish the requests, because they happen to have headers. Headers have source maps, so I can say which request was on which position:
However, imagine following situation with "bare" requests:
In this case the requests do not have a single sub-element with a source map (except of the
method
attribute, but that doesn't actually say where the+ Request
was written). I can say where responses were positioned, because I have source maps for the status codes. However, there is no way to say this for the requests. I can't distinguish which was which or whether they're the same and I can't re-construct number of the implicit HTTP transaction example (in this case, the first request is Example 1, the second is Example 2).This fact blocks me to continue with apiaryio/dredd-transactions#2. I can't flawlessly implement backward compatibility for apiaryio/dredd#388 and I can't support API Elements in Dredd.
The text was updated successfully, but these errors were encountered: