Skip to content

Commit

Permalink
fix schema for serde_repr usage
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed May 6, 2024
1 parent a7f3f41 commit dd3cd63
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@
],
"definitions": {
"BaselineIndex": {
"type": "string",
"type": "integer",
"enum": [
"First",
"Second"
0,
1
]
},
"BitReadStream": {
Expand Down Expand Up @@ -12993,12 +12993,12 @@
}
},
"UpdateType": {
"type": "string",
"type": "integer",
"enum": [
"Preserve",
"Leave",
"Enter",
"Delete"
0,
1,
2,
3
]
},
"UserCmd": {
Expand Down
2 changes: 1 addition & 1 deletion src/demo/message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub mod tempentities;
pub mod usermessage;
pub mod voice;

#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema_repr))]
#[derive(
BitRead, BitWrite, Debug, Clone, Copy, PartialEq, Eq, Serialize_repr, Deserialize_repr,
)]
Expand Down
4 changes: 2 additions & 2 deletions src/demo/message/packetentities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl PartialOrd<u32> for EntityId {
}
}

#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema_repr))]
#[derive(
BitRead, BitWrite, Clone, Copy, Debug, PartialEq, Eq, Serialize_repr, Deserialize_repr,
)]
Expand All @@ -88,7 +88,7 @@ pub enum UpdateType {
Delete = 0b11,
}

#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema_repr))]
#[derive(Debug, Eq, PartialEq, Copy, Clone, Serialize_repr, Deserialize_repr, Default)]
#[repr(u8)]
pub enum BaselineIndex {
Expand Down

0 comments on commit dd3cd63

Please sign in to comment.