Closed satra closed 3 years ago
in pydantic a library we are using to generate the json schema, the representation of a const changed to its more general form enum. this seems to have broken our use of this component.
const
enum
here is an example of the change: https://github.com/dandi/schema/commit/7d24722deabe76c4686f8d6a751ceb2097aac13e#diff-2b869e87eb0354c3014f22d290a55905349288b3b0c5500c783e93c39dd87f7fL421
and here is the json schema reference for this:
https://json-schema.org/understanding-json-schema/reference/generic.html#constant-values
any thoughts on whether this is an easy fix, or cannot be supported would be much appreciated.
I think this could be supported. Probably by transforming the single item enum into a const expression in the schema pre-processing done here.
in pydantic a library we are using to generate the json schema, the representation of a
const
changed to its more general formenum
. this seems to have broken our use of this component.here is an example of the change: https://github.com/dandi/schema/commit/7d24722deabe76c4686f8d6a751ceb2097aac13e#diff-2b869e87eb0354c3014f22d290a55905349288b3b0c5500c783e93c39dd87f7fL421
and here is the json schema reference for this:
https://json-schema.org/understanding-json-schema/reference/generic.html#constant-values
any thoughts on whether this is an easy fix, or cannot be supported would be much appreciated.