-
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
Including other files #657
Comments
<!-- include(file.apib) -->
<!-- include(file.apib) -->
<!-- include(file.apib) -->
<!-- include(file.apib) -->
<!-- include(file.apib) -->
@stefan-endouble Thanks for filing this! Currently, the API Blueprint format doesn't support multiple files out of the box. It's not in the spec, but it's on API Blueprint's public roadmap (apiaryio/api-blueprint#8). Aglio or other tools often overcome this limitation by their own solutions, such us the comment notation you mentioned. However, Dredd does not respect any of those notations as of now. What we usually recommend is to use Hercule for composing the API Blueprint document from multiple files, since it's closest to our ideas how it should work (apiaryio/api-blueprint#8). You can employ it as part of your build step and then run Dredd on top of the final, compiled blueprint. There's no plan to introduce custom support in Dredd for composing API Blueprint from multiple files (unless the team behind the format's spec will introduce the official, standard way), so I'll close this. Still, thanks for bringing this up here as others may find this and get pointed at the right places 👍 |
Thanks @honzajavorek for the fast reply. Would be nice to have a way to add required files in the configuration of blueprints: [../common.apib, docs.apib] or required: [../common.apib]
blueprint: docs.apib And this would just concatenate the files and run on the end-result. As my particular use case doesn't need the whole API tested, as testing each individual part has more value when debugging. |
@stefan-endouble I think you can still achieve this having Hercule and testing either individual blueprints or the compiled blueprint. |
Is there a way to configure dredd to include files?
Tried to use the comments used by aglio but of course don't work :).
Some more info about working with multiple files: https://gist.github.com/zdne/5f8295642af18aff27ec.
What command line options do you use?
What is in your
dredd.yml
?What's your
dredd --version
output?Does
dredd --level=debug
uncover something?Can you send us failing test in a Pull Request?
yes, just create a file with
The text was updated successfully, but these errors were encountered: