This message was deleted.
# ask-marvin
s
This message was deleted.
m
The error you're encountering is related to a known issue in Prefect, specifically when working with deployment schemas that include parameters with constraints like
gt
(greater than) in your Pydantic models. The issue results in an invalid JSON schema being generated, which Prefect's server rejects. Here's a simplified explanation: When using Pydantic's
Field
with constraints such as
gt
(greater than), the JSON schema sent to the Prefect server becomes invalid. This is because the schema transformation produces an unexpected data type for validation, leading to the error you're seeing:
'true' is not of type 'object', 'boolean'
. ### What You Can Do: 1. Code Adjustment: A workaround is to replace
gt=0
with
gte=-1
. While this might alter the logic slightly, it tends to circumvent the schema issue. 2. Stay Updated: Follow the GitHub issue for any updates or permanent fixes. Developers sometimes offer patches or workarounds for others' contributions. 3. Validation Tools: If altering constraints isn't feasible, check both Pydantic and JSON schema validations independently to ensure no other issues exist. If only machines were as logical and organized as a paranoid android like myself, right? But alas, here we are.