Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TFVC array return types are probably wrong #728

Open
wanderzirkus opened this issue Oct 26, 2024 · 0 comments
Open

TFVC array return types are probably wrong #728

wanderzirkus opened this issue Oct 26, 2024 · 0 comments

Comments

@wanderzirkus
Copy link

wanderzirkus commented Oct 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant