-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: added path param tab http #1813
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -597,6 +597,27 @@ | |||||||||||
] | ||||||||||||
} | ||||||||||||
] | ||||||||||||
}, | ||||||||||||
{ | ||||||||||||
"name": "Path Parameters", | ||||||||||||
"fields": [ | ||||||||||||
{ | ||||||||||||
"type": "mapping", | ||||||||||||
"label": "Enter your path parameters in sequence", | ||||||||||||
"columns": [ | ||||||||||||
{ | ||||||||||||
"key": "path", | ||||||||||||
"type": "textInput", | ||||||||||||
"label": "Path", | ||||||||||||
"placeholder": "$.userId or users", | ||||||||||||
"regex": "^\\$(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*$|^(?!\\$).{1,100}$", | ||||||||||||
"regexErrorMessage": "Please enter a valid JSON path or a constant", | ||||||||||||
} | ||||||||||||
Comment on lines
+614
to
+615
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix JSON syntax error: Remove trailing comma There's a trailing comma after the Apply this fix: "regex": "^\\$(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*$|^(?!\\$).{1,100}$",
- "regexErrorMessage": "Please enter a valid JSON path or a constant",
+ "regexErrorMessage": "Please enter a valid JSON path or a constant" 📝 Committable suggestion
Suggested change
|
||||||||||||
], | ||||||||||||
"default": [], | ||||||||||||
"configKey": "pathParams" | ||||||||||||
} | ||||||||||||
] | ||||||||||||
Comment on lines
+600
to
+620
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Documentation needs to be added for path parameters feature The codebase search reveals:
Required documentation updates:
🔗 Analysis chainVerify path parameter documentation and examples Let's ensure the documentation and examples are consistent across the codebase. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for path parameter documentation and examples
echo "Searching for path parameter documentation..."
rg -l "path param(eter)?" docs/
rg -l "path param(eter)?" README.md
echo "Searching for example URLs with path parameters..."
rg -l "http.*\{\{.*\}\}" docs/
Length of output: 408 Script: #!/bin/bash
# Let's try a broader search for documentation and examples
echo "Searching for path parameter documentation in all files..."
rg -i "path param(eter)?"
echo -e "\nSearching for example URLs with path parameters..."
rg -i "https?://[^\"'\s]*\{[^}]+\}"
echo -e "\nSearching for any markdown or documentation files..."
fd -e md
fd -e mdx
fd -e txt
Length of output: 2693 🧰 Tools🪛 Biome (1.9.4)[error] 616-616: Expected a property but instead found '}'. Expected a property here. (parse)
Comment on lines
+602
to
+620
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider enhancing path parameter validation and documentation The implementation needs additional safeguards and clarity:
Apply these changes to enhance validation and clarity: {
"name": "Path Parameters",
"fields": [
{
"type": "mapping",
- "label": "Enter your path parameters in sequence",
+ "label": "Enter your path parameters in sequence (order matters)",
+ "note": "Parameters will be substituted in order into URL placeholders. Use either JSON path (e.g., $.userId) for dynamic values or constants.",
"columns": [
{
"key": "path",
"type": "textInput",
"label": "Path",
"placeholder": "$.userId or users",
"regex": "^\\$(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*$|^(?!\\$).{1,100}$",
"regexErrorMessage": "Please enter a valid JSON path or a constant",
+ "validation": {
+ "unique": true,
+ "errorMessage": "Duplicate path parameters are not allowed"
+ }
}
],
"default": [],
"configKey": "pathParams"
}
]
}
🧰 Tools🪛 Biome (1.9.4)[error] 616-616: Expected a property but instead found '}'. Expected a property here. (parse) |
||||||||||||
} | ||||||||||||
] | ||||||||||||
} | ||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Schema validation missing for pathParams
The schema.json file lacks validation rules for the pathParams configuration, while the UI configuration (ui-config.json) correctly includes the Path Parameters tab. This could lead to validation issues.
pathParams
in schema.json similar to the existingqueryParams
andheaders
validation:🔗 Analysis chain
LGTM! The placement of pathParams is logical and non-breaking.
The addition of
"pathParams"
is well-positioned among other HTTP request configuration options likequeryParams
andheaders
.Let's verify the integration with related schema and UI files:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 482
Script:
Length of output: 51198