Skip to content

Commit

Permalink
Removed ValueParameter target on annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Wicpar committed Mar 17, 2021
1 parent 4b18a51 commit e30900c
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.papsign.ktor.openapigen.annotations.type.number.floating.clamp
import com.papsign.ktor.openapigen.schema.processor.SchemaProcessorAnnotation
import com.papsign.ktor.openapigen.validation.ValidatorAnnotation

@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(FClampProcessor::class)
@ValidatorAnnotation(FClampProcessor::class)
annotation class FClamp(val min: Double, val max: Double, val errorMessage: String = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.papsign.ktor.openapigen.annotations.type.number.floating.max
import com.papsign.ktor.openapigen.schema.processor.SchemaProcessorAnnotation
import com.papsign.ktor.openapigen.validation.ValidatorAnnotation

@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(FMaxProcessor::class)
@ValidatorAnnotation(FMaxProcessor::class)
annotation class FMax(val value: Double, val errorMessage: String = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.papsign.ktor.openapigen.annotations.type.number.floating.min
import com.papsign.ktor.openapigen.schema.processor.SchemaProcessorAnnotation
import com.papsign.ktor.openapigen.validation.ValidatorAnnotation

@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(FMinProcessor::class)
@ValidatorAnnotation(FMinProcessor::class)
annotation class FMin(val value: Double, val errorMessage: String = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.papsign.ktor.openapigen.annotations.type.number.integer.clamp
import com.papsign.ktor.openapigen.schema.processor.SchemaProcessorAnnotation
import com.papsign.ktor.openapigen.validation.ValidatorAnnotation

@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(ClampProcessor::class)
@ValidatorAnnotation(ClampProcessor::class)
annotation class Clamp(val min: Long, val max: Long, val errorMessage: String = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.papsign.ktor.openapigen.annotations.type.number.integer.max
import com.papsign.ktor.openapigen.schema.processor.SchemaProcessorAnnotation
import com.papsign.ktor.openapigen.validation.ValidatorAnnotation

@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(MaxProcessor::class)
@ValidatorAnnotation(MaxProcessor::class)
annotation class Max(val value: Long, val errorMessage: String = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.papsign.ktor.openapigen.annotations.type.number.integer.min
import com.papsign.ktor.openapigen.schema.processor.SchemaProcessorAnnotation
import com.papsign.ktor.openapigen.validation.ValidatorAnnotation

@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(MinProcessor::class)
@ValidatorAnnotation(MinProcessor::class)
annotation class Min(val value: Long, val errorMessage: String = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import kotlin.reflect.KClass
/**
* Careful, no type checking done if you give the wrong provider
*/
@Target(AnnotationTarget.CLASS, AnnotationTarget.TYPE, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.CLASS, AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(ExampleProcessor::class)
annotation class WithExample(val provider: KClass<out ExampleProvider<*>> = NoExampleProvider::class)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.papsign.ktor.openapigen.schema.processor.SchemaProcessorAnnotation
/**
* Provide examples for a String property
*/
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(StringExampleProcessor::class)
annotation class StringExample(vararg val examples: String)

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.papsign.ktor.openapigen.annotations.type.string.length
import com.papsign.ktor.openapigen.schema.processor.SchemaProcessorAnnotation
import com.papsign.ktor.openapigen.validation.ValidatorAnnotation

@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(LengthProcessor::class)
@ValidatorAnnotation(LengthProcessor::class)
annotation class Length(val min: Int, val max: Int, val errorMessage: String = "")
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.papsign.ktor.openapigen.annotations.type.string.length
import com.papsign.ktor.openapigen.schema.processor.SchemaProcessorAnnotation
import com.papsign.ktor.openapigen.validation.ValidatorAnnotation

@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(MaxLengthProcessor::class)
@ValidatorAnnotation(MaxLengthProcessor::class)
annotation class MaxLength(val value: Int, val errorMessage: String = "")
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.papsign.ktor.openapigen.annotations.type.string.length
import com.papsign.ktor.openapigen.schema.processor.SchemaProcessorAnnotation
import com.papsign.ktor.openapigen.validation.ValidatorAnnotation

@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(MinLengthProcessor::class)
@ValidatorAnnotation(MinLengthProcessor::class)
annotation class MinLength(val value: Int, val errorMessage: String = "")
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.papsign.ktor.openapigen.annotations.type.string.pattern
import com.papsign.ktor.openapigen.schema.processor.SchemaProcessorAnnotation
import com.papsign.ktor.openapigen.validation.ValidatorAnnotation

@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
@Target(AnnotationTarget.TYPE, AnnotationTarget.PROPERTY)
@SchemaProcessorAnnotation(RegularExpressionProcessor::class)
@ValidatorAnnotation(RegularExpressionProcessor::class)
annotation class RegularExpression(@org.intellij.lang.annotations.Language("RegExp") val pattern: String, val errorMessage: String = "")
Expand Down

0 comments on commit e30900c

Please sign in to comment.