You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating endpoints for webhooks, you typically need to have an endpoint that can support an array of different request schemas. And those schemas aren't necessarily defined by you, but the service you are accepting webhook requests from.
Currently, every resource defined needs to have properties else an exception is thrown during the property access for the resource.
Currently, to get around this issue, i've built a custom normalizer decorator for the swagger documentation normalizer and just merge in my own swagger definition for a custom endpoint, and then just use a standard SF controller with routing to provide the endpoint.
But I was thinking this is something API Platform might be able to support a little better by maybe providing a standard DataBagResource class or something, but i'm not entirely sure.
Either way, it was kind of a pain to dig through and find out how to extend the swagger docs to add custom paths to make sure the API was fully documented when I need to just use a standard SF controller. Hoping this ticket might lead to a discussion on a better way to do this, or at least to some documentation for the community.
The text was updated successfully, but these errors were encountered:
Allowing a swagger_context definition on a custom SF route like for the collection/item operation endpoints would probably suffice and be a clean solution.
When creating endpoints for webhooks, you typically need to have an endpoint that can support an array of different request schemas. And those schemas aren't necessarily defined by you, but the service you are accepting webhook requests from.
Currently, every resource defined needs to have properties else an exception is thrown during the property access for the resource.
Currently, to get around this issue, i've built a custom normalizer decorator for the swagger documentation normalizer and just merge in my own swagger definition for a custom endpoint, and then just use a standard SF controller with routing to provide the endpoint.
But I was thinking this is something API Platform might be able to support a little better by maybe providing a standard DataBagResource class or something, but i'm not entirely sure.
Either way, it was kind of a pain to dig through and find out how to extend the swagger docs to add custom paths to make sure the API was fully documented when I need to just use a standard SF controller. Hoping this ticket might lead to a discussion on a better way to do this, or at least to some documentation for the community.
The text was updated successfully, but these errors were encountered: