Skip to content

[16.0][FIX] ai_tool: _ai_get_date output_schema uses invalid JSON Schema type 'date'#89

Open
ZachDreamZ wants to merge 1 commit into
OCA:16.0from
ZachDreamZ:fix/ai-get-date-schema-type
Open

[16.0][FIX] ai_tool: _ai_get_date output_schema uses invalid JSON Schema type 'date'#89
ZachDreamZ wants to merge 1 commit into
OCA:16.0from
ZachDreamZ:fix/ai-get-date-schema-type

Conversation

@ZachDreamZ

Copy link
Copy Markdown

The _ai_get_date output_schema uses "type": "date", which isn't a valid JSON Schema type. JSON Schema only allows string, number, integer, boolean, object, array, and null. Date values should use "type": "string" with "format": "date".

Changed the schema to {"type": "string", "format": "date"} — the correct JSON Schema representation for a date.

Fixes #88

The JSON Schema spec does not define 'date' as a valid type.
Use 'string' with format 'date' instead, which is the correct
way to represent a date in JSON Schema.

@nobuQuartile nobuQuartile left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: Code review & Functional review
@qrtl

@nobuQuartile

Copy link
Copy Markdown

@ZachDreamZ
Thank you for your prompt response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants