Core: [Question] Add exsisting route to Api-platform

Created on 19 Apr 2017  路  10Comments  路  Source: api-platform/core

Hi guys! I have existing route
(
for example api_ping that return only 200 status
@Route("/ping", name="api_ping")
) .

How i can add this route to api-platform's docs ?

Most helpful comment

Or you can decorate the api_platform.swagger.normalizer.documentation service.

All 10 comments

@meyerbaptiste thanks! But in all Issues, work with Entity and _api_resource_class , can i add route to docs without resourse_class?

I use my joker: ping @Simperfit aka Swagger killer

@fedotovaleksandr I don't see anything in the code the would prevent you from adding a custom operation to the docs. But, I think that any Operation needs to be associated to an @ApiResource to be detected as one ('_api_resource_class').

Or you can decorate the api_platform.swagger.normalizer.documentation service.

maybe an @ApiOperation would be something useful? this would allow to work operation centric

@backbone87 Hi my friend,thanks for reply! I can't find this annotation in ApiPlatformCoreAnnotation*
it's swagger annotation?

There are no such annotation yet @fedotovaleksandr

@soyuka Thanks .

I'm also very interested by this kind of annotation, which could be used to document routes that are not directly related to an entity. Sometimes you need a ping route or aggregation and it would be great to see it in Swagger view.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jsamouh picture jsamouh  路  28Comments

bastnic picture bastnic  路  64Comments

teohhanhui picture teohhanhui  路  40Comments

teohhanhui picture teohhanhui  路  34Comments

er1z picture er1z  路  28Comments