divolte / shop

Shop
1 stars 1 forks source link

Add yml file to configure the categories and keywords, fix 400 error codes when ingesting test data to Elastic #29

Closed basvdl closed 4 years ago

basvdl commented 5 years ago

The categories and keywords are now stored in a YML file, and can be passed into the download-category.py script. Extra debug line was added. The JSON is printed in case the the status code returned by the shop-api is NOT 200.

Add a fix to prevent invalid JSON been sent to the shop-api when ingesting test data to Elastic. The item class (CatalogItemResource.Item()), stated that tags had to be a list, this was not always the case.

Before, tags as string Summary: 8 times status code 400 22 times status code 200 1 times status code 500

...er", "tags": "flower"}, "siz...

After, tags as list Summary: 33 times status code 200 2 times status code 500

...er", "tags": ["flower"]}, "siz...