Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Incorrect type of order property in FieldBase #889

Open
lo1tuma opened this issue Nov 1, 2023 · 0 comments
Open

Incorrect type of order property in FieldBase #889

lo1tuma opened this issue Nov 1, 2023 · 0 comments

Comments

@lo1tuma
Copy link

lo1tuma commented Nov 1, 2023

The order property in the type definition of FieldBase is marked as a required property which must be a number. In the API documentation it is marked as optional. As for the Create method changing the type to be optional would be sufficient, but for the Get* endpoints it must be number | null as it turns out the property is always there but set the null if the value is not set. This is also not documented in the API documention. In fact, the API documentation explains only the fields for the Create endpoint and for all other endpoints only examples are given without clear specification.

In any case, I think this means that the Field type cannot simply extend from FieldBase as the type of the order property is different depending on its context (Create vs Get).

I haven’t looked deeply into the other properties yet, but since FieldBase marks all properties as required right now, I guess a few others are also incorrect as validation_rules for example is also marked as optional in the API but not in the sdk.

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

No branches or pull requests

1 participant