You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/complex_types.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -401,16 +401,18 @@ User.avro_schema()
401
401
402
402
#### Class Meta
403
403
404
-
The `class Meta` is used to specify schema attributes that are not represented by the class fields like `namespace`, `aliases` and whether to include the `schema documentation`. One can also provide a custom schema name (the default is the class' name) via `schema_name` attribute.
404
+
The `class Meta` is used to specify schema attributes that are not represented by the class fields like `namespace`, `aliases` and whether to include the `schema documentation`. One can also provide a custom schema name (the default is the class' name) via `schema_name` attribute and `alias_nested_items` when you have nested items and you want to use custom naming for them.
405
405
406
406
```python
407
407
classMeta:
408
408
schema_name ="Name other than the class name"
409
409
schema_doc =False
410
410
namespace ="test.com.ar/user/v1"
411
411
aliases = ["User", "My favorite User"]
412
+
alias_nested_items = {"address": "Address"}
412
413
```
413
414
414
415
`schema_doc (boolean)`: Whether include the `schema documentation` generated from `docstrings`. Default `True`
If you want, also you can use custom name for nested items (`nested records`, `arrays` or `maps`) using the property `alias_nested_items` in `class Meta`:
0 commit comments