Skip to content

fix: missing conversion stubs for OneOfBuilder and AnyOfBuilder - #1647

Open
michaelvanstraten wants to merge 1 commit into
juhaku:masterfrom
michaelvanstraten:fix-missing-conversion-stubs-for-one_of_builder
Open

michaelvanstraten wants to merge 1 commit into
juhaku:masterfrom
michaelvanstraten:fix-missing-conversion-stubs-for-one_of_builder

Conversation

@michaelvanstraten

Copy link
Copy Markdown

Sorry for the drive by PR, I can open an issue if wanted.

If you currently do a utoipa::ToSchema derive on a struct which contains a object with a key that is an optional complex type, for example like this:

#[derive(utoipa::ToSchema)]
struct MyStruct {
  map: std::collections::BTreeMap<String, Option<NewString>>,
};

#[derive(utoipa::ToSchema)]
struct NewString(String);

this would result in a compilation error because utoipa-gen would generate a .additional_properties(Some(...)) call passing a OneOfBuilder. However the OneOfBuilder previous to this PR did not impl Into<AdditionalProperties<Schema>>.

Adjecent to #897.

@michaelvanstraten

Copy link
Copy Markdown
Author

@juhaku could you take a look at this?

@jphppd

jphppd commented Nov 16, 2026

Copy link
Copy Markdown

Hi, I'm also affected by the missing feature. Having the fix merged would indeed be nice 🙂.
Thanks!

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