fix(editor): check request bodies as JSON and bind :name in SQL only - #3255
Merged
Merged
Conversation
Elasticsearch, Typesense and Weaviate highlight as JavaScript, so their requests went through the MongoDB JavaScript parser and every Query DSL body was flagged. Parameter detection ran on every engine but MongoDB, so a colon in a URL, a Redis key or a SurrealDB record ID opened the Parameters panel.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Signed-off-by: Dat Ngo Quoc <datlechin@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
In the Elasticsearch console every valid Query DSL body showed a red syntax error on its first key, and
GET /products/_search?q=name:lampopened the Parameters panel forlampand would not run. The editor checked the request as a MongoDB script because Elasticsearch highlights as JavaScript, and it read:nameas a bind parameter on every engine except MongoDB.Change
GET /_cat/indices/*is no longer an unterminated comment.SET smile :)is a valid command.:nameparameters are detected on SQL connections only. Colons in Elasticsearch URLs, Redis keys and SurrealDB record IDs are sent as written.Verified
Tests cover each engine's diagnostics and the parameter gate, using the two requests from the report. MongoDB keeps its JavaScript check and SQL keeps its parameter panel.
Not in this PR