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

Support basic logic in nested schemas #231

Open
scharrier opened this issue Feb 10, 2020 · 0 comments · May be fixed by #245
Open

Support basic logic in nested schemas #231

scharrier opened this issue Feb 10, 2020 · 0 comments · May be fixed by #245
Labels
Milestone

Comments

@scharrier
Copy link

@scharrier scharrier commented Feb 10, 2020

As we can add logic with predicates, it could be really useful to be able to add some logic for nested schemas, at least to be able to support OR and AND.

Examples

Operation = Dry::Schema.Params do
  required(:parameters).each { ParameterSchema | ReferenceSchema }
end

To support this:

parameters:
- name: Hello # Valid (ParameterSchema)
  description: World
- $ref: /somewhere #Valid (ReferenceSchema)
- 123 # Invalid

Resources

Discussed here: https://discourse.dry-rb.org/t/nested-schemas-logic-do-a-or-between-2-nested-schemas/1000

@scharrier scharrier added the feature label Feb 10, 2020
@solnic solnic linked a pull request that will close this issue Feb 19, 2020
9 of 9 tasks complete
@solnic solnic added this to the 1.5.0 milestone Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.