-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
TDD or Test-Driven Documentation #260
Comments
That's an interesting idea. I don't see myself exploring it anytime soon because I don't have the bandwidth right now, but you can always send in a proof of concept. Theoretically, you could add it to the existing Scribe architecture as a new strategy, say A second limitation is that the strategy has to be registered with a specific stage (headers, query parameters etc), but it's easy to get around that by mutating the |
Hi @shalvah , thanks that you like the idea! |
Hi, @shalvah I plan to work on this, do you have a public repository that uses scribe? So I can start to familiarize myself and deep dive into how it works. It would be better if the repo is using most of the features of scribe. Although I also created a sample laravel app and installed scribe but it would be faster if I can look on others work. |
I found it, haha. https://github.com/knuckleswtf/TheSideProjectAPI |
Yeah, it's slightly out-of-date, but I'll be updating it in a few hours. |
Scribe-TDD is ready for testing. I was hoping we can get some other beta testers. https://github.com/ajcastro/scribe-tdd. |
@shalvah when will be the patch released? for the |
Tagged 3.5.2.👍 Nice work. 👏 Noticed in the docs you have |
Reopening to remind me to mention this in the docs. |
Thanks @shalvah !
I am thinking not to replace them entirely because there are default strategies that seem to be better. I also like the feature of the default strategy of bodyParams in formRequest or inline validation where it includes the validation rules to the description. So I think that the strategies can be a combination of both the default strategies and tdd strategies. Currently, I am leaving the options for others to choose their preferences. |
Mentioned this in the docs: https://scribe.knuckles.wtf/laravel/documenting |
@shalvah thanks a lot! |
Hi, I just like to share this idea.
This is a documentation principle where you generate your api docs by running phpunit tests instead of docblocks annotations in the controller.
Benefits
Currently, there is a package that has this principle/workflow, called Enlighten, https://github.com/StydeNet/enlighten/.
But scribe output looks better and easier to navigate.
Scribe output has more fun features like the "Try it out".
Scribe has support for OpenAPI and Postman collection.
So I am wondering if scribe can adopt test-driven documentation so I can drop Enlighten.
The text was updated successfully, but these errors were encountered: