@@ -34,10 +34,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
3434 "CreatePromptRequest" ,
3535 r#"#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]"# ,
3636 )
37- . type_attribute (
38- "CreateFieldRequest" ,
39- r#"#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]"# ,
40- )
4137 . type_attribute (
4238 "FieldOptions.options" ,
4339 r#"#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]"# ,
@@ -79,36 +75,58 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
7975 r#"#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]"# ,
8076 )
8177 . type_attribute ( "CreateTargetRequest" , "#[derive(validator::Validate)]" )
82- . field_attribute ( "CreateTargetRequest.name" , "#[validate(length(max = 255))]" )
78+ . field_attribute (
79+ "CreateTargetRequest.name" ,
80+ "#[validate(length(min = 1, max = 255), non_control_character)]" ,
81+ )
82+ . field_attribute (
83+ "CreateTargetRequest.description" ,
84+ "#[validate(length(min = 1, max = 255), non_control_character)]" ,
85+ )
8386 . type_attribute ( "UpdateTargetRequest" , "#[derive(validator::Validate)]" )
84- . field_attribute ( "UpdateTargetRequest.name" , "#[validate(length(max = 255))]" )
87+ . field_attribute (
88+ "UpdateTargetRequest.name" ,
89+ "#[validate(length(min = 1, max = 255), non_control_character)]" ,
90+ )
8591 . field_attribute (
8692 "UpdateTargetRequest.description" ,
87- "#[validate(length(max = 255))]" ,
93+ "#[validate(length(min = 1, max = 255), non_control_character )]" ,
8894 )
8995 . type_attribute ( "CreatePromptRequest" , "#[derive(validator::Validate)]" )
90- . field_attribute ( "CreatePromptRequest.title" , "#[validate(length(max = 32))]" )
96+ . field_attribute (
97+ "CreatePromptRequest.title" ,
98+ "#[validate(length(min = 1, max = 32), non_control_character)]" ,
99+ )
91100 . field_attribute (
92101 "UpdatePromptRequest.description" ,
93- "#[validate(length(max = 255))]" ,
102+ "#[validate(length(min = 1, max = 255), non_control_character )]" ,
94103 )
95104 . type_attribute ( "UpdatePromptRequest" , "#[derive(validator::Validate)]" )
96- . field_attribute ( "UpdatePromptRequest.title" , "#[validate(length(max = 32))]" )
105+ . field_attribute (
106+ "UpdatePromptRequest.title" ,
107+ "#[validate(length(min = 1, max = 32), non_control_character)]" ,
108+ )
97109 . field_attribute (
98110 "CreatePromptRequest.description" ,
99- "#[validate(length(max = 255))]" ,
111+ "#[validate(length(min = 1, max = 255), non_control_character )]" ,
100112 )
101113 . type_attribute ( "CreateFieldRequest" , "#[derive(validator::Validate)]" )
102- . field_attribute ( "CreateFieldRequest.title" , "#[validate(length(max = 32))]" )
114+ . field_attribute (
115+ "CreateFieldRequest.title" ,
116+ "#[validate(length(min = 1, max = 32), non_control_character)]" ,
117+ )
103118 . field_attribute (
104119 "CreateFieldRequest.description" ,
105- "#[validate(length(max = 255))]" ,
120+ "#[validate(length(min = 1, max = 255), non_control_character )]" ,
106121 )
107122 . type_attribute ( "UpdateFieldRequest" , "#[derive(validator::Validate)]" )
108- . field_attribute ( "UpdateFieldRequest.title" , "#[validate(length(max = 32))]" )
123+ . field_attribute (
124+ "UpdateFieldRequest.title" ,
125+ "#[validate(length(min = 1, max = 32), non_control_character)]" ,
126+ )
109127 . field_attribute (
110128 "UpdateFieldRequest.description" ,
111- "#[validate(length(max = 255))]" ,
129+ "#[validate(length(min = 1, max = 255), non_control_character )]" ,
112130 )
113131 . type_attribute (
114132 "GetTargetsRequest" ,
0 commit comments