Response model for GET in HttpServiceApiWrapper pattern

Created on 31 July 2024, 4 months ago

This isn't a bug. It's an observation, and it confuses me. It's also an acknowledgment that I may just not know what's going on.

In a previous custom plugin I put together using yours as a foundation, I took a simple, naive approach, and basically set up different services for each endpoint.

In a more recent one, I decided to employ the wrapper pattern that you document and demonstrate in example code. It works... POST and GET do their thing, and it's all good.

But there does some to be a weirdness. The response model (the model class referred to by responseClass in the operations portion of the yaml description) does what I expect if the operation is a POST. The actual response is larger than I care about, so I limit the model properties to those I'm interested in, and those are what ultimately get returned by return $this->callByRequest($request). But if the operation is a GET, the limit appears to be ignored... I get the whole response array. This really isn't a problem, but I do find it odd.

And like I say, I may just completely misunderstand something here. Any guidance or thought on your part is greatly appreciated.

πŸ’¬ Support request
Status

Active

Version

10.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States datawench

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024