Skip to content
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

Fix cast x-validate when decoded schema #647

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

GPrimola
Copy link
Contributor

Addresses #646

do: module.cast(ctx)

def cast(%__MODULE__{schema: %{"x-validate": module}} = ctx) when is_binary(module),
do: module |> Elixir.String.split(".") |> Module.concat() |> apply(:cast, [ctx])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix this warning, otherwise LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zorbash pinging you case you don't get the workflow approval notification :)

@zorbash zorbash merged commit 620c57e into open-api-spex:master Dec 16, 2024
8 checks passed
nathanalderson pushed a commit to Tango-Tango/open_api_spex that referenced this pull request Dec 20, 2024
* Fix cast x-validate when decoded schema

* fix credo complain when using apply/3

---------

Co-authored-by: Giorgio Torres <giorgio.torres@hpe.com>
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

Successfully merging this pull request may close these issues.

2 participants