-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept API Elements as input to avoid parsing #600
Comments
Given I hit a round issue number (600), this one will have top priority on the to do list. |
This should be relatively easy to implement. Some pointers if anyone is interested in contributing a PR (providing the maintainers would accept).
|
There are two things the Dredd Transactions library does. It parses the API description document and it compiles HTTP transactions from the parse result. With time I'm filling with doubts whether it's the correct approach. It began with apiaryio/dredd-transactions#27, continued with @netmilk's thoughts about Dredd being used also in other then CLI runtimes (such as browser, see also #704), and it boils down also to this particular issue. Basically, I think it would be nice to have But that would mean parsing is responsibility of a different package then compilation of the HTTP transactions. That would mean current Dredd Transactions should be split. They should do just one "simple" thing. Take API Elements and compile the list of HTTP transactions. What do you folks think of this? @XVincentX @kylef @michalholasek @netmilk |
As @honzajavorek said, I think we could divide
|
I'd remove most reporters in favor of TAP, actually: #341 (comment) So I'm not sure about the reporters package. I'd do The parsing is just a couple of lines. I don't know if it even deserves it's own package. Honestly, it does three things:
I think the parsing can be just part of the CLI package. If any other environment needs the parsing, it won't need the 1 and they can just call Fury.js with the source maps option (2). |
I don't necessarily mean that |
That's happening now. I'll perhaps bring attention of @artem-zakharchenko and @kylef to this issue as it documents our past musing on the topic. Dredd Transactions should eventually become two packages within the monorepo (parsing and compilation), and with some additional decoupling Dredd, or pieces of Dredd, should be then able to consume API Elements directly. |
👋 I'm still getting notifications on these :) |
I'm working on a super secret integration of Dredd. Given I'm already parsing the ADF on my own, it would be really useful to reuse the current AST instead of make the library reparse the document again.
The text was updated successfully, but these errors were encountered: