Skip to content

Better way for adding custom serializers #164

Closed
@berislavlopac

Description

@berislavlopac

At the moment, I managed to add custom mimetype serializers by patching the MEDIA_TYPE_DESERIALIZERS dict, like this:

from openapi_core.schema.media_types.models import MEDIA_TYPE_DESERIALIZERS
import json

MEDIA_TYPE_DESERIALIZERS['application/my.api+json'] = json.loads

Am I missing a better way to do it, e.g. by passing it to the validator constructor or something? Thank you!

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