Skip to content

test: add unit tests for the schema_converter boolean-schema filter#3876

Open
eeshsaxena wants to merge 1 commit into
ComposioHQ:nextfrom
eeshsaxena:test/schema-converter
Open

test: add unit tests for the schema_converter boolean-schema filter#3876
eeshsaxena wants to merge 1 commit into
ComposioHQ:nextfrom
eeshsaxena:test/schema-converter

Conversation

@eeshsaxena

Copy link
Copy Markdown
Contributor

Description

composio.utils.schema_converter._filter_boolean_schemas pre-processes JSON
Schemas before handing them to json-schema-to-pydantic, which doesn't
support boolean schemas (draft-06+ allows true/false as schemas). It
replaces true with {}, drops false, and recurses through combiner
arrays (anyOf/allOf/oneOf), properties, items and $defs. It had no
test coverage.

This adds python/tests/test_schema_converter.py covering:

  • True -> {} and False -> None
  • non-schema values passing through unchanged
  • lists dropping False entries, and an all-False list becoming None
  • combiner arrays dropping False entries, and the whole combiner being
    removed when every entry is False
  • a False property being dropped while siblings are kept
  • plain keys being preserved

No source changes.

Verification

pytest python/tests/test_schema_converter.py - 9 passed. ruff check /
ruff format clean.

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

eeshsaxena is attempting to deploy a commit to the Composio Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant