Reputation: 6913
I'm creating a RESTful API in Symfony2 using the FOSRestBundle, what I would like to do for each service is define each available attribute in an array so I can validate submitted data, and automatically create documentation for each service.
Here is what I'd like to be able to do for the documentation: - Display a list of all services - Display the list of all the available actions for each service (POST, PUT, etc) - Display the expected & response paramaters inside each service.
When the client hits a service the JSON should also be directly validated against the schema.
Has anyone had any experience with this, and if so could you please point me in the right direction?
Upvotes: 3
Views: 1868
Reputation: 7745
You can use the form and validation components to bind and validate the requests content, and use https://github.com/nelmio/NelmioApiDocBundle to generate the documentation (base on the forms).
Upvotes: 4