gocardless-nodejs icon indicating copy to clipboard operation
gocardless-nodejs copied to clipboard

Everything is now optional by default in v3.0.0

Open sambegin opened this issue 3 years ago • 1 comments

Moving to V3, everything is optional by default: https://github.com/gocardless/gocardless-nodejs/compare/v2.4.0...v3.0.0#files_bucket

Is there a reason for that? I feel like status , amount, currency perhaps? Can a big rework of typing be done so it 100% represents your documentation? For typescript developers, this is unfortunately hardly usable.

It's also gonna take me a long time to fix those in small bunch of PR like those : https://github.com/gocardless/gocardless-nodejs/pull/114 and you guys probably have the best knowledge to know what is required or not 💪

Thank you!

sambegin avatar May 18 '22 14:05 sambegin

Hi @sambegin ! Our types are generated from our schema, which marks certain fields as required. Before 3.0, all fields were wrongfully marked as required and 3.0 switched to defaulting to optional and only marking fields required only if specified by schema. I'll try to forward this question to the teams who are responsible for specific parts of the schema to see why some fields are not explicitly required while in practice they are.

szastupov avatar May 23 '22 10:05 szastupov