walmart-api-php
walmart-api-php copied to clipboard
customize-schemas.php is not idempotent
Running customize-schemas.php
multiple times results in further modifications of the schemas.
There's three issues:
- Security information is stripped away, as it doesn't take existing data into account.
-
'x-expose-headers'
is added where as previously it's not included. This seems to be a bug due to it being stripped out when first run. - Additions are added multiple times (which results in invalid json due to duplicate parameters in orders.json)
I have fixes for the first two and I'll create a PR for these. I still need to figure out how to resolve the addition issue.
An alternative approach is to download the original schemas to a different directory and then have the customize-schemas.php
write out the schemas to new files.