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
| local_dict | Template | dict | Holds variables for the `local` template |
137
-
| template | Template | protobuf_to_pydantic.template.Template | Implementation of the template class |
138
-
| comment_prefix | Template | str | Comment prefix.Only strings with a fixed prefix will be used by the template |
139
-
| parse_comment | comment(plugin only) | bool | If true, the annotation rule is compatible |
140
-
| customer_import_set | Code generation |`Set[str]`| A collection of custom import statements, such as `from typing import Set`or `import typing`, that will write data in order to the source code file |
141
-
| customer_deque | Code generation |`deque[str]`| Custom source file content, used to add custom content |
142
-
| module_path | str | str | Used to define the root path of the project or module, which helps `protobuf-to-pydantic`to better automatically generate module import statements |
143
-
| pyproject_file_path | Code generation | str | Define the pyproject file path, which defaults to the current project path |
144
-
| code_indent | Code generation | int | Defines the number of indentation Spaces in the code; the default is 4 |
145
-
| ignore_pkg_list | Code generation(plugin only) |`list[str]`| Definition ignores parsing of the specified package file |
146
-
| base_model_class | Model Code generation, Code generation |`Type[BaseModel]`| Define the parent class of the generated Model |
| local_dict | Template | dict | Holds variables for the `local` template |
137
+
| template | Template | protobuf_to_pydantic.template.Template | Implementation of the template class |
138
+
| comment_prefix | Template | str | Comment prefix.Only strings with a fixed prefix will be used by the template |
139
+
| parse_comment | comment(plugin only) | bool | If true, the annotation rule is compatible |
140
+
| comment_handler| comment(plugin only) | Callable[[str, str, FieldInfo], FieldInfo]| Custom comment handler, Used to process parameter validation rules in comment, When using this configuration, the configuration parameters `comment_prefix` and `parse_comment` will not take effect, See[custom_comment_handler_pkg_plugin_config.py](https://github.com/so1n/protobuf_to_pydantic/blob/master/example/custom_comment_handler_pkg_plugin_config.py)|
141
+
| customer_import_set | Code generation |`Set[str]`| A collection of custom import statements, such as `from typing import Set`or `import typing`, that will write data in order to the source code file |
142
+
| customer_deque | Code generation |`deque[str]`| Custom source file content, used to add custom content |
143
+
| module_path | str | str | Used to define the root path of the project or module, which helps `protobuf-to-pydantic`to better automatically generate module import statements |
144
+
| pyproject_file_path | Code generation | str | Define the pyproject file path, which defaults to the current project path |
145
+
| code_indent | Code generation | int | Defines the number of indentation Spaces in the code; the default is 4 |
146
+
| ignore_pkg_list | Code generation(plugin only) |`list[str]`| Definition ignores parsing of the specified package file |
147
+
| base_model_class | Model Code generation, Code generation |`Type[BaseModel]`| Define the parent class of the generated Model |
| pkg_config | Code generation(plugin only) |`Dict[str, "ConfigModel"]`| Adapt the corresponding configuration for each PKG |
151
152
152
153
> Note:
153
154
> - 1:For more information, see the configuration instructions[/protobuf_to_pydantic/plugin/config.py](https://github.com/so1n/protobuf_to_pydantic/blob/master/protobuf_to_pydantic/plugin/config.py)
0 commit comments