mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
json schema ref field names proper
This commit is contained in:
@@ -148,7 +148,7 @@ def get_schema_property_json(field_name: str, inner_schema_field: Dict[str, Any]
|
||||
# Support for references.
|
||||
if is_reference:
|
||||
# Add the reference.
|
||||
ref = ref_template.format(model=normalize_name(field_name))
|
||||
ref = ref_template.format(model=normalize_name(inner_schema_field['schema']['cls'].__name__))
|
||||
if ref_prefix:
|
||||
ref = ref_prefix + ref
|
||||
properties = {'$ref': ref}
|
||||
|
||||
Reference in New Issue
Block a user