[package]
name = "swagger"
version = "6.3.0"
authors = ["Metaswitch Networks Ltd"]
license = "Apache-2.0"
description = "A set of common utilities for Rust code generated by swagger-codegen"
homepage = "https://github.com/Metaswitch/swagger-rs"
repository = "https://github.com/Metaswitch/swagger-rs"
readme = "README.md"
keywords = ["swagger"]
edition = "2018"

[badges.travis-ci]
repository = "Metaswitch/swagger-rs"

[features]
default = ["serdejson"]
multipart_form = ["mime"]
multipart_related = ["mime_multipart", "hyper_0_10", "mime_0_2"]
serdejson = ["serde", "serde_json"]
serdevalid = ["serdejson", "serde_valid", "regex", "paste"]
server = ["hyper/server"]
http1 = ["hyper/http1"]
http2 = ["hyper/http2"]
client = ["hyper/client"]
tcp = ["hyper/tcp"]
tls = ["native-tls", "openssl", "hyper-openssl", "hyper-tls"]
uds = ["tokio", "tokio/net"]
conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk-enum-derive"]

[dependencies]
base64 = "0.13"
serde = { version = "1.0.119", optional = true, features = ["derive"] }
serde_json = { version = "1.0", optional = true }
serde_valid = { version = "0.15", optional = true }
regex = { version = "1", optional = true }
paste = { version = "1", optional = true }
hyper = "0.14"
slog = { version = "2", features = [ "max_level_trace", "release_max_level_debug"] }
uuid = { version = "0.8", features = ["serde", "v4"] }
hyper-old-types = "0.11.0"
futures = "0.3"

# Conversion
frunk = { version = "0.3.0", optional = true }
frunk_derives = { version = "0.3.0", optional = true }
frunk_core = { version = "0.3.0", optional = true }
frunk-enum-derive = { version = "0.2.1", optional = true }
frunk-enum-core = { version = "0.2.1", optional = true }

# multipart/form-data
mime = { version = "0.3", optional = true }

# multipart/related
hyper_0_10 = {package = "hyper", version = "0.10", default-features = false, optional=true}
mime_multipart = {version = "0.6", optional = true}
mime_0_2 = { package = "mime", version = "0.2.6", optional = true }

# UDS (Unix Domain Sockets)
tokio = { version = "1.0", default-features = false, optional = true }

[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies]
hyper-openssl = { version = "0.9.0", optional = true }
openssl = { version = "0.10.28", optional = true }

[target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies]
hyper-tls = { version = "0.5", optional = true }
native-tls = { version = "0.2", optional = true }

[dev-dependencies]
tokio = {version = "1.0", features = ["macros", "rt"]}
bytes = "1.0"
hyper = { version = "0.14", features = ["client", "http1", "tcp"] }
