Skip to content
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

Pydantic generator does not include associations nor inheritance #221

Open
jcabot opened this issue Feb 6, 2025 · 0 comments
Open

Pydantic generator does not include associations nor inheritance #221

jcabot opened this issue Feb 6, 2025 · 0 comments
Labels
bug Something isn't working code generator

Comments

@jcabot
Copy link
Collaborator

jcabot commented Feb 6, 2025

Describe the bug

If I generate pydantic classes from a class diagram, associations are not considered (i.e. no attribute is added to manage the association in any of thec classes)

Expected behavior

Attributes to manage the association should be part of the generation

Same for inheritance relationships

Screenshots

This model

Image

Generates this code

############################################

Classes are defined here

############################################
class Employee(BaseModel):
id: int
salary: int
id: int # id created

class Department(Unit):
name: str
id: int # id created

class Unit(BaseModel):
size: int
id: int # id created

@jcabot jcabot added bug Something isn't working code generator labels Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code generator
Projects
None yet
Development

No branches or pull requests

1 participant