Comments (4)
PR welcome
from autodocodec.
I do not understand this yet. So, typeField
parses to NSCheck
as long as type: "ns"
. But how can I make this parse to a different type when type
contains a different value? If this is not possible, I do not get the purpose of typeField
. Or is it just about ignoring the type field?
from autodocodec.
Is there any other workaround, e.g. defining separate objects for each type and manually handle the case if multiple types are specified at the same time?
type:
type1: value1
type2: value2
where only type1
or type2
may be specified but not both at the same time.
from autodocodec.
@m1-s See https://hackage.haskell.org/package/autodocodec-0.2.0.3/docs/Autodocodec.html#v:eitherCodec
and https://hackage.haskell.org/package/autodocodec-0.2.0.3/docs/Autodocodec.html#v:dimapCodec
from autodocodec.
Related Issues (20)
- UTCTime codec HOT 4
- Fails to build with aeson 2 HOT 2
- How to use `oneOf` instead of `anyOf` for `eitherCodec` HOT 5
- Multi-line defaults
- Incorrect openapi when using two `parseAlternative`s HOT 4
- Selective instance? HOT 1
- Sum type encoder in the README HOT 2
- Profunctor instance for `Codec` HOT 3
- `Void` codec? HOT 1
- Arbitrary input validates against `Void` schema HOT 12
- Need help with conditional fields HOT 1
- Error or warn on unknown fields HOT 5
- Make schema order match declaration order? HOT 4
- Recursive discriminated union ToSchema doc generation looping forever HOT 5
- Example in README doesn't compile HOT 1
- aeson-2.2 incompatibity HOT 3
- Appetite for JSON Schema enhancements? HOT 2
- Compilation failure on stackage for `autodocodec-schema` & `autodocodec-openapi3` - caused by autodocodec-0.3.0.0 HOT 6
- Custom error messages for enums (when parsing JSON)? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autodocodec.