Skip to content

[OAS] Add a description for each response #233419

@lcawl

Description

@lcawl

Describe the feature:

Relates to #228077

When you run node ./scripts/validate_oas_docs.js or when it runs as a CI check, there are a lot of messages like this:

 /paths/~1api~1fleet~1settings/get/responses/200
   │      must have required property 'description'
   │
   │      /paths/~1api~1fleet~1settings/get/responses/400
   │      must have required property 'description'
   │
   │      /paths/~1api~1fleet~1settings/get/responses/404
   │      must have required property 'description'
   │
   │      /paths/~1api~1fleet~1settings/put/responses/200
   │      must have required property 'description'

I believe this occurs because a lot of the responses (particularly those in the parts of the OpenAPI document that are generated from the code) are missing descriptions. For an example of how it can be added in those cases, refer to https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/actions/server/routes/connector/create/create.ts#L43

Describe a specific use case for the feature:

By addressing all the missing descriptions, we can start reduce the volume of validation errors and hopefully get the OpenAPI document to a state of validity that enables us to use it for things like Terraform resource generation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:OASWork or issues related to Core-provided mechanisms for generating OASTeam:Docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions