[package]
name = "revolt-models"
version = "0.12.1"
edition = "2021"
license = "MIT"
authors = ["Paul Makles <me@insrt.uk>"]
description = "Revolt Backend: API Models"
repository = "https://github.com/stoatchat/stoatchat"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
serde = ["dep:serde", "revolt-permissions/serde", "indexmap/serde"]
schemas = ["dep:schemars", "revolt-permissions/schemas"]
utoipa = ["dep:utoipa"]
validator = ["dep:validator"]
rocket = ["dep:rocket"]
partials = ["dep:revolt_optional_struct", "serde", "schemas", "utoipa"]

default = ["serde", "partials", "rocket"]

[dependencies]
# Core
revolt-config = { workspace = true }
revolt-permissions = { workspace = true }

# Utility
regex = { workspace = true }
indexmap = { workspace = true }
once_cell = { workspace = true }
num_enum = { workspace = true }

# Rocket
rocket = { workspace = true, optional = true }

# Serialisation
revolt_optional_struct = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
iso8601-timestamp = { workspace = true, features = ["schema", "bson"] }

# Spec Generation
schemars = { workspace = true, features = ["indexmap2"], optional = true }
utoipa = { workspace = true, optional = true }

# Validation
validator = { workspace = true, features = ["derive"], optional = true }
