All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rust-server.Cargo.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
[package]
name = "{{{packageName}}}"
version = "{{{packageVersion}}}"
{{#infoEmail}}
authors = ["{{{.}}}"]
{{/infoEmail}}
{{^infoEmail}}
authors = ["OpenAPI Generator team and contributors"]
{{/infoEmail}}
{{#appDescription}}
description = "{{{.}}}"
{{/appDescription}}
{{#licenseInfo}}
license = "{{.}}"
{{/licenseInfo}}
{{^licenseInfo}}
# Override this license by providing a License Object in the OpenAPI.
license = "Unlicense"
{{/licenseInfo}}
edition = "2018"
{{#publishRustRegistry}}
publish = ["{{.}}"]
{{/publishRustRegistry}}
{{#repositoryUrl}}
repository = "{{.}}"
{{/repositoryUrl}}
{{#documentationUrl}}
documentation = "{{.}}"
{{/documentationUrl}}
{{#homePageUrl}}
homepage = "{{.}}
{{/homePageUrl}}

[features]
default = ["client", "server"]
client = [
{{#apiUsesMultipart}}
    "mime_0_2",
{{/apiUsesMultipart}}
{{#apiUsesMultipartFormData}}
    "multipart", "multipart/client", "swagger/multipart_form",
{{/apiUsesMultipartFormData}}
{{#apiUsesMultipartRelated}}
    "hyper_0_10", "mime_multipart",
{{/apiUsesMultipartRelated}}
{{#usesUrlEncodedForm}}
    "serde_urlencoded",
{{/usesUrlEncodedForm}}
{{#hasCallbacks}}
    "serde_ignored", "regex", "percent-encoding", "lazy_static",
{{/hasCallbacks}}
{{! Anything added to the list below, should probably be added to the callbacks list below }}
    "hyper", "hyper-openssl", "hyper-tls", "native-tls", "openssl", "url"
]
server = [
{{#apiUsesMultipart}}
    "mime_0_2",
{{/apiUsesMultipart}}
{{#apiUsesMultipartFormData}}
    "multipart", "multipart/server",
{{/apiUsesMultipartFormData}}
{{#apiUsesMultipartRelated}}
    "hyper_0_10", "mime_multipart",
{{/apiUsesMultipartRelated}}
{{#hasCallbacks}}
    "native-tls", "hyper-openssl", "hyper-tls", "openssl",
{{/hasCallbacks}}
{{! Anything added to the list below, should probably be added to the callbacks list above }}
   "serde_ignored", "hyper", "regex", "percent-encoding", "url", "lazy_static"
]
conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk-enum-derive"]

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

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

[dependencies]
# Common
async-trait = "0.1.24"
chrono = { version = "0.4", features = ["serde"] }
futures = "0.3"
swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] }
log = "0.4.0"
mime = "0.3"

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
validator = { version = "0.16", features = ["derive"] }

# Crates included if required by the API definition
{{#usesXml}}
# TODO: this should be updated to point at the official crate once
# https://github.com/RReverser/serde-xml-rs/pull/45 is accepted upstream
serde-xml-rs = {git = "https://github.com/Metaswitch/serde-xml-rs" , branch = "master"}
{{/usesXml}}
{{#apiUsesMultipart}}
mime_0_2 = { package = "mime", version = "0.2.6", optional = true }
{{/apiUsesMultipart}}
{{#apiUsesMultipartFormData}}
multipart = { version = "0.16", default-features = false, optional = true }
{{/apiUsesMultipartFormData}}
{{#apiUsesUuid}}
uuid = {version = "1.3.1", features = ["serde", "v4"]}
{{/apiUsesUuid}}

# Common between server and client features
hyper = {version = "0.14", features = ["full"], optional = true}
{{#apiUsesMultipartRelated}}
mime_multipart = {version = "0.5", optional = true}
hyper_0_10 = {package = "hyper", version = "0.10", default-features = false, optional=true}
{{/apiUsesMultipartRelated}}
serde_ignored = {version = "0.1.1", optional = true}
url = {version = "2.1", optional = true}

# Client-specific
{{#usesUrlEncodedForm}}
serde_urlencoded = {version = "0.6.1", optional = true}
{{/usesUrlEncodedForm}}

# Server, and client callback-specific
lazy_static = { version = "1.4", optional = true }
percent-encoding = {version = "2.1.0", optional = true}
regex = {version = "1.3", optional = true}

# 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.0", optional = true }
frunk-enum-core = { version = "0.2.0", optional = true }

[dev-dependencies]
clap = "2.25"
env_logger = "0.7"
tokio = { version = "1.14", features = ["full"] }
native-tls = "0.2"

[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies]
tokio-openssl = "0.6"
openssl = "0.10"

[[example]]
name = "client"
required-features = ["client"]

[[example]]
name = "server"
required-features = ["server"]




© 2015 - 2024 Weber Informatics LLC | Privacy Policy