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
According to the typings of the assetImageDimensions field on IValidation the values for width.min, width.max, height.min and height.max are either are number or undefined.
Actual Behavior
When running the contentful space generate migration command, the generated values for the assetImageDimensions fields are can be null when you have not configured them in the UI:
Either adjust the typings if the behaviour of the command is correct, or adjust the functionality to not have null values but leave them out (undefined).
Adjust typings
export interface IValidation {
...
/** Validates that an image asset is of a certain image dimension. */
assetImageDimensions?: { width: { min?: number | null , max?: number | null }, height: { min?: number | null , max?: number | null } }
...
}
Expected Behavior
According to the typings of the
assetImageDimensions
field onIValidation
the values forwidth.min
,width.max
,height.min
andheight.max
are either are number or undefined.Actual Behavior
When running the
contentful space generate migration
command, the generated values for theassetImageDimensions
fields are can be null when you have not configured them in the UI:Generated validations function:
Possible Solution
Either adjust the typings if the behaviour of the command is correct, or adjust the functionality to not have null values but leave them out (undefined).
Adjust typings
Or make sure the output is:
Steps to Reproduce
Accept only specified image dimensions
, only set a rule forwidth
ofatleast 200px
yarn run ts-node node_modules/.bin/contentful space generate migration -s XXX -e XXX -c XXX
Result:
The text was updated successfully, but these errors were encountered: