/
VersionSelector.java
36 lines (31 loc) · 1.05 KB
/
VersionSelector.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package au.com.dius.pact.provider.junitsupport.loader;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Used to specify which versions to use when querying the Pact matrix.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Inherited
public @interface VersionSelector {
/**
* Tags to use to fetch pacts for. Empty string represents all tags.
*/
String tag() default "";
/**
* "true" to fetch the latest version of the pact, or "false" to fetch all versions
*/
String latest() default "true";
/**
* Consumer name to fetch pacts for. Empty string represents all consumers
*/
String consumer() default "";
/**
* If a pact for the specified tag does not exist, then use this tag as a fallback. This is useful for
* co-ordinating development between consumer and provider teams when matching branch names are used.
*/
String fallbackTag() default "";
}