New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible regression of __modify_schema__ for enum fields #1576
Labels
bug V1
Bug related to Pydantic V1.X
Comments
therefromhere
added a commit
to therefromhere/pydantic
that referenced
this issue
May 31, 2020
4 tasks
therefromhere
added a commit
to therefromhere/pydantic
that referenced
this issue
May 31, 2020
I'm confused, is this the same or linked to #1552? |
No, I think it's unrelated.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug
A side-effect of #1432 is that
__modify_schema__
on enum subclasses is still affecting the field schema, rather than the enumeration schema.I'd like it if
__modify_schema__
applied to the resulting enum model. Does that seem reasonable?In my use case I'm subclassing enum to add a
tsEnumNames
property, so that I could generate proper typescript enums from the resulting Json schema (using json-schema-to-typescript - see bcherny/json-schema-to-typescript#15 ).Using latest master 2eb62a3 (or d560c57 from #1562)
Outputs:
vs with pydantic 1.5.1:
I'd like to get this instead:
The text was updated successfully, but these errors were encountered: