-
Notifications
You must be signed in to change notification settings - Fork 86
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
Api Documentation for routes #16
Comments
Hey, @Thavarajan |
Hi @Thavarajan, Thank you ~ If this is something that developers would want to have, then yes, sure. But until there is no demand for that feature - no. I will keep this issue open to see, if more developers need this. |
I'm currently using orion with https://github.com/knuckleswtf/scribe which also generates an open API file which can be openend in any swagger ui instance. It also provides a postman collection. |
@okaufmann I don't quite get it how you manage to write API documentation for individual endpoints which are all provided by Orion. As I understood Scribe, it just parses annotations - but where to put them? Or do you manually edit the Scribe generated OpenAPI file prior to feeding it into Swagger? pls explain in more detail. @alexzarbn I am definitely interested. That's a must for our project as we want to offer the full backend API to our customers (via Sanctum tokens), so it must get documented. This was the first thing I was worried about when I stumbled upon your great project: "wow, so much magic behind the scenes, great! But how could I generate an API documentation from this?". I did not start yet with Orion but would definitely like to use it once I find a solution for this. |
Hello, Laravel-Orion is awesome. |
If it's done trust me, this is going to be a favourite of most for the API developers |
The solution to this is:
check through config in Edit: I read to late its already being worked on by the devs? Then that is most likley worth waiting for. :) |
The feature is now available as part of the v2.0 release 🎉 |
Hi thanks for your hard work after updating from version 1 to 2 completely when i run the command and i have another question is this package compatible with nwidart laravel module? |
Hi @alireza2281, Could you please check, if you are running v2.0.0 or v2.0.1? The later one contains a fix for the missing search method. As for the compatibility with nwidart - not sure, haven't tested that. As long as the controllers and routes are defined correctly, I think it should work - it is not different from the standard resource routes implementation that Laravel has out-of-the box. |
Yeah it's on v2.0.1. if you need more information, tell me to comment for you |
|
I am using nwidart and i have multiple modules and multiple about namespaces, yes i have a controllers namespace per module i create. for example one of my
` |
I had the same problem in my case it was due to the controllers namespace @alireza2281 test with the following changes:
protected function resolveRoute(string $controller, string $operationName): Route
{
$prefix = '\\';
if (strpos($controller, $prefix) === 0) {
$controller = substr($controller, strlen($prefix));
}
return $this->router->getRoutes()->getByAction("{$controller}@{$operationName}");
}
return [
'namespaces' => [
'models' => 'App\\Models\\',
'controllers' => '', \\ <= Change here
], |
I have created a dedicated issue for this, let's continue the discussion there. Could you please let me know the Laravel version you are using? |
A awesome tool pack for API, do you have any plan to implement API documentation like (swagger)
The text was updated successfully, but these errors were encountered: