From fa85d60652693fc3566d2e5c6fe16006cf4050e3 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Fri, 14 Feb 2025 17:17:28 +0100 Subject: [PATCH] Remove the unused password input schema --- crates/policy/src/bin/schema.rs | 3 +-- crates/policy/src/model.rs | 7 ------- policies/schema/password_input.json | 14 -------------- 3 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 policies/schema/password_input.json diff --git a/crates/policy/src/bin/schema.rs b/crates/policy/src/bin/schema.rs index 2b49b7955..5a33a907d 100644 --- a/crates/policy/src/bin/schema.rs +++ b/crates/policy/src/bin/schema.rs @@ -7,7 +7,7 @@ use std::path::{Path, PathBuf}; use mas_policy::model::{ - AuthorizationGrantInput, ClientRegistrationInput, EmailInput, PasswordInput, RegisterInput, + AuthorizationGrantInput, ClientRegistrationInput, EmailInput, RegisterInput, }; use schemars::{gen::SchemaSettings, JsonSchema}; @@ -45,5 +45,4 @@ fn main() { write_schema::(output_root, "client_registration_input.json"); write_schema::(output_root, "authorization_grant_input.json"); write_schema::(output_root, "email_input.json"); - write_schema::(output_root, "password_input.json"); } diff --git a/crates/policy/src/model.rs b/crates/policy/src/model.rs index 1868b699e..4e9539e2b 100644 --- a/crates/policy/src/model.rs +++ b/crates/policy/src/model.rs @@ -166,12 +166,5 @@ pub struct AuthorizationGrantInput<'a> { #[cfg_attr(feature = "jsonschema", derive(schemars::JsonSchema))] pub struct EmailInput<'a> { pub email: &'a str, -} -/// Input for the password set policy. -#[derive(Serialize, Debug)] -#[serde(rename_all = "snake_case")] -#[cfg_attr(feature = "jsonschema", derive(schemars::JsonSchema))] -pub struct PasswordInput<'a> { - pub password: &'a str, } diff --git a/policies/schema/password_input.json b/policies/schema/password_input.json deleted file mode 100644 index c3cbf92d8..000000000 --- a/policies/schema/password_input.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "PasswordInput", - "description": "Input for the password set policy.", - "type": "object", - "required": [ - "password" - ], - "properties": { - "password": { - "type": "string" - } - } -} \ No newline at end of file