dingo / api

A RESTful API package for the Laravel and Lumen frameworks.
BSD 3-Clause "New" or "Revised" License
9.32k stars 1.25k forks source link

Blueprint generate docs from route file annotations #1701

Open webwisejordan opened 4 years ago

webwisejordan commented 4 years ago
Q A
Bug? no
New Feature? no
Framework Lumen
Framework version 6.2
Package version 2.4
PHP version 7.2

Description

My API needs to support both REST and GraphQL, so I have two controllers - a gql controller where the /graphql endpoint directs to and a rest controller where everything else does. The purpose of these two controllers is to convert the incoming request into a generic request before forwarding to the service layer, and to convert the result back into the appropriate format in the response.

Therefore, I don't have controllers defined for each database entity with API interaction details annotated as in the example - instead I have them all in the rest routes file. Previously (on Lumen 5.6/Dingo 2.0.0-alpha1), this worked just fine. After updating to Lumen 6.2/Dingo 2.4, this no longer functions, and I get an output file with only the name/format.

Is there anyway to have blueprint scan the route file for annotations (it doesn't need to care about the routes or anything else, paths/etc. are all defined in the annotations themselves) instead of the entire collection of application controllers?

Thank you for any insight

specialtactics commented 4 years ago

Hi

I am not sure how the doc generation work, and to be honest what you are describing is a very specific use case. Unfortunately the person who originally wrote them is not longer around.