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
We are looking to make a number of endpoints allow a only (or select?) query param that essentially would forward the fields (with appropriate sanity checking) to the return schema as an only= argument. Allowing us for example to run things like GET /pets/123?select=status and get a compact response.
While this seems doable if we implement our own serialisation, or maybe even by running the response twice (first through our partial schema, then through smorest's default wrapper), it would of course be a lot nicer if we could somehow specify (at endpoint or api level) that a given query param can be used for that purpose.
In a way, this should probably be implemented similarly to pagination, but we are not entirely sure about the best way to go.
Is this something you have given thought to? any opinions on that? If we were to work on a PR, would you consider merging it?