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
I assumed then, that I need to set those params in the DTO itself like this:
dto['page_number'] = 0
dto['page_size'] = 100
But that didn't work. Then I noticed when actually connecting to the web UI which implements an Angular-based client for browsers that it passes page and size. So I change the above to be"
dto['page'] = 0
dto['size'] = 100
and that works. I can now iterate dto['page'] until I don't get any more results. My big question now is, WHY when the spec says PageSize and PageNumber and the generated client code uses page_size and page_number, do I have to actually use page and size ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I built a client for an internal API, and the generated code I get back looks like this:
Since "pageable" is a DTO object of type Pageable, which seems to support the following:
In the "pageable.py" model generated by openapi-python-client, those seem to be translated to:
I assumed then, that I need to set those params in the DTO itself like this:
But that didn't work. Then I noticed when actually connecting to the web UI which implements an Angular-based client for browsers that it passes
page
andsize
. So I change the above to be"and that works. I can now iterate
dto['page']
until I don't get any more results. My big question now is, WHY when the spec saysPageSize
andPageNumber
and the generated client code usespage_size
andpage_number
, do I have to actually usepage
andsize
?Thanks.
Paul
Beta Was this translation helpful? Give feedback.
All reactions