Add render template route#1256
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds ChangesRender Template Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
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 @.code-samples.meilisearch.yaml:
- Around line 613-623: The `post_render_template_1` sample calls
`client.render_template` without first opting into the gated feature, so update
the example to include the explicit
`client.update_experimental_features({"renderRoute": True})` step before the
render call. Keep the change in the same docs sample and ensure the
`render_template` snippet clearly shows the required experimental-feature opt-in
path before using `client.render_template`.
🪄 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: 70a3f670-59b8-4dec-94a9-224011b43849
📒 Files selected for processing (5)
.code-samples.meilisearch.yamlmeilisearch/client.pymeilisearch/config.pytests/client/test_client_render_template.pytests/conftest.py
Strift
left a comment
There was a problem hiding this comment.
Hello @qorexdevs and thanks for your contirbution 🙌 LGTM!
Related issue
Closes #1253
What does this PR do?
client.render_template()for the experimentalPOST /render-templateroute added in Meilisearch 1.48templatewith an optionalinput, and dropinputfrom the body when it is not passed (the route returns the unrendered template withrendered: nullin that case)renderRouteexperimental-feature fixturepost_render_template_1code sampleThe route is behind the
renderRouteexperimental feature, so callers enable it withupdate_experimental_features({"renderRoute": True})first. Tested the new cases against a local Meilisearch 1.48.0.AI disclosure
None
PR checklist
Summary by CodeRabbit
render_templateto the client to render inline document templates, with optional document input.inputonly when provided.render_template, including scenarios with and withoutinput.