1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-07 17:03:01 +03:00

Move schemars to workspace dependencies

Also enables the `preserve_order` feature, hence the big schema output diff.
This commit is contained in:
Quentin Gliech
2024-03-01 10:46:45 +01:00
parent d5e1127c32
commit 46c565cc89
9 changed files with 1560 additions and 1554 deletions

1
Cargo.lock generated
View File

@@ -5054,6 +5054,7 @@ checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29"
dependencies = [
"chrono",
"dyn-clone",
"indexmap 1.9.3",
"schemars_derive",
"serde",
"serde_json",

View File

@@ -86,6 +86,11 @@ version = "1.0.12"
[workspace.dependencies.rand]
version = "0.8.5"
# JSON Schema generation
[workspace.dependencies.schemars]
version = "0.8.16"
features = ["url", "chrono", "preserve_order"]
# Serialization and deserialization
[workspace.dependencies.serde]
version = "1.0.196"

View File

@@ -23,7 +23,7 @@ camino = { workspace = true, features = ["serde1"] }
chrono.workspace = true
figment = { version = "0.10.14", features = ["env", "yaml", "test"] }
ipnetwork = { version = "0.20.0", features = ["serde", "schemars"] }
schemars = { version = "0.8.16", features = ["url", "chrono"] }
schemars.workspace = true
ulid.workspace = true
url.workspace = true

View File

@@ -13,7 +13,7 @@ workspace = true
[dependencies]
serde = { workspace = true, optional = true }
schemars = { version = "0.8.16", default-features = false, optional = true }
schemars = { workspace = true, optional = true }
[features]
default = ["serde", "schemars"]

View File

@@ -24,7 +24,7 @@ p256 = { version = "0.13.2", features = ["ecdsa"] }
p384 = { version = "0.13.0", features = ["ecdsa"] }
rand.workspace = true
rsa = "0.9.6"
schemars = "0.8.16"
schemars.workspace = true
sec1 = "0.7.3"
serde.workspace = true
serde_json.workspace = true

View File

@@ -16,7 +16,7 @@ anyhow.workspace = true
opa-wasm = { git = "https://github.com/matrix-org/rust-opa-wasm.git" }
serde.workspace = true
serde_json.workspace = true
schemars = {version = "0.8.16", optional = true }
schemars = { workspace = true, optional = true }
thiserror.workspace = true
tokio = { version = "1.35.1", features = ["io-util", "rt"] }
tracing.workspace = true

File diff suppressed because it is too large Load Diff

View File

@@ -9,19 +9,19 @@
"scope"
],
"properties": {
"user": {
"type": "object",
"additionalProperties": true
},
"client": {
"type": "object",
"additionalProperties": true
},
"grant_type": {
"$ref": "#/definitions/GrantType"
},
"scope": {
"type": "string"
},
"user": {
"type": "object",
"additionalProperties": true
"grant_type": {
"$ref": "#/definitions/GrantType"
}
},
"definitions": {

View File

@@ -12,12 +12,6 @@
"username"
],
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"registration_method": {
"type": "string",
"enum": [
@@ -26,6 +20,12 @@
},
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"email": {
"type": "string"
}
}
},
@@ -36,9 +36,6 @@
"username"
],
"properties": {
"email": {
"type": "string"
},
"registration_method": {
"type": "string",
"enum": [
@@ -47,6 +44,9 @@
},
"username": {
"type": "string"
},
"email": {
"type": "string"
}
}
}