Home IfMinAttribute Class
IfMinAttribute Class
Cancel

IfMinAttribute Class

Namespace: Json.Schema.Generation

Inheritance: IfMinAttribute 🡒 ConditionalAttribute 🡒 Attribute 🡒 object

Implemented interfaces:

  • IConditionAttribute

Creates or amends a condition group by defining an expected minimum value in a property.

Remarks

The specific keywords which are added depend on the type of the targeted property.

Properties

NameTypeSummary
ConditionGroupobjectIdentifies the condition group under which this attribute applies.
IsExclusiveboolGets or sets whether the value should be exclusive.
PropertyNamestringThe property name.
TypeIdobject 
ValuedoubleThe expected minimum value.

Constructors

IfMinAttribute(string propertyName, double value, object group)

Creates a new Json.Schema.Generation.IfAttribute instance.

Declaration

1
public IfMinAttribute(string propertyName, double value, object group)
ParameterTypeDescription
propertyNamestringThe name of the property.
valuedoubleThe expected minimum value for the property.
groupobjectThe condition group.

Remarks

The parameter is provided as a double but stored as a decimal because decimal is not a valid attribute parameter type. As such, to prevent overflows, the value is clamped to the decimal range prior to being converted when applied as the minimum or exclusiveMinimum keywords.

Contents