-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJsonPathEnum.java
61 lines (55 loc) · 1.72 KB
/
JsonPathEnum.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.jcp.automation.common.utils;
/**
* Author gkarabut
* since 9/11/17.
*/
public enum JsonPathEnum {
BASE_TYPE("[0].type"),
TYPE("$.type"),
BASE_NAME("[0].name"),
BASE_DESCRIPTION("[0].desc"),
BASE_PPURL("[0].ppUrl"),
BASE_IMAGES("[0].images"),
BASE_ITEMS("[0].items"),
ITEMS_PATH("$.items"),
PRICING_LOTS("[0].pricing.lots.data"),
REVIEWS("[0].valuation.reviews"),
VALUATION("[0].valuation"),
MAXQTY("$.maxQuantity"),
OPTIONS("$.options"),
ID("$.id"),
PRODUCT_IMAGE("$.productImage.url"),
VALUE("$.value"),
NAME("$.name"),
ISDEFAULT("$.isDefault"),
BASE_LOTS("[0].lots"),
MANADVERTISED("[0].pricing.root.manufacturerAdvertised"),
URL("$.url"),
RESTRICTIONS("[0].restrictions"),
WARRANTY_PRICE("$.price"),
WARRANTY_ID("$.itemId"),
WARRANTY_NAME("$.name"),
WARRANTY_SELECTED("$.selected"),
BASE_PROTECTION_PLAN("$.warranties"),
BASE_DIMENSIONS("[0].dimensions"),
BASE_PRICING_MARKETING("[0].pricing.root.marketingLabel"),
REQUEST_ITEMID("$..id"),
ITEMID("$.itemId"),
REQUEST_PRODUCT_ID("$.product.id"),
PRODUCT_ID("$.product.id"),
RESPONSE_ITEM_ID("[0].id"),
REQUEST_MOST_WANTED("$.mostWanted"),
REQUEST_QTY("$.quantity"),
REQUEST_WARRANTY_ID("$.warrantyId"),
RESPONSE_ACCOUNT_ID("$.account_id"),
RESPONSE_ITEMID_SYSTEM_PATTERN("$.items[?(@.itemId==%s)]");
// RESPONSE_ITEMID_SYSTEM_PATTERN("$.items[?(@.itemId==%s)].id");
// RESPONSE_ITEMID_SYSTEM("$.items.[0].id");
private String path;
JsonPathEnum(String value){
this.path = value;
}
public String getPath() {
return path.toString();
}
}