Skip to content

Docs: whitelabel field documented as string type in get-project API response, but it returns boolean #16

@novavolcanic

Description

@novavolcanic

What's missing or wrong

The get-project API response schema in docs/api/get-project.StatusCodes.json documents the whitelabel field as "type": "string". In the code it is a BooleanField and the serializer returns the boolean value directly. Developers who generate TypeScript types or validate responses against this schema will get the wrong type.

Source of truth (code)

File: biel/apps/teams/models.py:35

whitelabel = models.BooleanField(default=False)

File: biel/apps/projects/serializers.py:44–45

def get_whitelabel(self, obj):
    return obj.team.whitelabel

This returns the BooleanField value — true or false — not a string.

File: biel-search/src/components/biel-bot/biel-bot.tsx:588

this.showPoweredBy = !result.whitelabel;

The widget treats this as a boolean, confirming the actual return type.

What needs to change in docs

In docs/api/get-project.StatusCodes.json, change the whitelabel property definition from:

"whitelabel": {"type": "string", "readOnly": true, "description": "Whitelabel settings."}

to:

"whitelabel": {"type": "boolean", "readOnly": true, "description": "Whether the 'Powered by Biel.ai' branding is hidden. Requires a Professional plan or above."}

Also update the human-readable description to be more specific — "Whitelabel settings" does not tell developers what the field means.

Style notes

  • Use present tense and second person in the description
  • Use plain language: explain what true/false mean for this field

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions