@@ -21,9 +21,7 @@ InitPlugin
21
21
Init plugins can define dependencies, add route handlers, configure middleware, and much more!
22
22
23
23
Implementations of these plugins must define a single method:
24
-
25
24
:meth: `on_app_init(self, app_config: AppConfig) -> AppConfig: <litestar.plugins.InitPlugin.on_app_init> `
26
- ----------------------------------------------------------------------------------------------------------------
27
25
28
26
The method accepts and must return an :class: `AppConfig <litestar.config.app.AppConfig> ` instance, which can be modified
29
27
and is later used to instantiate the application.
@@ -57,14 +55,12 @@ that are otherwise unsupported by the framework.
57
55
58
56
Implementations of these plugins must define the following methods.
59
57
60
- :meth: `supports_type(self, field_definition: FieldDefinition) -> bool: <litestar.plugins.SerializationPluginProtocol> `
61
- ----------------------------------------------------------------------------------------------------------------------
58
+ 1. :meth: `supports_type(self, field_definition: FieldDefinition) -> bool: <litestar.plugins.SerializationPluginProtocol> `
62
59
63
60
The method takes a :class: `FieldDefinition <litestar.typing.FieldDefinition> ` instance as an argument and returns a :class: `bool `
64
61
indicating whether the plugin supports serialization for that type.
65
62
66
- :meth: `create_dto_for_type(self, field_definition: FieldDefinition) -> type[AbstractDTO]: <litestar.plugins.SerializationPluginProtocol.create_dto_for_type> `
67
- --------------------------------------------------------------------------------------------------------------------------------------------------------------
63
+ 2. :meth: `create_dto_for_type(self, field_definition: FieldDefinition) -> type[AbstractDTO]: <litestar.plugins.SerializationPluginProtocol.create_dto_for_type> `
68
64
69
65
This method accepts a :class: `FieldDefinition <litestar.typing.FieldDefinition> ` instance as an argument and must return a
70
66
:class: `AbstractDTO <litestar.dto.base_dto.AbstractDTO> ` implementation that can be used to serialize and deserialize
0 commit comments