Issues Converting Schema to JsonSchema with Custom Annotations
effecter I'm currently facing an issue related to the schema package and I'm hoping someone could provide some guidance.
Here's a brief overview of my requirements:
1. I need to convert an existing
schema to a JsonSchema.2. I want to preserve existing custom annotations during this conversion.
The problem I'm encountering is that while converting schema primitives such as
Schema.String or Schema.Number with custom annotations to JsonSchema everything works perfectly, whereas the conversion of custom schema types or composed ones seems to strip away my custom annotations.To illustrate my issue, here are some code snippets:
I expect the schema defined by
S.compose(S.Trim, S.NonEmpty).annotations({/* ...custom annotation */ }) to respect my custom annotations. However, this is not the case.