You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.
I've encountered an issue when fetching components via the API. These components often include numerous empty properties, which ideally should not be defined at all (i.e., should be undefined) if they have no value assigned.
Example:
When fetching a component, I receive a JSON response with many properties that are either empty strings or default false values. Here's an example of such a response:
A key concern is with properties like validate.maxWords. In this example, it's an empty string (""), but its type should be number. Since no value is specified for maxWords, it should not be defined as a property or, at the very least, should be null. The presence of these empty or unnecessary properties complicates data handling and parsing on the client side.
Expected Behavior:
Ideally, if a property like maxWords in the validate object, or similar properties, are not set or have no value, they should either be:
Completely omitted from the response, or
Set to null instead of being an empty string or a default false value.
This would streamline the data structure and make it more predictable and easier to work with.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've encountered an issue when fetching components via the API. These components often include numerous empty properties, which ideally should not be defined at all (i.e., should be undefined) if they have no value assigned.
Example:
When fetching a component, I receive a JSON response with many properties that are either empty strings or default false values. Here's an example of such a response:
Specific Concern:
A key concern is with properties like
validate.maxWords
. In this example, it's an empty string (""), but its type should be number. Since no value is specified formaxWords
, it should not be defined as a property or, at the very least, should be null. The presence of these empty or unnecessary properties complicates data handling and parsing on the client side.Expected Behavior:
Ideally, if a property like
maxWords
in the validate object, or similar properties, are not set or have no value, they should either be:null
instead of being an empty string or a default false value.This would streamline the data structure and make it more predictable and easier to work with.
The text was updated successfully, but these errors were encountered: