Skip to content

Add support for extra_format_unmarshallers #231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
claeyswo opened this issue Mar 27, 2024 · 3 comments
Closed

Add support for extra_format_unmarshallers #231

claeyswo opened this issue Mar 27, 2024 · 3 comments

Comments

@claeyswo
Copy link
Contributor

There is already support for extra_format_validators and extra_media_type_deserializers:

Is it possible to add similar support for extra_format_unmarshallers?

https://github.com/python-openapi/openapi-core/blob/32ce65739531eea90220aeabbee72096818b9d05/openapi_core/unmarshalling/request/unmarshallers.py#L121

For now we are doing it like this:

   config.registry.settings["pyramid_openapi3"][
        "request_validator"
    ].extra_format_unmarshallers = {"search_filter": unmarshal_search_filter}
    config.registry.settings["pyramid_openapi3"][
        "response_validator"
    ].extra_format_unmarshallers = {"search_filter": unmarshal_search_filter}
@zupo
Copy link
Collaborator

zupo commented Mar 27, 2024

This makes sense. Can you prepare a Pull Request with the required changes?

@claeyswo
Copy link
Contributor Author

Sure, while implementing the change I discovered what I believe is a bug in openapi-core so I'm waiting for a fix for that.
python-openapi/openapi-core#821

claeyswo added a commit to claeyswo/pyramid_openapi3 that referenced this issue Apr 12, 2024
@claeyswo
Copy link
Contributor Author

PR is ready: #235

claeyswo added a commit to claeyswo/pyramid_openapi3 that referenced this issue Apr 15, 2024
@zupo zupo closed this as completed in c1aec22 Apr 15, 2024
zupo pushed a commit that referenced this issue Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants