myparcelnl / js-sdk

JavaScript SDK to connect to the MyParcel API via Node.js or browser
MIT License
1 stars 1 forks source link

Allow path variables to be optional #7

Closed EdieLemoine closed 2 years ago

EdieLemoine commented 2 years ago

What problem does this feature solve?

Currently, when providing a path in an endpoint like /carriers/:carrier, all path variables (:carrier) are required. But this isn't the case with all endpoints.

For example: /external_integration_provider_credentials/:name/:version would not be able to be added correctly as :version is optional but the SDK will treat it as required.

What should the solution look like?

A syntax like the following:

/external_integration_provider_credentials/:name/:version?

Should mean that :name is required, but :version is optional. SDK should not throw errors when :version is not passed.

Relevant log output

No response

Additional context

No response

MyParcelBot commented 2 years ago

:tada: This issue has been resolved in version 2.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: