1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-06 06:02:40 +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 = [ dependencies = [
"chrono", "chrono",
"dyn-clone", "dyn-clone",
"indexmap 1.9.3",
"schemars_derive", "schemars_derive",
"serde", "serde",
"serde_json", "serde_json",

View File

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

View File

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

View File

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

View File

@@ -24,7 +24,7 @@ p256 = { version = "0.13.2", features = ["ecdsa"] }
p384 = { version = "0.13.0", features = ["ecdsa"] } p384 = { version = "0.13.0", features = ["ecdsa"] }
rand.workspace = true rand.workspace = true
rsa = "0.9.6" rsa = "0.9.6"
schemars = "0.8.16" schemars.workspace = true
sec1 = "0.7.3" sec1 = "0.7.3"
serde.workspace = true serde.workspace = true
serde_json.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" } opa-wasm = { git = "https://github.com/matrix-org/rust-opa-wasm.git" }
serde.workspace = true serde.workspace = true
serde_json.workspace = true serde_json.workspace = true
schemars = {version = "0.8.16", optional = true } schemars = { workspace = true, optional = true }
thiserror.workspace = true thiserror.workspace = true
tokio = { version = "1.35.1", features = ["io-util", "rt"] } tokio = { version = "1.35.1", features = ["io-util", "rt"] }
tracing.workspace = true tracing.workspace = true

File diff suppressed because it is too large Load Diff

View File

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

View File

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