Support for Either
See original GitHub issuehi.
Would like to be able present a type of Either[Dog,Cat]
(or in clojure (either Dog, Cat, Moose)
in the Spec. Quite common construct in the FP land. Would be like a enum, but with values of any type.
Currently such a thing could be presented as a complex type with optional fields for all the value => at least the swagger-ui would be able to generate sample models (with all possible alternatives in place) for it. Not perfect, but ~works. Requires also special coercion in the server side to map back into Either.
http://www.scala-lang.org/api/2.11.0/index.html#scala.util.Either
https://github.com/Prismatic/schema/blob/master/test/cljx/schema/core_test.cljx#L194-L203
Issue Analytics
- State:
- Created 9 years ago
- Reactions:10
- Comments:50 (24 by maintainers)
Top Results From Across the Web
support either | English examples in context - Ludwig
High quality example sentences with “support either” in context from reliable sources - Ludwig is the linguistic search engine that helps you to...
Read more >I'll support you either way definition - Reverso Dictionary
athletic support · n · a more formal term for · → jockstrap.
Read more >support | LDOCE - Longman Dictionary of Contemporary English
support somebody by (doing) something She supports her family by teaching evening classes.support yourself I have no idea how I am going to...
Read more >Extracorporeal Life Support for Cardiogenic Shock With Either ...
Extracorporeal Life Support for Cardiogenic Shock With Either a Percutaneous Ventricular Assist Device or an Intra-Aortic Balloon Pump.
Read more >Support by either parent; hospital, funeral, and legal expenses ...
2013 Maryland Code FAMILY LAW § 5-1033 - Support by either parent; hospital, funeral, and legal expenses. Universal Citation: MD Fam L ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
Top Related Hashnode Post
No results found
allOf
,oneOf
,not
will be supported in 3.0 spec. Approval by @OAI/tdc in comments, implementation details will be in this PR:https://github.com/OAI/OpenAPI-Specification/pull/741
@webron
This is the most ridiculous explanation I could possibly imagine about not supporting
oneOf
😳