Skip to content

TFVC array return types are probably wrong #728

@wanderzirkus

Description

@wanderzirkus

Hi,

I try to use this spec for my TypeScript project and I think the return type "Array" is wrong in the specification:
The server wraps arrays in an object:

{
  value: [arrayItem1, arrayItem2, ..., arrayItemN]
  count: N
}

In this spec arrays are specified as e.g.:

"responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TfvcItem"
              }
            }
          }
        },

Expecting arrays to be in this form:

[arrayItem1, arrayItem2, ..., arrayItemN]

Is there something I am missing about the usage of openApi in Typescript (I am using @hey-api/openapi-ts to generate a client out of the spec) or is this a problem in this spec?

Best Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions