Skip to content

Conversation

@albieduffy
Copy link
Contributor

No description provided.

@mattelen
Copy link
Member

👀

@albieduffy albieduffy self-assigned this Oct 29, 2025
@olliemath
Copy link
Member

olliemath commented Oct 31, 2025

@albieduffy @mattelen an alternative here is just to have essentially two separate schemas for the properties instead of adding the oneOf in the individual fields and enforcing separate cross-field validation later on in the schema:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Curve Schema",
  "description": "A Curve represents a series of points on a plot. Typically, interest rates, volatility or forward prices.",
  "type": "object",
  "oneOf": [
    {... numeric curve properties ...},
    {... text curve properties ...}
  ]
}

That seems clearer to me than a separate validation section (hopefully it would also allow consumers to model this as either a RiskRatingCurve or GenericCurve type) - any reason to prefer enforcing further down in the schema?

@albieduffy albieduffy force-pushed the 502-restructure-how-if-then-else-are-described-in-the-curve-schema branch from be96315 to b6f3880 Compare December 2, 2025 12:23
@albieduffy albieduffy force-pushed the 502-restructure-how-if-then-else-are-described-in-the-curve-schema branch 2 times, most recently from 9a35f72 to cb01dfa Compare January 28, 2026 14:57
@albieduffy albieduffy force-pushed the 502-restructure-how-if-then-else-are-described-in-the-curve-schema branch from cb01dfa to 04740be Compare January 28, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restructure how If > Then > Else are described in the Curve Schema

3 participants