postman-collection icon indicating copy to clipboard operation
postman-collection copied to clipboard

Update methods should have Partial<DefinitionType> type

Open ThePlenkov opened this issue 2 years ago • 0 comments

Hi!

When I call any update method like for example for request:

image

Typescript now asks me to provide all the fields, which is not the way you designed of course.

So intead of this line https://github.com/postmanlabs/postman-collection/blob/42c7416080e5f8a0ab76101e979afbd700304665/types/index.d.ts#L1910

i would suggest to have something like this

update(options: Partial<Request.definition>): void;

will solve the problem entirely.

However I'm not sure how you guys build this file, manually or with some tool too , that's why don't create MR yet.

Thanks!

ThePlenkov avatar Jun 23 '22 12:06 ThePlenkov