Closed partiallyordered closed 1 year ago
@elnyry-sam-k @mdebarros I'd appreciate any feedback on this in principle, when you have a moment
hi Matt @partiallyordered , thanks for the PR..
The new feature will be very helpful, I'm sure; the swagger changes are ok.. Do the changes, for example number to string effect current implementations and if so will this be a breaking change?
Furthermore, a more naïve question: the change to the query params from the swagger - does this work with no additional implementation (than what's in the PR?)
Also @mdebarros - please review when you get a chance..
Do the changes, for example number to string effect current implementations
The changes to the actual API should be backward compatible. Because these are URL query parameters rather than object fields, and fundamentally URL query parameters are strings anyway, the only difference should be in what validation is performed. For example, the API should change from, e.g.
GET /settlements?accountId=2
to
GET /settlements?accountId=1,2,3
and if so will this be a breaking change?
I'll address this separately. As far as I can tell, the "multiple parameter" changes should be completely backwards-compatible. But the default values for from/to dates will result in some queries succeeding where they would not previously have done. Specifically the following invalid request:
GET /settlements
which is not currently valid because a request without query parameters is not valid, would become valid, by virtue of the default values. Thinking a bit more about this, it might be better to simply allow queries with no filters and remove these default date values because
Furthermore, a more naïve question: the change to the query params from the swagger - does this work with no additional implementation (than what's in the PR?)
I actually don't know; I'd be surprised if there isn't more to do, not least some actual meaningful tests. I thought I'd put this out there and get some feedback on the idea of it before putting a lot of effort into it. It's probably worth mentioning that this change would ideally be applied to the /settlementWindows
endpoint also; which I'll likely just do in this PR if it doesn't turn out to be too different to this.
Thanks for the response, Matt. please go ahead with this; like your idea about allowing queries without any filters in some cases..
Removed default date filters; did not remove enforcement of minimum number of query parameters.
does this work with no additional implementation (than what's in the PR?)
Turns out: yes; nothing else required.
does this work with no additional implementation (than what's in the PR?)
Turns out: yes; nothing else required.
Excellent !
Enable much better queries for settlements, for example: