-
-
Notifications
You must be signed in to change notification settings - Fork 332
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
External File Annotations #622
Comments
I see your problem. Right now, there's no option for that, beyond /**
* ...
* @include_docs path/to/file
* ....
* / What would the structure of the external file be like though? |
Hi, the include_docs, could be a simple blade template file (HTML Support), but if it's more simple just text file or markdown. |
Taking a look at this; I can see benefits in that it also communicates to other devs. One problem though-is this one file per endpoint? I can see that getting out of hand pretty quickly. If it's multiple endpoints per file, it might then be difficult to manage/specify. |
Ok, maybe one file for Controller ? I understand that one file per endpoint could be in some large projects unmanaged, but I personally don't see this as deal breaker, maybe we can choose our way, one file per endpoint or per controller, it may be on a specific folder... And optional. I revisited some project with this package, and I have huge controller line s because of the documentation, even with parameters docs shifted to FormRequest files. If we can find a way to resolve this problem, our Controllers will be smaller and cleaner, and maintaining the docs will be clear and not a mess. And of course thank you for addressing this problem. |
That's the nature of software. As a consumer, you don't see the problem, because you see only your specific use case.🙂 Let's say one file per controller. One key problem with combining endpoints in one file is how do you identify and reference them? In practice, the implementation wouldn't be too hard, but as maintainer, I have to think about the design first, and how I can find a good balance for myself and consumers. For instance:
|
Posting an update here: this is not planned anymore, and you can achieve it yourself fairly easily, as described in |
I don't know if this is a question labelled issue or a feature request...
So, this is my problem : I have an extensive documentation API, my controllers are big because of the annotations
/** ... */
...used to create the documentation, is there a way to put the information of the annotation in a remote file to separate logic and be better maintained?
note: I already put the body and query parameters in the FormRequests classes to reduce the annotations lines in the controller...but for the custom blocks of text of every endpoint ... a simple controller with 3 or 4 methods... easily has more than +1000 lines.
Is there a way to put this annotation in other external files? and call dynamic something like:
The text was updated successfully, but these errors were encountered: