guidance-ai / guidance

A guidance language for controlling large language models.
MIT License
19.15k stars 1.05k forks source link

"required" JSON keys are validated against "additionalProperties" if they are missing from "properties" #1029

Closed hudson-ai closed 2 months ago

hudson-ai commented 2 months ago

Rather than raising an exception when required properties don't have a schema in properties, validate against additionalProperties (consistent with Draft202012)

Somewhat arbitrarily set key order of resulting objects to:

  1. properties in order
  2. required properties mising from properties in order
  3. any other additionalProperties
codecov-commenter commented 2 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 61.47%. Comparing base (edd8b87) to head (2de9148).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1029 +/- ## ========================================== - Coverage 70.16% 61.47% -8.69% ========================================== Files 62 62 Lines 4471 4470 -1 ========================================== - Hits 3137 2748 -389 - Misses 1334 1722 +388 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.