amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
580 stars 730 forks source link

Required Order Address Name Property Causing Failing Object Serialization #211

Closed georanma closed 4 months ago

georanma commented 2 years ago

Issue

https://github.com/amzn/selling-partner-api-models/blob/f208226f6a73d1ef332d5b4e0839dc9b17f4a93d/models/orders-api-model/ordersV0.json#L2467-L2469

When OpenAPI Generator parses the above schema line it documents the return type as string, but a customer address will likely not have a name. If a developer user then tries to serialize the object for the address, the auto generated php will throw a type error due to it expecting type string, and getting type null.

**A reproducible test case or series of steps**

Request an order's details, and then try and serialize the full object with php.

Related to

https://github.com/amazon-php/sp-api-sdk/pull/118

Remediation

Update the Name property to optional for the Address Definition.

georanma commented 2 years ago

PR opened at https://github.com/amzn/selling-partner-api-models/pull/212

georanma commented 1 year ago

Anyone going to look at this?

github-actions[bot] commented 4 months ago

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.

github-actions[bot] commented 4 months ago

closed for inactivity