Skip to content

Handling of "categories" option in "with" parameter #4

@MichailGlazkov

Description

@MichailGlazkov

Endpoint: https://scayle.dev/en/api-guides/storefront-api/resources/products/list-products
Called via: https://mvnrepository.com/artifact/com.scayle.storefrontapi/StorefrontClient/1.136.1

When Parmeter with=categories then the endoint return exception:

Error collect products: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 4023 path $.entities[0].categories[0]
See https://github.com/google/gson/blob/main/Troubleshooting.md#unexpected-json-structure

JSON Sceme from this endpoint expect 2 dimensional array for categories, this is returned by the API, but the object in the JAVA SDK expect 1 dimensional array for categories -> com.scayle.storefrontapi.model.Product

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions