Fork me on GitHub
#juxt
<
2021-04-30
>
Jakub Holý (HolyJak)08:04:25

Hello! I know the JUXT folks have built lot of APIs and used OpenAPI extensively so I wonder whether they might have some good solution for https://clojureverse.org/t/declarative-rules-for-relations-between-inputs/7623/2 ... 🙏

malcolmsparks10:04:01

JSON Schema supports dependant types and these declarative rules across multiple inputs. My personal view @holyjak is that data, and arguably therefore schema over data, should be language agnostic, so I prefer JSON Schema, even though it is still technically in draft.

❤️ 4
👀 4
💯 4
ikitommi11:04:56

Interesting. JSON Schema has property and schema dependencies, but does that work over value dependencies? e.g. “if field x value = y, then field z is allowed to be å“.

oliy17:05:51

I believe so yes, but you would express it as a 'duplicate' property dependency which would have different restrictions to its sibling