Skip to content

TSdoc @description no longer attached to param, instead all attached to query #1068

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

Closed
tonyxiao opened this issue Apr 6, 2023 · 2 comments
Closed
Labels
question Further information is requested

Comments

@tonyxiao
Copy link

tonyxiao commented Apr 6, 2023

Description

Looks like the JS docs are attached to the wrong node. They should be attached to individual query params, but instead they are attached to the query object overall, making it much harder to read / use

Schema link: https://api.merge.dev/api/accounting/v1/schema

Error screenshot
CleanShot 2023-04-06 at 04 55 23@2x

Paste full error message
Name Version
openapi-typescript 6.2.1
Node.js 18
OS + version macOS 13, Windows 11, etc.
@mitchell-merry
Copy link
Contributor

Please do a fresh re-install of your dependencies. This was fixed in #1029, for version 6.2.0.

I tried on the most recent version with your schema and it works fine:

  /** @description Returns a list of `Account` objects. */
  accounts_list: {
    parameters: {
      query: {
        /** @description If provided, will only return accounts for this company. */
        company_id?: string;
        /** @description If provided, will only return objects created after this datetime. */
        created_after?: string;
        /** @description If provided, will only return objects created before this datetime. */
        created_before?: string;
        /** @description The pagination cursor value. */
        cursor?: string;
        /** @description Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */
        expand?: "company";
        /** @description Whether to include data that was marked as deleted by third party webhooks. */
        include_deleted_data?: boolean;
        /** @description Whether to include the original data Merge fetched from the third-party to produce these models. */
        include_remote_data?: boolean;
        /** @description If provided, will only return objects modified after this datetime. */
        modified_after?: string;
        /** @description If provided, will only return objects modified before this datetime. */
        modified_before?: string;
        /** @description Number of results to return per page. */
        page_size?: number;
        /** @description Deprecated. Use show_enum_origins. */
        remote_fields?: "classification" | "classification,status" | "status";
        /** @description The API provider's ID for the given object. */
        remote_id?: string | null;
        /** @description Which fields should be returned in non-normalized form. */
        show_enum_origins?: "classification" | "classification,status" | "status";
      };
      header: {
        /** @description Token identifying the end user. */
        "X-Account-Token": string;
      };
    };
    responses: {
      200: {
        content: {
          "application/json": components["schemas"]["PaginatedAccountList"];
        };
      };
    };
  };

@drwpow drwpow added the question Further information is requested label Apr 7, 2023
@tonyxiao
Copy link
Author

tonyxiao commented Apr 7, 2023

Ah that was indeed the issue, sorry about that. Tricky pnpm, had to run prune

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

No branches or pull requests

3 participants