Top Description Methods
org.eclipse.microprofile.openapi.annotations.media

public @Interface PatternProperty

extends Annotation
Annotations
@Target
@Retention:RUNTIME
Imports
java.lang.annotation.Retention, .RetentionPolicy, .Target

A regular expression and an associated schema.

Used with Schema#patternProperties(), properties with names that match regex() must have values which validate against schema().

Since
4.0
See Also
Schema#patternProperties()

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

an ECMA-262 regular expression
regex
()

A regular expression to match against property names.

public Class<?>

Returns:

a class used to generate a schema used to validate properties with names that match regex()
schema
()

A schema that a property value must validate against

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

regexback to summary
public String regex()

A regular expression to match against property names.

Returns:String

an ECMA-262 regular expression

schemaback to summary
public Class<?> schema()

A schema that a property value must validate against

Returns:Class<?>

a class used to generate a schema used to validate properties with names that match regex()