Skip to content

Commit 0a52c9f

Browse files
committed
fix(bytes): forgot to add ToSchema impl
1 parent 2fed909 commit 0a52c9f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

utoipa/src/lib.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -800,11 +800,14 @@ impl PartialSchema for serde_json::Value {
800800
impl ToSchema for serde_json::Value {}
801801

802802
#[cfg(feature = "bytes")]
803-
impl PartialSchema for bytes::Bytes {
804-
fn schema() -> openapi::RefOr<openapi::schema::Schema> {
805-
<Vec<u8> as PartialSchema>::schema()
803+
const _: () = {
804+
impl PartialSchema for bytes::Bytes {
805+
fn schema() -> openapi::RefOr<openapi::schema::Schema> {
806+
<Vec<u8> as PartialSchema>::schema()
807+
}
806808
}
807-
}
809+
impl Schema for bytes::Bytes {}
810+
};
808811

809812
// Create `utoipa` module so we can use `utoipa-gen` directly from `utoipa` crate.
810813
// ONLY for internal use!

0 commit comments

Comments
 (0)