Skip to content

OpenAPI 3.0 spec definition creates an invalid spec document #1822

@ksemasinghe

Description

@ksemasinghe

The open-api spec generation for 3.0 creates an invalid spec for requestBody.content[0].schema

TSOA will define a description entry if the relevant controller's route has a jsdoc definition for @body.

My understanding is that the OpenAPI spec does not list description as an actual valid key if the $ref specifier is used, meaning setting it would be invalid.

This causes an issue as we are using a tool called ingress2gateway to generate a different spec from the OpenAPI definition. That tool appears to be strict in that it detects this description key as an invalid reference.

Is it possible to not set these extra values if we are using a $ref to define the mediaType?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions