Skip to content

Commit

Permalink
update indexmap to 2.0; fix boolean type
Browse files Browse the repository at this point in the history
  • Loading branch information
msrd0 committed May 13, 2024
1 parent 9e3b2ab commit 15bfc45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ include = ["src/**/*", "LICENSE", "crates-io.md"]

[features]
chrono = ["chrono04"]
indexmap = ["indexmap2"]
indexmap = ["indexmap1"]
linked-hash-map = ["linked-hash-map05"]
time = ["time03"]
uuid = ["uuid08", "uuid1"]

[dependencies]
indexmap = "1.7"
indexmap = "2.0"
openapi_type_derive = { path = "./derive", version = "0.4.4" }
openapiv3 = "=2.0.0"
serde_json = "1.0"

# optional dependencies / features
chrono04 = { package = "chrono", version = "0.4", default-features = false, optional = true }
indexmap2 = { package = "indexmap", version = "2.0", optional = true }
indexmap1 = { package = "indexmap", version = "1.0", optional = true }
linked-hash-map05 = { package = "linked-hash-map", version = "0.5", optional = true }
time03 = { package = "time", version = "0.3", features = ["serde-human-readable"], optional = true }
uuid08 = { package = "uuid", version = "0.8", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ map! {
IndexMap<K, V, S>(V);
}

#[cfg(feature = "indexmap2")]
#[cfg(feature = "indexmap1")]
map! {
indexmap2::IndexMap<K, V, S>(V);
indexmap1::IndexMap<K, V, S>(V);
}

#[cfg(feature = "linked-hash-map05")]
Expand Down
6 changes: 3 additions & 3 deletions src/visitor/openapi.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use super::{never::Never, seal, AlternativesVisitor, ObjectVisitor, Visitor};
use indexmap::{map::Entry, IndexMap};
use openapiv3::{
AdditionalProperties, ArrayType, IntegerFormat, IntegerType, NumberFormat, NumberType, ObjectType, ReferenceOr, Schema,
SchemaData, SchemaKind, StringFormat, StringType, Type, VariantOrUnknownOrEmpty
AdditionalProperties, ArrayType, BooleanType, IntegerFormat, IntegerType, NumberFormat, NumberType, ObjectType,
ReferenceOr, Schema, SchemaData, SchemaKind, StringFormat, StringType, Type, VariantOrUnknownOrEmpty
};
use std::fmt::Display;

Expand Down Expand Up @@ -140,7 +140,7 @@ impl OpenapiVisitor {

Self::Bool => Some(OpenapiSchema::new(Schema {
schema_data: Default::default(),
schema_kind: SchemaKind::Type(Type::Boolean {})
schema_kind: SchemaKind::Type(Type::Boolean(BooleanType::default()))
})),

Self::Int { byte, minimum } => Some(OpenapiSchema::new(Schema {
Expand Down

0 comments on commit 15bfc45

Please sign in to comment.