Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some numeric values don't match with VSF API json schema #1

Closed
mtarld opened this issue Mar 5, 2019 · 2 comments
Closed

Some numeric values don't match with VSF API json schema #1

mtarld opened this issue Mar 5, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@mtarld
Copy link
Collaborator

mtarld commented Mar 5, 2019

In Magento1 vsBridge, json response is created using json_encode with JSON_NUMERIC_CHECK flag.
I guess it's to have all ids in an integer format.

But, it creates some unexpected behaviors:

  • cartId: Magento1 (contrary to Magento2), has integer values for cartId. but src/models/order.schema.json from vuestorefront-api defines it as string. Therefore, the schema cannot be validated
  • Shipping addresses: postcode and telephone are converted to integer but again, the schema requires them as strings

It's possible to have same bugs elsewhere in magento1 vsBridge (i didn't tested everything)

@mtarld mtarld added the bug Something isn't working label Mar 5, 2019
@mtarld
Copy link
Collaborator Author

mtarld commented Mar 5, 2019

I began writing a workaround there: commit
But I still do not know if it's the best solution

@mtarld
Copy link
Collaborator Author

mtarld commented Mar 14, 2019

Issue will be resolved here: DivanteLtd/magento1-vsbridge#24

@mtarld mtarld closed this as completed Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant