Skip to content

fix: add required fields for OpenAI API #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged

fix: add required fields for OpenAI API #39

merged 1 commit into from
Mar 24, 2025

Conversation

toby
Copy link
Member

@toby toby commented Mar 24, 2025

The OpenAI function calling API requires that additionalProperties: false and required: [] be set for arrays.

@Copilot Copilot AI review requested due to automatic review settings March 24, 2025 23:15
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the JSON schema definitions for OpenAI function calling API validation by adding the required "additionalProperties: false" and mandatory field arrays.

  • Updated schema in repositories.go to enforce "path" and "content".
  • Updated schema in pullrequests.go to enforce "path", "position", and "body".

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/github/repositories.go Adds strict object schema validation with "additionalProperties" false and required fields for file properties.
pkg/github/pullrequests.go Adds strict object schema validation with "additionalProperties" false and required fields for pull request review properties.

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

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.

2 participants