Issue with `S.optionalWith()` and OpenAPI Spec Examples
Hi everyone, I'm using
I'd expect
Is there a way to define examples as encoded instances? (which I believe would make more sense for this use case as examples are examples of what the user of my API should send, and ultimately are encoded strings in my api spec/docs?).
Or any workaround I did not think of?
Link to repro : https://effect.website/play/#7d2dc1e7a310
S.optionalWith() in a nested schema prop of a POST request body schema. I then generate an OpenAPI spec with examples, descriptions, and serve my api with HttpApi. I'm facing this issue with the examples annotation. I'd expect
someOptionalField to be optional in the examples array element, but it's not. I think I understand why : I guess it's because examples array elements are decoded instances of my schema. But still, practically I have a hard time finding a good workaround. Is there a way to define examples as encoded instances? (which I believe would make more sense for this use case as examples are examples of what the user of my API should send, and ultimately are encoded strings in my api spec/docs?).
Or any workaround I did not think of?
Link to repro : https://effect.website/play/#7d2dc1e7a310

