Skip to content

Conversation

@sergey-tihon
Copy link
Member

fixes #279

Copilot AI review requested due to automatic review settings January 3, 2026 09:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes issue #279 by enabling the SwaggerProvider to compile OpenAPI schemas that have the nullable: true attribute combined with allOf references. The fix adds support for handling JsonSchemaType.Null in the type compilation logic.

  • Added a condition to treat JsonSchemaType.Null as an object type in the schema compiler
  • Added a test case with a schema demonstrating the allOf + nullable pattern

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/SwaggerProvider.DesignTime/v3/DefinitionCompiler.fs Added pattern match case to handle JsonSchemaType.Null by compiling it as an object
tests/SwaggerProvider.ProviderTests/v3/Swagger.I0279.Tests.fs New compilation test for issue 279
tests/SwaggerProvider.ProviderTests/Schemas/v3/issue279.json Test schema with allOf and nullable: true pattern
tests/SwaggerProvider.ProviderTests/SwaggerProvider.ProviderTests.fsproj Added new test file to project

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sergey-tihon sergey-tihon changed the title fix: compile JsonSchemaType.Null as a object feat: Handle allOf with single reference Jan 3, 2026
@sergey-tihon sergey-tihon merged commit f32ae75 into master Jan 3, 2026
2 checks passed
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.

OpenApiClientProvider cannot parse Immich spec - allOf data model with single item

2 participants