Skip to content

Commit

Permalink
Change Option<T> compose to OneOfBuilder
Browse files Browse the repository at this point in the history
This commit change the `Option<T>` compose implementation from
`AllOfBuilder` to `OneOfBuilder`. This comes as follow up for #1135
which changed the `utoipa-gen` side nullable types from `allOf` to
`oneOf`.

Closes #1050 Closes #1135
  • Loading branch information
juhaku committed Oct 15, 2024
1 parent ea498f3 commit ee2bd9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utoipa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ pub mod __dev {
fn compose(
schemas: Vec<utoipa::openapi::RefOr<utoipa::openapi::schema::Schema>>,
) -> utoipa::openapi::RefOr<utoipa::openapi::schema::Schema> {
utoipa::openapi::schema::AllOfBuilder::new()
utoipa::openapi::schema::OneOfBuilder::new()
.item(
utoipa::openapi::schema::ObjectBuilder::new()
.schema_type(utoipa::openapi::schema::Type::Null),
Expand Down

0 comments on commit ee2bd9d

Please sign in to comment.