Integrate render route#3602
Conversation
📝 WalkthroughWalkthroughAdds documentation for the ChangesPOST /render-template Documentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@capabilities/hybrid_search/advanced/document_template_best_practices.mdx`:
- Around line 52-64: The curl command examples in the
document_template_best_practices.mdx file are incorrectly fenced with json code
blocks instead of bash code blocks. Change the code fence markers from json to
bash for all three curl command examples located at lines 52-64, 88-103, and
126-137 to make the samples clear and properly runnable according to coding
guidelines.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 73a29d88-b51f-4d88-b0f5-914eb781a06d
📒 Files selected for processing (3)
.code-samples.meilisearch.yamlcapabilities/hybrid_search/advanced/document_template_best_practices.mdxconfig/navigation.json
| ```json | ||
| curl -X POST $MEILISEARCH_URL/render-template --json '{ | ||
| "template": { | ||
| "kind": "inlineDocumentTemplate", | ||
| "inline": "A movie called {{doc.title}} whose description starts with: {{doc.overview|truncatewords:10}}" | ||
| }, | ||
| "input": { | ||
| "kind": "indexDocument", | ||
| "indexUid": "movies", | ||
| "id": "2" | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Use shell code fences for curl examples
Lines 52, 88, and 126 contain curl commands but are fenced as json. Switch those blocks to bash (or sh) so samples stay clear and runnable.
Suggested diff
-```json
+```bash
curl -X POST $MEILISEARCH_URL/render-template --json '{
"template": {
"kind": "inlineDocumentTemplate",
"inline": "A movie called {{doc.title}} whose description starts with: {{doc.overview|truncatewords:10}}"
@@
}'-json +bash
curl -X POST $MEILISEARCH_URL/render-template --json '{
"template": {
"kind": "documentTemplate",
@@
}'
-```json
- curl -X POST $MEILISEARCH_URL/render-template --json '{
+```bash
+curl -X POST $MEILISEARCH_URL/render-template --json '{
"template": {
"kind": "inlineDocumentTemplate",
"inline": "A buggy template that refers to an unavailable field: {{doc.doesnotexist}}"
As per coding guidelines, "Keep code samples minimal and runnable; they should illustrate the concept, not add noise."
Also applies to: 88-103, 126-137
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@capabilities/hybrid_search/advanced/document_template_best_practices.mdx`
around lines 52 - 64, The curl command examples in the
document_template_best_practices.mdx file are incorrectly fenced with json code
blocks instead of bash code blocks. Change the code fence markers from json to
bash for all three curl command examples located at lines 52-64, 88-103, and
126-137 to make the samples clear and properly runnable according to coding
guidelines.
Source: Coding guidelines
Documentation for POST /render-template endpoint
This pull request adds comprehensive documentation for the new POST /render-template endpoint across three areas:
Navigation Structure
Best Practices Guide
Code Sample
post_render_template_1example in the code samples configuration