Skip to content

Commit

Permalink
eng: fix forward type reference in Pydantic schemas BNCH-112697 (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-bl authored Dec 2, 2024
1 parent 444155a commit b758daa
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ class Header(Parameter):
]
},
)


# Calling model_rebuild() here helps Pydantic to resolve the forward references that were used
# in defining Parameter and Encoding. Without this call, any subtle change to the loading order
# of schema submodules could result in an error like "Parameter is not fully defined".
# See: https://docs.pydantic.dev/latest/concepts/models/#rebuilding-model-schema
Parameter.model_rebuild()

0 comments on commit b758daa

Please sign in to comment.