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

TASK : calls with no 'action' will auto return apidocs for that controller #17

Closed
orubel opened this issue Sep 22, 2022 · 2 comments
Closed

Comments

@orubel
Copy link
Collaborator

orubel commented Sep 22, 2022

so while RESTful advocates like /controller/? to map to CRUD rest calls, it is very limiting.

And to date I have just thrown an error with behaviour like this.

But what if I were to return the apidoc data for the entire controller if no action is sent?

Useful and better than nothing. Plus can help with create your api calls and api chaining.

@orubel
Copy link
Collaborator Author

orubel commented Sep 23, 2022

can forward to 'apidoc/show/id' where 'id' is controllerName

can overload apidoc/show (or just use apidoc/show with a passed variable and test to see if one was sent)

I may have to open up mapping to allow for this; right now mapping is only to controller/methods and everything else goes to ErrorController (thus limiting 'any phishing)

Could always add '/controller' as a antmatcher in the mapping

@orubel
Copy link
Collaborator Author

orubel commented Oct 4, 2022

got this working and tested. will be committing soon. closing out.

@orubel orubel closed this as completed Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant