-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathdataActions.xsd
138 lines (126 loc) · 5.72 KB
/
dataActions.xsd
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="commonAttributes.xsd"/>
<xs:group name="dataOperationTags">
<xs:choice>
<xs:element type="createDataType" name="createData" minOccurs="0" maxOccurs="unbounded"/>
<xs:element type="deleteDataType" name="deleteData" minOccurs="0" maxOccurs="unbounded"/>
<xs:element type="updateDataType" name="updateData" minOccurs="0" maxOccurs="unbounded"/>
<xs:element type="getDataType" name="getData" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
</xs:group>
<!-- Data Attributes -->
<xs:attribute type="xs:string" name="createDataKey">
<xs:annotation>
<xs:documentation>
Reference to the stepKey of a previously executed createData test action.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute type="xs:string" name="entity">
<xs:annotation>
<xs:documentation>
Name of entity to be used in data operation.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute type="xs:string" name="storeCode">
<xs:annotation>
<xs:documentation>
Store code that you wish to perform data operation against.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute type="xs:string" name="actionGroup">
<xs:annotation>
<xs:documentation>
StepKey of the ActionGroup where this data was created, if it was created in one.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<!-- Complex Types -->
<xs:complexType name="createDataType">
<xs:annotation>
<xs:documentation>Create an entity (e.g. a category or product). In other words, make a POST request to the Magento API according to the data and metadata of the entity to be created.</xs:documentation>
</xs:annotation>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element type="requiredEntityType" name="requiredEntity" minOccurs="0" maxOccurs="unbounded"/>
<xs:element type="additionalFieldType" name="field" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:attribute ref="entity" use="required"/>
<xs:attributeGroup ref="commonActionAttributes"/>
<xs:attribute ref="storeCode"/>
</xs:complexType>
<xs:complexType name="updateDataType">
<xs:annotation>
<xs:documentation>Updates a previously created entity (via createData).</xs:documentation>
</xs:annotation>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element type="requiredEntityType" name="requiredEntity" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:attribute ref="entity" use="required"/>
<xs:attribute ref="createDataKey" use="required"/>
<xs:attribute ref="actionGroup"/>
<xs:attributeGroup ref="commonActionAttributes"/>
</xs:complexType>
<xs:complexType name="deleteDataType">
<xs:annotation>
<xs:documentation>Deletes a previously created entity (via createData).</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute ref="url"/>
<xs:attribute ref="createDataKey"/>
<xs:attribute ref="actionGroup"/>
<xs:attributeGroup ref="commonActionAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="getDataType">
<xs:annotation>
<xs:documentation>Retrieves an entity. In other words, makes a GET request to the Magento API according to the data and metadata of the entity type that is requested.</xs:documentation>
</xs:annotation>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element type="requiredEntityType" name="requiredEntity" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:attribute ref="entity" use="required"/>
<xs:attribute type="xs:integer" name="index">
<xs:annotation>
<xs:documentation>
If getData is supposed to return an array of objects, grab only index instead.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="commonActionAttributes"/>
<xs:attribute ref="storeCode"/>
</xs:complexType>
<xs:complexType name="requiredEntityType">
<xs:annotation>
<xs:documentation>Previously created entities that this operation requires (via createData).</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute ref="createDataKey" use="required"/>
<xs:attribute ref="actionGroup"/>
<xs:attribute name="before"/>
<xs:attribute name="after"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="additionalFieldType">
<xs:annotation>
<xs:documentation>field used to override defined fields from metadata or existing data definitions, during operation.</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="key" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>