David Bernard

Results 150 comments of David Bernard

@xibz, Yes this definition affect tooling (currently I customize it to say String only). Try to answer the question: - How to you think this json schema should be translated...

`oneOf` is better IMHO in term of types and how to deserialize data. `oneOf` is like XOR, a value can be A or B but not both. I guess that...

in this case why using a `oneOf`? (there is only one possible type the enum)

in json-schema `enum` are `string`. What I mean is why ``` "oneOf": [ { "type": "string", "enum": [ "low", "medium", "high" ] } ] ``` and not ``` "type": "string",...

My question is why using a "oneOf" with an array of 1 value (the enum)?

`oneOf` and `enum` are unrelated. - `enum` are to restrict value (https://json-schema.org/understanding-json-schema/reference/enum) - `oneOf` are to choose a type into a list (it's why I don't see the value of...

if `a`, `b`, `c` should not be represented in code, then `enum` is not the right json-schema medium. It's why I suggest `examples`. Also note that using `examples` will also...

`examples` is part of json-schema draft 6, see https://json-schema.org/understanding-json-schema/reference/annotations and used by some OpenAPI and contract-testing tool like schemathesis to validate API or generate samples or validate API

@xibz Can you provide an example (in a programming language) about how you think those values could be modeled in the SDKs?

@afrittoli The PR is rebased on main.