9 [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.ReturnValue |
10 AttributeTargets.Property | AttributeTargets.Field,
11 Inherited =
true, AllowMultiple =
false)]
22 this.MinLength =
null;
23 this.MaxLength =
null;
36 this.MinLength =
null;
69 public override void Annotate(Dictionary<string, object?> Schema)
71 base.Annotate(Schema);
74 Schema[
"minLength"] = this.
MinLength.Value;
77 Schema[
"maxLength"] = this.
MaxLength.Value;
87 Attributes[
"minlength"] = this.
MinLength.ToString();
90 Attributes[
"maxlength"] = this.
MaxLength.ToString();
Provides meta-data about a parameter.
string? Title
Title of parameter.
string? Description
Description of parameter.
Provides meta-data about a string-valued parameter.
override void Annotate(Dictionary< string, object?> Schema)
Annotates a schema object with information in the attribute.
int? MinLength
Minimum length of string.
McpStringParameterAttribute(string? Title, string? Description)
Provides meta-data about a string-valued parameter.
int? MaxLength
Maximum length of string.
McpStringParameterAttribute(string? Title, string? Description, int MaxLength)
Provides meta-data about a string-valued parameter.
McpStringParameterAttribute(string? Title, string? Description, int MinLength, int MaxLength)
Provides meta-data about a string-valued parameter.
override void GetHtmlInputAttributes(Dictionary< string, string > Attributes)
Gets HTML input attributes for the parameter, if any.