API Docs: Add type field in the API docs for POST /config endpoint#609
API Docs: Add type field in the API docs for POST /config endpoint#609Prajna1999 merged 3 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughDocumentation clarifies three configuration blob types— Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (3)
backend/app/api/docs/config/create.md (3)
15-31: Marktypeas required in the docs.The example adds
type, but the doc doesn’t say it’s mandatory. Please explicitly state thatconfig_blob.completion.typeis required and limited totext | stt | tts, matching validation behavior.As per coding guidelines, “In the kaapi-backend repository, the
typefield inconfig_blob.completion(for both NativeCompletionConfig and KaapiCompletionConfig) is compulsory/mandatory during config creation and validation ensures it will never be missing. Valid values are "text", "stt", or "tts".”🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@backend/app/api/docs/config/create.md` around lines 15 - 31, Update the docs to mark config_blob.completion.type as required and document its allowed values; specifically state that config_blob.completion.type is mandatory (for both NativeCompletionConfig and KaapiCompletionConfig) and must be one of "text" | "stt" | "tts" to match validation/creation behavior. Locate the example block that shows config_blob and add a concise sentence near the completion fields explicitly declaring the requirement and the three permitted values so the docs align with the backend validation.
12-12: Tighten wording to avoid redundancy.“Supports three types of config blob types” repeats “types.” Consider “Supports three config blob types: ‘text’, ‘stt’, and ‘tts’.”
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@backend/app/api/docs/config/create.md` at line 12, Replace the redundant phrase "Supports three types of config blob types; \"text\", \"stt\" and \"tts\"." with the tightened wording "Supports three config blob types: 'text', 'stt', and 'tts'." to remove the duplicated word "types" and use a colon with consistent punctuation around the listed blob types.
21-22: Fix minor JSON formatting for readability.Add a space after the colon to match the rest of the example.
Suggested edit
- "type":"text", + "type": "text",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@backend/app/api/docs/config/create.md` around lines 21 - 22, Update the JSON example to match the repo's spacing style by adding a space after the colon for the "type" property; replace the fragment `"type":"text",` with the spaced form `"type": "text",` so it is consistent with the following `"params": {` entry and improves readability in the create.md example.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@backend/app/api/docs/config/create.md`:
- Around line 15-31: Update the docs to mark config_blob.completion.type as
required and document its allowed values; specifically state that
config_blob.completion.type is mandatory (for both NativeCompletionConfig and
KaapiCompletionConfig) and must be one of "text" | "stt" | "tts" to match
validation/creation behavior. Locate the example block that shows config_blob
and add a concise sentence near the completion fields explicitly declaring the
requirement and the three permitted values so the docs align with the backend
validation.
- Line 12: Replace the redundant phrase "Supports three types of config blob
types; \"text\", \"stt\" and \"tts\"." with the tightened wording "Supports
three config blob types: 'text', 'stt', and 'tts'." to remove the duplicated
word "types" and use a colon with consistent punctuation around the listed blob
types.
- Around line 21-22: Update the JSON example to match the repo's spacing style
by adding a space after the colon for the "type" property; replace the fragment
`"type":"text",` with the spaced form `"type": "text",` so it is consistent with
the following `"params": {` entry and improves readability in the create.md
example.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| The configuration name must be unique within your project. Once created, | ||
| you can create additional versions to track parameter changes while | ||
| maintaining the configuration history. | ||
| maintaining the configuration history. Type "stt" and "tts" only applicable for Gemini models. |
There was a problem hiding this comment.
first , use text line should come, and then "type stt and tss only applicable" should come, and adding "are" before only will make it better
Summary
Target issue is #TBD
Add type field to the config creation API docs
Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Please add here if any other information is required for the reviewer.
Summary by CodeRabbit