Skip to content

Conversation

ApostolFet
Copy link

No description provided.

Copy link

Comment on lines +304 to +318
def _join_json_schema(self, json_schemas: Sequence[JSONSchema]) -> JSONSchema:
types: list[JSONSchemaType] = []

for schema in json_schemas:
current_type = schema.type
if isinstance(current_type, JSONSchemaType):
types.append(current_type)
elif isinstance(current_type, Omitted):
continue
else:
types.extend(current_type)

any_of_schemas = [JSONSchema(type=type_) for type_ in types]

return JSONSchema(any_of=any_of_schemas)
Copy link
Member

@zhPavel zhPavel Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only type from subschema is used? I think that entire subschema has to be inside anyOf field

Copy link

github-actions bot commented Oct 4, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/adaptix/_internal/morphing
  union_provider.py 311-314
Project Total  

This report was generated by python-coverage-comment-action

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.

2 participants