Docs: fix whitelabel field type in get-project API schema#18
Docs: fix whitelabel field type in get-project API schema#18novavolcanic wants to merge 1 commit intomainfrom
Conversation
Change whitelabel from "string" to "boolean" to match the Django BooleanField in teams/models.py and the serializer return value. Update the description to explain what true/false means for this field. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughUpdated the OpenAPI schema documentation for the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/api/get-project.StatusCodes.json`:
- Line 1: Update the response schema descriptions to use present-tense,
second-person phrasing: change property descriptions like "Whether the 'Powered
by Biel.ai' branding is hidden." to "Whether you hide the 'Powered by Biel.ai'
branding.", "Pre-configured suggested questions." to "Pre-configured suggested
questions for you.", "Greeting message shown when users open the chat." to
"Greeting message shown to users when they open the chat.", and similarly
convert "Search filters configured for the project.", "Whether reasoning mode is
enabled.", "Whether the project requires authentication.", "Whether MCP server
integration is enabled.", "Display name of the MCP server.", and "Tag to
identify MCP-originated conversations." into second-person present-tense
variants; also ensure the top-level response description ("Project details
retrieved successfully") follows the same voice if needed.
- Line 1: The OpenAPI canonical schema still types Project.whitelabel as string
while docs/api/get-project.StatusCodes.json uses boolean; update the canonical
OpenAPI Project schema to set the whitelabel property to type: boolean (and keep
readOnly/description intact) so generators won't regress; locate the Project
object in the OpenAPI schema (schema.yaml) and change Project.whitelabel from
"type: string" to "type: boolean", run any schema validation/regen scripts
afterward to ensure consistency.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: c181c2d7-89f6-4680-99bd-e5d653403d58
📒 Files selected for processing (1)
docs/api/get-project.StatusCodes.json
| @@ -1 +1 @@ | |||
| {"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"whitelabel":{"type":"string","readOnly":true,"description":"Whitelabel settings."},"suggested_questions":{"type":"string","readOnly":true,"description":"Pre-configured suggested questions."},"initial_message":{"type":"string","description":"Greeting message shown when users open the chat."},"filters":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Display title of the filter."}},"required":["title"],"title":"Filter"},"readOnly":true,"description":"Search filters configured for the project."},"think_mode":{"type":"boolean","readOnly":true,"description":"Whether reasoning mode is enabled."},"is_private":{"type":"boolean","readOnly":true,"description":"Whether the project requires authentication."},"mcp_enabled":{"type":"boolean","description":"Whether MCP server integration is enabled."},"mcp_server_name":{"type":"string","description":"Display name of the MCP server."},"mcp_metadata_tag":{"type":"string","description":"Tag to identify MCP-originated conversations."}},"required":["filters","initial_message","suggested_questions","whitelabel","think_mode","is_private","mcp_enabled","mcp_server_name","mcp_metadata_tag"],"title":"Project"}}},"description":"Project details retrieved successfully"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}},"description":"Forbidden - missing permissions"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}},"description":"Project not found"}}} No newline at end of file | |||
| {"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"whitelabel":{"type":"boolean","readOnly":true,"description":"Whether the 'Powered by Biel.ai' branding is hidden. Requires a Professional plan or above."},"suggested_questions":{"type":"string","readOnly":true,"description":"Pre-configured suggested questions."},"initial_message":{"type":"string","description":"Greeting message shown when users open the chat."},"filters":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Display title of the filter."}},"required":["title"],"title":"Filter"},"readOnly":true,"description":"Search filters configured for the project."},"think_mode":{"type":"boolean","readOnly":true,"description":"Whether reasoning mode is enabled."},"is_private":{"type":"boolean","readOnly":true,"description":"Whether the project requires authentication."},"mcp_enabled":{"type":"boolean","description":"Whether MCP server integration is enabled."},"mcp_server_name":{"type":"string","description":"Display name of the MCP server."},"mcp_metadata_tag":{"type":"string","description":"Tag to identify MCP-originated conversations."}},"required":["filters","initial_message","suggested_questions","whitelabel","think_mode","is_private","mcp_enabled","mcp_server_name","mcp_metadata_tag"],"title":"Project"}}},"description":"Project details retrieved successfully"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}},"description":"Forbidden - missing permissions"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}},"description":"Project not found"}}} No newline at end of file | |||
There was a problem hiding this comment.
Line 1: Description is clearer, but it doesn’t fully match the requested second-person style.
The issue objective asked for present tense + second person. Current text starts with “Whether the … is hidden.” Consider switching to “Whether you hide …” for strict style alignment.
Suggested wording tweak
-"description":"Whether the 'Powered by Biel.ai' branding is hidden. Requires a Professional plan or above."
+"description":"Whether you hide the 'Powered by Biel.ai' branding. Requires a Professional plan or above."📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"whitelabel":{"type":"boolean","readOnly":true,"description":"Whether the 'Powered by Biel.ai' branding is hidden. Requires a Professional plan or above."},"suggested_questions":{"type":"string","readOnly":true,"description":"Pre-configured suggested questions."},"initial_message":{"type":"string","description":"Greeting message shown when users open the chat."},"filters":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Display title of the filter."}},"required":["title"],"title":"Filter"},"readOnly":true,"description":"Search filters configured for the project."},"think_mode":{"type":"boolean","readOnly":true,"description":"Whether reasoning mode is enabled."},"is_private":{"type":"boolean","readOnly":true,"description":"Whether the project requires authentication."},"mcp_enabled":{"type":"boolean","description":"Whether MCP server integration is enabled."},"mcp_server_name":{"type":"string","description":"Display name of the MCP server."},"mcp_metadata_tag":{"type":"string","description":"Tag to identify MCP-originated conversations."}},"required":["filters","initial_message","suggested_questions","whitelabel","think_mode","is_private","mcp_enabled","mcp_server_name","mcp_metadata_tag"],"title":"Project"}}},"description":"Project details retrieved successfully"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}},"description":"Forbidden - missing permissions"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}},"description":"Project not found"}}} | |
| {"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"whitelabel":{"type":"boolean","readOnly":true,"description":"Whether you hide the 'Powered by Biel.ai' branding. Requires a Professional plan or above."},"suggested_questions":{"type":"string","readOnly":true,"description":"Pre-configured suggested questions."},"initial_message":{"type":"string","description":"Greeting message shown when users open the chat."},"filters":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","description":"Display title of the filter."}},"required":["title"],"title":"Filter"},"readOnly":true,"description":"Search filters configured for the project."},"think_mode":{"type":"boolean","readOnly":true,"description":"Whether reasoning mode is enabled."},"is_private":{"type":"boolean","readOnly":true,"description":"Whether the project requires authentication."},"mcp_enabled":{"type":"boolean","description":"Whether MCP server integration is enabled."},"mcp_server_name":{"type":"string","description":"Display name of the MCP server."},"mcp_metadata_tag":{"type":"string","description":"Tag to identify MCP-originated conversations."}},"required":["filters","initial_message","suggested_questions","whitelabel","think_mode","is_private","mcp_enabled","mcp_server_name","mcp_metadata_tag"],"title":"Project"}}},"description":"Project details retrieved successfully"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}},"description":"Forbidden - missing permissions"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}},"description":"Project not found"}}} |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/api/get-project.StatusCodes.json` at line 1, Update the response schema
descriptions to use present-tense, second-person phrasing: change property
descriptions like "Whether the 'Powered by Biel.ai' branding is hidden." to
"Whether you hide the 'Powered by Biel.ai' branding.", "Pre-configured suggested
questions." to "Pre-configured suggested questions for you.", "Greeting message
shown when users open the chat." to "Greeting message shown to users when they
open the chat.", and similarly convert "Search filters configured for the
project.", "Whether reasoning mode is enabled.", "Whether the project requires
authentication.", "Whether MCP server integration is enabled.", "Display name of
the MCP server.", and "Tag to identify MCP-originated conversations." into
second-person present-tense variants; also ensure the top-level response
description ("Project details retrieved successfully") follows the same voice if
needed.
Line 1: Update the canonical OpenAPI schema too to avoid drift/regression.
docs/api/get-project.StatusCodes.json is now correct, but openapi/schema.yaml:570-616 still defines Project.whitelabel as type: string. If that file is the source of truth, generators and future doc refreshes can revert this fix and keep emitting wrong client types.
Suggested source-of-truth fix
# openapi/schema.yaml
Project:
type: object
properties:
whitelabel:
- type: string
+ type: boolean
readOnly: true
- description: Whitelabel settings.
+ description: Whether you hide the "Powered by Biel.ai" branding. Requires a Professional plan or above.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/api/get-project.StatusCodes.json` at line 1, The OpenAPI canonical
schema still types Project.whitelabel as string while
docs/api/get-project.StatusCodes.json uses boolean; update the canonical OpenAPI
Project schema to set the whitelabel property to type: boolean (and keep
readOnly/description intact) so generators won't regress; locate the Project
object in the OpenAPI schema (schema.yaml) and change Project.whitelabel from
"type: string" to "type: boolean", run any schema validation/regen scripts
afterward to ensure consistency.
Closes #16
What changed
Changed the
whitelabelfield type indocs/api/get-project.StatusCodes.jsonfrom"string"to"boolean". Updated the description from the vague "Whitelabel settings." to explain what the field actually means.Source of truth
biel/apps/teams/models.py:35—whitelabel = models.BooleanField(default=False)biel/apps/projects/serializers.py:44–45—get_whitelabelreturns the BooleanField value directlybiel-search/src/components/biel-bot/biel-bot.tsx:588— widget treats it as boolean:this.showPoweredBy = !result.whitelabelVerification
Summary by CodeRabbit
whitelabelproperty in the 200 response. Changed type from string to boolean with clarified description indicating it controls "Powered by Biel.ai" branding visibility.