Skip to content

Commit fe5758a

Browse files
committed
Rename message annotation parameter to errorMessage
1 parent d527139 commit fe5758a

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

src/main/kotlin/com/papsign/ktor/openapigen/annotations/type/string/length/Length.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ import com.papsign.ktor.openapigen.validation.ValidatorAnnotation
66
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
77
@SchemaProcessorAnnotation(LengthProcessor::class)
88
@ValidatorAnnotation(LengthProcessor::class)
9-
annotation class Length(val min: Int, val max: Int, val message: String = "")
9+
annotation class Length(val min: Int, val max: Int, val errorMessage: String = "")

src/main/kotlin/com/papsign/ktor/openapigen/annotations/type/string/length/LengthProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ object LengthProcessor : LengthConstraintProcessor<Length>() {
1212
}
1313

1414
override fun getConstraint(annotation: Length): LengthConstraint {
15-
return LengthConstraint(min = annotation.min, max = annotation.max, errorMessage = annotation.message)
15+
return LengthConstraint(min = annotation.min, max = annotation.max, errorMessage = annotation.errorMessage)
1616
}
1717
}

src/main/kotlin/com/papsign/ktor/openapigen/annotations/type/string/length/MaxLength.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ import com.papsign.ktor.openapigen.validation.ValidatorAnnotation
66
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
77
@SchemaProcessorAnnotation(MaxLengthProcessor::class)
88
@ValidatorAnnotation(MaxLengthProcessor::class)
9-
annotation class MaxLength(val value: Int, val message: String = "")
9+
annotation class MaxLength(val value: Int, val errorMessage: String = "")

src/main/kotlin/com/papsign/ktor/openapigen/annotations/type/string/length/MaxLengthProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ object MaxLengthProcessor : LengthConstraintProcessor<MaxLength>() {
1111
}
1212

1313
override fun getConstraint(annotation: MaxLength): LengthConstraint {
14-
return LengthConstraint(max = annotation.value, errorMessage = annotation.message)
14+
return LengthConstraint(max = annotation.value, errorMessage = annotation.errorMessage)
1515
}
1616
}

src/main/kotlin/com/papsign/ktor/openapigen/annotations/type/string/length/MinLength.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ import com.papsign.ktor.openapigen.validation.ValidatorAnnotation
66
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
77
@SchemaProcessorAnnotation(MinLengthProcessor::class)
88
@ValidatorAnnotation(MinLengthProcessor::class)
9-
annotation class MinLength(val value: Int, val message: String = "")
9+
annotation class MinLength(val value: Int, val errorMessage: String = "")

src/main/kotlin/com/papsign/ktor/openapigen/annotations/type/string/length/MinLengthProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ object MinLengthProcessor : LengthConstraintProcessor<MinLength>() {
1111
}
1212

1313
override fun getConstraint(annotation: MinLength): LengthConstraint {
14-
return LengthConstraint(min = annotation.value, errorMessage = annotation.message)
14+
return LengthConstraint(min = annotation.value, errorMessage = annotation.errorMessage)
1515
}
1616
}

src/main/kotlin/com/papsign/ktor/openapigen/annotations/type/string/pattern/RegularExpression.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ import com.papsign.ktor.openapigen.validation.ValidatorAnnotation
66
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
77
@SchemaProcessorAnnotation(RegularExpressionProcessor::class)
88
@ValidatorAnnotation(RegularExpressionProcessor::class)
9-
annotation class RegularExpression(val pattern: String, val message: String = "")
9+
annotation class RegularExpression(val pattern: String, val errorMessage: String = "")

src/main/kotlin/com/papsign/ktor/openapigen/annotations/type/string/pattern/RegularExpressionProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ object RegularExpressionProcessor : RegularExpressionConstraintProcessor<Regular
1111
}
1212

1313
override fun getConstraint(annotation: RegularExpression): RegularExpressionConstraint {
14-
return RegularExpressionConstraint(annotation.pattern, annotation.message)
14+
return RegularExpressionConstraint(annotation.pattern, annotation.errorMessage)
1515
}
1616
}

0 commit comments

Comments
 (0)