Skip to content

[Serializer] allow more default context configuration via yaml #33420

Closed
@rimas-kudelis

Description

@rimas-kudelis

Description
Serializer context may have numerous keys, but only a handful are configurable via yaml:

    # serializer configuration
    serializer:
        enabled:              true
        enable_annotations:   true
        name_converter:       ~
        circular_reference_handler: ~
        max_depth_handler:    ~
        mapping:
            paths:                []

It would be nice if other options were supported. In particular, I find it quite inconvenient that while I can configure max_depth_handler via yaml config, I cannot enable_max_depth that same way. Without the latter, the former appears to me hardly useful.

Example

    # serializer configuration
    serializer:
        enabled:              true
        enable_annotations:   true
        enable_max_depth:     true
        (...other options?..)
        name_converter:       ~
        circular_reference_handler: ~
        max_depth_handler:    ~
        mapping:
            paths:                []

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions