0

I've been looking at the FOS-Rest-Bundle documentation in order to develop an API of mine. The problem is that I would like the API to be under api/ and there doesn't seem to be any option to achieve this.

Is there a way? how would I do this?

Thanks

1 Answer 1

3

You can add a prefix in your routing. See http://symfony.com/doc/current/book/routing.html#prefixing-imported-routes

For example :

api_rest:
    type: rest
    prefix: /api
    resource: "@MyBundle/Resources/config/rest_routes.yml"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.