Skip to content

[OpenAPI] Parameter descriptions are missing from the generated OpenAPI file while present in the ts files #5082

@szabosteve

Description

@szabosteve

Problem

Certain parameter descriptions present in the TypeScript files are not displayed in the API docs, and they are also not included in the OpenAPI spec.

Example

This is how the generated docs look like for the Cohere inference endpoint docs:

Image

And this is the description in the TS file:

The type of service supported for the specified task type. In this case, `cohere`.

service is an enum and its value is cohere.

It seems the description is stripped down and only the enum value is displayed as the description is missing in the OpenAPI spec.

"service": {
                    "$ref": "#/components/schemas/inference._types.CohereServiceType"

and this is the CohereServiceType:

"inference._types.CohereServiceType": {
        "type": "string",
        "enum": [
          "cohere"
        ]
      },

Would it be possible to also include the description of the parameter in the OpenAPI file, so it can be displayed in the generated documentation?

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions