openai / openai/openai-openapi
Incorrect status code for some endpoints
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 2.5k
- Forks
- 527
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 2
Description
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/invitesPOST /organization/projectsPOST /organization/projects/{project_id}/usersPOST /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 https://github.com/openai/openai-openapi/issues/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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the referenced internal/apiclient/api-patches.yaml, then locate the corresponding OpenAPI YAML definitions for the listed endpoints. Done means those four POST operations return 201, the admin API key request's type property is a string, and the unrelated nullable-value issue remains out of scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100