Core: Non-RESTful endpoint ?

Created on 12 Apr 2018  路  7Comments  路  Source: api-platform/core

Is there a way to handle non-RESTful custom endpoint into api-platform ?
I have to setup a custom endpoint which needs to return multiple resource classes.

question

All 7 comments

Just use a symfony route + controller ?

Or, leverage a DTO class that defines your multiple resource classes so that ApiPlatform can serialize the stuff. Then add a custom operation and redefine items/collections.

Thanks, will try that.

how we can combine api-platform swagger with these symfony route + controller definitions?

@dunglas there is a chance to combine api-platform swagger and nelmio api doc swagger into one documentation endpoint?

Yes, when configured properly, Nelmio will import the API Platform description automatically.

Was this page helpful?
0 / 5 - 0 ratings