Skip to content
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

Add API Blueprint exclude option #1113

Open
frthjf opened this issue Jul 10, 2016 · 2 comments
Open

Add API Blueprint exclude option #1113

frthjf opened this issue Jul 10, 2016 · 2 comments

Comments

@frthjf
Copy link

frthjf commented Jul 10, 2016

I think it would be helpful, if you could exclude Api Controllers from the documentation through some directive, maybe @Ignore.

@hskrasek
Copy link
Member

@dudheit Could be useful, wouldn't you want to document all of your API Endpoints though?

@frthjf
Copy link
Author

frthjf commented Aug 18, 2016

Eventually yes. However, I was facing the following situation:
I developed an API for an intranet application with serveral controllers to manipulate different resources. The API included a UsersController as well, which allowed to adminstrate the users of the application.
However, this user API endpoint was for an external application only. So the users were managed in a different application, which then updated the users information through the intranet app API accordingly. Therefore, the UserController was protected by a special middleware.
When I tried to generate the API docs, Dingo threw an exception as it couldn't access the controller function.
Now what I did was commenting out the middleware in order to generate the API docs for the actual intranet application and that made me thinking whether an ignore option would be a better option.
Maybe, on the other hand, it might be a better idea to let Dingo deal with protected endpoints, I am not sure.

So just provide some details: Auth::guard('api')->user()->id invoked a Trying to get property of non-object exception, stopping the docs generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants