Replies: 2 comments
-
Hi @samuelru, Thanks for the feedback. I already though a little about OpenAPI specification for non standard operations (these with custom OperationHandler) but it becomes pretty complex thing. It is definitely not on our roadmap and I guess won't be there in nearest future. Of course it would be great if you could help with that but I'm not sure if I understand your idea with "listOperations". IMO it's not only about the list but all custom responses from operation handlers. For me most important is to decide where definition of the documentation will be kept (on endpoints definition in entity, on operation handler class or completely separate place or maybe other idea). We would need to think about pros and cons of each of these places before we proceed with this issue. To make it easier to learn t3api in a lot of places we are trying to follow configuration definition from ApiPlatform. I think we should do the same also regarding OpenAPI so ApiPlatform's documentation about cusomization is probably best point to start from. |
Beta Was this translation helpful? Give feedback.
-
@samuelru I am moving this issue to Discussions, to Ideas section. |
Beta Was this translation helpful? Give feedback.
-
I really appreciate your library as it provides an easy way to define an API with Swagger definition for paged return types (Hydra) and individual entries. Nevertheless, it would be very helpful to have also a simple list as return type. It is already possible to achieve this by simply returning an array in the OperationHandler, but it is not possible to define the corresponding ApiResource to get the correct Swagger definition (without paging attributes and the correct return type). For example, such an ApiResource could be called "listOperations".
My question now is, would it be in your interest to add this function to your library? If it is possible I would be willing to help as well.
Beta Was this translation helpful? Give feedback.
All reactions