Skip to content
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

Incorrect status code for some endpoints #407

Open
jianyuan opened this issue Jan 27, 2025 · 0 comments
Open

Incorrect status code for some endpoints #407

jianyuan opened this issue Jan 27, 2025 · 0 comments

Comments

@jianyuan
Copy link

jianyuan commented Jan 27, 2025

I am the developer of terraform-provider-openai. This library uses the OpenAPI specification to generate its Go API client.

I noticed that some endpoints were incorrectly tagged as HTTP 200 instead of HTTP 201:

  • POST /organization/invites
  • POST /organization/projects
  • POST /organization/projects/{project_id}/users
  • POST /organization/projects/{project_id}/service_accounts

Additionally, the type property in the request body for POST /organization/admin_api_keys should be a string instead of an object.

There is also an issue with using $allOf for nullable values, but this has been reported in #391.

To address these issues, I applied post-processing to fix the API YAML file before generating the Go API client:

https://github.com/jianyuan/terraform-provider-openai/blob/main/internal/apiclient/api-patches.yaml

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

No branches or pull requests

1 participant