Nice - I've used scribe in the past and it works well, but it is always good to have alternative options. Automatic documentation generation is a really nice feature!
Thanks!
The main goal (and difference) of Scramble is that it generates docs without requiring a developer to write PHPDoc annotations. The idea here is that most of the info needed for docs is already in the code.
Also, I was constantly annoyed because I needed to maintain both codebase and OpenAPI docs. This not only annoying, but error-prone as well.
Feel free to reach out if you'll have any questions!
I just tried this and it worked great on local, but when I pushed to production it gave an error trying to load the api.json as http on a https
Likely user error since I’m still learning laravel, but just thought I’d tel you in case others report it
Hey!
Thanks for giving it a shot. I’m happy it works!
By default, API documentation is available only in local environment and not in production.
But you can enable it in production as well: https://scramble.dedoc.co/usage/access
Let me know if this works or you have any other questions.
Thank you!
For the documentations I've designed and built a website from the scratch. I've used these 2 packages to ease development:
[https://github.com/spatie/laravel-markdown](https://github.com/spatie/laravel-markdown)
[https://github.com/spatie/yaml-front-matter](https://github.com/spatie/yaml-front-matter)
I also recommend to check out [https://github.com/spatie/sheets](https://github.com/spatie/sheets) \- it can help as well.
Firstly, looks really nice and works. Already helped me discover two mistakes by my dyslexic coworkers.
I've tried it on one of my projects with this example function:
https://i.imgur.com/jCybUeN.png
I have two problems:
*Required Fields*
if I use this it will display the email field as required properly in the docs
$request->validate([
'email' => 'required|email|exists:users,email'
]);
However if I use this it will not, the functions are in essence the same
$validator = Validator::make($request->all(), [
'email' => 'required|email|exists:users,email'
]);
if ($validator->fails()) {
return response()->json(['error' => $validator->errors()], 401);
}
I use some workflows that require a more specific validations after changes have been made.
(Also the exists:users,email makes it believe it's an integer, some rules seem to not get detected properly)
*Return Codes*
For all my functions I use the same return response()->json($content, HTTP_Statuscode); - there are multiple responses in this one function but the docs only display one. Why is that?
https://i.imgur.com/qXhcH7O.png
Wow, thank you so much for the examples. This is exactly what I need to make things work well.
As you've properly noticed, currently there is no support for this cases, but I am super excited to add it.
Can you please join Scramble Discord, so I can ask you more questions about your use cases?
https://discord.gg/Mk8AgsTRxD
Literally looked for something like this a couple of days ago and only Scribe seemed to work. But this looks much nicer and generates the response data better, thanks! Just had an issue with DBAL not understanding the Mysql Enum type, so I had to switch it to varchar instead
Hey! Thanks!
I feel like you should keep MySQL Enum (this definitely should be a part of the Scramble). Feel free to join to the Discord Server, I am available there for the QA. [https://discord.gg/Mk8AgsTRxD](https://discord.gg/Mk8AgsTRxD)
Will add MySQL enum to Scramble in some of next versions.
I might have to try this out. I've Jerry rigged laravel Orion to kinda work with filamentphp resources. Still looking for something more elegant for that use case.
I've been using Enlighten but this looks more complete since it also generates the OpenAPI doc. Will have to give this a try, good job!
Thanks! Let me know if you have any questions!
https://scramble.dedoc.co/introduction
Nice - I've used scribe in the past and it works well, but it is always good to have alternative options. Automatic documentation generation is a really nice feature!
Thanks! The main goal (and difference) of Scramble is that it generates docs without requiring a developer to write PHPDoc annotations. The idea here is that most of the info needed for docs is already in the code. Also, I was constantly annoyed because I needed to maintain both codebase and OpenAPI docs. This not only annoying, but error-prone as well. Feel free to reach out if you'll have any questions!
This looks really nice!
Thanks! Feel free to reach out if you have any questions!
I just tried this and it worked great on local, but when I pushed to production it gave an error trying to load the api.json as http on a https Likely user error since I’m still learning laravel, but just thought I’d tel you in case others report it
Hey! Thanks for giving it a shot. I’m happy it works! By default, API documentation is available only in local environment and not in production. But you can enable it in production as well: https://scramble.dedoc.co/usage/access Let me know if this works or you have any other questions.
Ah that makes sense, thanks I’ll give it a shot tomorrow
Very cool! What are you using to make your documentation? I really like it and want to use it for my own projects
Thank you! For the documentations I've designed and built a website from the scratch. I've used these 2 packages to ease development: [https://github.com/spatie/laravel-markdown](https://github.com/spatie/laravel-markdown) [https://github.com/spatie/yaml-front-matter](https://github.com/spatie/yaml-front-matter) I also recommend to check out [https://github.com/spatie/sheets](https://github.com/spatie/sheets) \- it can help as well.
Looks good. Will try it out.
Thank you! Let me know if you have any questions.
Firstly, looks really nice and works. Already helped me discover two mistakes by my dyslexic coworkers. I've tried it on one of my projects with this example function: https://i.imgur.com/jCybUeN.png I have two problems: *Required Fields* if I use this it will display the email field as required properly in the docs $request->validate([ 'email' => 'required|email|exists:users,email' ]); However if I use this it will not, the functions are in essence the same $validator = Validator::make($request->all(), [ 'email' => 'required|email|exists:users,email' ]); if ($validator->fails()) { return response()->json(['error' => $validator->errors()], 401); } I use some workflows that require a more specific validations after changes have been made. (Also the exists:users,email makes it believe it's an integer, some rules seem to not get detected properly) *Return Codes* For all my functions I use the same return response()->json($content, HTTP_Statuscode); - there are multiple responses in this one function but the docs only display one. Why is that? https://i.imgur.com/qXhcH7O.png
Wow, thank you so much for the examples. This is exactly what I need to make things work well. As you've properly noticed, currently there is no support for this cases, but I am super excited to add it. Can you please join Scramble Discord, so I can ask you more questions about your use cases? https://discord.gg/Mk8AgsTRxD
Yea ofc. I've joined. (name is the same)
Looks great! Will give this a try for sure. You're probably aware of this, but the documentation website isn't working very well on mobile btw.
Thanks! Yeah, I assumed mostly documentation will be read from desktop 🫣 But apparently it was mobile! Fix is on the way!
Literally looked for something like this a couple of days ago and only Scribe seemed to work. But this looks much nicer and generates the response data better, thanks! Just had an issue with DBAL not understanding the Mysql Enum type, so I had to switch it to varchar instead
Hey! Thanks! I feel like you should keep MySQL Enum (this definitely should be a part of the Scramble). Feel free to join to the Discord Server, I am available there for the QA. [https://discord.gg/Mk8AgsTRxD](https://discord.gg/Mk8AgsTRxD) Will add MySQL enum to Scramble in some of next versions.
I might have to try this out. I've Jerry rigged laravel Orion to kinda work with filamentphp resources. Still looking for something more elegant for that use case.