-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Name conflict of components/schemas and operationId response objects #1357
Copy link
Copy link
Closed
Description
I attempted to generate a client using the official OpenAI specifications found at GitHub - openai/openai-openapi, but encountered a naming conflict.
For example:
openapi: 3.0.0
info:
title: OpenAI API
version: 2.0.0
paths:
/assistants:
get:
operationId: listAssistants
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ListAssistantsResponse"
components:
schemas:
ListAssistantsResponse:
type: stringThis specification generates two types:
// this for schemas
type ListAssistantsResponse = string
// and this for response object
type ListAssistantsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ListAssistantsResponse
}I'm considering making a merge request to fix this, but I'm unsure of the best approach. Here are some options:
- Rename the response object to operationID+OperationResponse or something similar.
- Append a suffix like Model to all schemas.
- Identify all conflicts at the end of generation and rename one of them.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels