Skip to content

[OpenAPI] Lost descriptions #4473

Open
Open
@lcawl

Description

@lcawl

Bug description

There seem to be some cases where a description is not being properly propagated from the schema.json to the OpenAPI documents (that is to say, there are some descriptions missing).

Example

For example, in #4472 I added the following description in specification/inference/_types/Services.ts:

/**
 * This setting helps to minimize the number of rate limit errors returned from the service.
 */
export class RateLimitSetting {
 ...

It appears in the output from the make generate command (in output/schema/schema.json):

    {
      "kind": "interface",
      "description": "This setting helps to minimize the number of rate limit errors returned from the service.",
      "name": {
        "name": "RateLimitSetting",
        "namespace": "inference._types"
      },
...

But does not appear in the output from the make-transform-to-openapi command (in output/openapi/elasticsearch-openapi.json):

 "inference._types.RateLimitSetting": {
        "type": "object",
        "properties": {
          "requests_per_minute": {
            "description": "...",
            "type": "number"
          }

It should appear as follows:

 "inference._types.RateLimitSetting": {
        "type": "object",
        "description": "This setting helps to minimize the number of rate limit errors returned from the service.",
        "properties": {
          "requests_per_minute": {
            "description": "...",
            "type": "number"
          }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions