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

Rules API RuleRequest typing is wrong #56

Closed
jimmyfortinx opened this issue Aug 15, 2020 · 1 comment
Closed

Rules API RuleRequest typing is wrong #56

jimmyfortinx opened this issue Aug 15, 2020 · 1 comment

Comments

@jimmyfortinx
Copy link

I used this project with Typescript to create a new rule and typing is misleading us on the data structure.

For example: greaterThan should be greater_than and _else should be else

When I follow the typing I receive this from the server:

{"code":"BodyMalformedError","target":"greaterThan","message":"Unknown field on line 1","details":[]}]}

If you don't want to use the same name convention on JS side, you should at least process the data to remap them.

@bflorian
Copy link
Contributor

bflorian commented Sep 9, 2020

@jimmyfortinx this issue was actually a case of the SDK types being changed earlier than the platform change. That platform change has now been deployed and existing rules migrated. Both the API and SDK should be consistent now -- the value should be greaterThan not greater_than.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants