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

"Test it" tool for AI ask is prepopulated with erroneous request body #2433

Open
benjamincburns opened this issue Aug 18, 2024 · 0 comments
Open

Comments

@benjamincburns
Copy link

benjamincburns commented Aug 18, 2024

It appears that all of the AI ask endpoints descriptions on this page show the body as only requiring a query parameter. However, if you go to run a request via the "Test it" button on that page, the editor loads with the following request body prepopulated:

{
  "query": "",
  "previousQueries": [
    null
  ]
}

If you fill in your query and run it as-is, without editing the contents of the previousQueries array, you'll get the following 422 error response:

{
  "error": {
    "code": 422,
    "message": "body.previousQueries.0: expected a string"
  }
}

Editing the body to make previousQueries be an empty array, or deleting previousQueries entirely causes the request to succeed. Given that previousQueries is deprecated and appears to no longer be functional, I'd think it should be removed from the "Test it" tool.

@benjamincburns benjamincburns changed the title "Test it" tool for AI ask/search is prepopulated with erroneous request body "Test it" tool for AI ask is prepopulated with erroneous request body Aug 19, 2024
@addisonschultz addisonschultz transferred this issue from GitbookIO/integrations Aug 19, 2024
@SamyPesse SamyPesse removed the scalar label Aug 20, 2024
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

3 participants