Skip to content

Commit e68e788

Browse files
committed
check document references
1 parent cf3568e commit e68e788

File tree

18 files changed

+33
-28
lines changed

18 files changed

+33
-28
lines changed

src/main/java/net/apnic/rdap/conformance/attributetest/Country.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public boolean run(final Context context, final Result proto,
3838
Result nr = new Result(proto);
3939
nr.setCode("content");
4040
nr.addNode("country");
41-
nr.setDocument("draft-ietf-weirds-json-response-06");
41+
nr.setDocument("draft-ietf-weirds-json-response-07");
4242
nr.setReference("4");
4343

4444
String countryValue =

src/main/java/net/apnic/rdap/conformance/attributetest/DomainNames.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ private int isValidLdhName(final String ldhName) {
6565
public boolean run(final Context context, final Result proto,
6666
final Map<String, Object> data) {
6767
Result nr = new Result(proto);
68+
/* This would refer to a specific object class, but ldhName
69+
* and unicodeName appear in both nameservers and domains, and
70+
* section 4 is likely to be the most helpful part of the
71+
* document in the event of failure anyway. */
6872
nr.setCode("content");
6973
nr.setDocument("draft-ietf-weirds-json-response-07");
7074
nr.setReference("4");

src/main/java/net/apnic/rdap/conformance/attributetest/Entities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public boolean run(final Context context, final Result proto,
3232
/* Only set the reference if it is not already set, since the
3333
* entities attribute is described separately for each object. */
3434
if (nr.getDocument() == null) {
35-
nr.setDocument("draft-ietf-weirds-json-response-06");
35+
nr.setDocument("draft-ietf-weirds-json-response-07");
3636
nr.setReference("6.1");
3737
}
3838

src/main/java/net/apnic/rdap/conformance/attributetest/Entity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public boolean run(final Context context, final Result proto,
8585

8686
Result nr = new Result(proto);
8787
nr.setCode("content");
88-
nr.setDocument("draft-ietf-weirds-json-response-06");
88+
nr.setDocument("draft-ietf-weirds-json-response-07");
8989
nr.setReference("6.1");
9090

9191
String responseHandle =
@@ -157,7 +157,7 @@ public boolean run(final Context context, final Result proto,
157157
rr.addNode(Integer.toString(i));
158158
rr.setInfo("registered");
159159
rr.setStatus(Status.Success);
160-
rr.setReference("10.2.3");
160+
rr.setReference("11.2.3");
161161
if (!ROLES.contains(role)) {
162162
rr.setInfo("unregistered: " + role);
163163
rr.setStatus(Status.Failure);

src/main/java/net/apnic/rdap/conformance/attributetest/ErrorResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public boolean run(final Context context, final Result proto,
4040
final Map<String, Object> data) {
4141
Result p = new Result(proto);
4242
p.setCode("content");
43-
p.setDocument("draft-ietf-json-response-06");
43+
p.setDocument("draft-ietf-json-response-07");
4444
p.setReference("7");
4545

4646
List<AttributeTest> tests = new ArrayList(Arrays.asList(

src/main/java/net/apnic/rdap/conformance/attributetest/Event.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public boolean run(final Context context, final Result proto,
5656

5757
Result nr = new Result(proto);
5858
nr.setCode("content");
59+
nr.setDocument("draft-ietf-weirds-json-response-07");
60+
nr.setReference("5.5");
5961

6062
boolean evtres = true;
6163
String eventAction =
@@ -64,11 +66,9 @@ public boolean run(final Context context, final Result proto,
6466
if (eventAction == null) {
6567
evtres = false;
6668
} else {
67-
Result evr = new Result(proto);
68-
evr.setCode("content");
69+
Result evr = new Result(nr);
6970
evr.addNode("eventAction");
70-
evr.setDocument("draft-ietf-weirds-json-response-06");
71-
evr.setReference("10.2.2");
71+
evr.setReference("11.2.2");
7272
if (EVENT_ACTIONS.contains(eventAction)) {
7373
evr.setInfo("registered");
7474
evr.setStatus(Status.Success);
@@ -90,11 +90,9 @@ public boolean run(final Context context, final Result proto,
9090
if (eventDate == null) {
9191
evdres = false;
9292
} else {
93-
Result edvr = new Result(proto);
94-
edvr.setCode("content");
93+
Result edvr = new Result(nr);
9594
edvr.addNode("eventDate");
96-
edvr.setDocument("draft-ietf-weirds-json-response-06");
97-
edvr.setReference("10.2.2");
95+
edvr.setReference("4");
9896
DateTime dth = parser.parseDateTime(eventDate);
9997
if (dth != null) {
10098
edvr.setInfo("valid");
@@ -113,8 +111,7 @@ public boolean run(final Context context, final Result proto,
113111
Utils.getStringAttribute(context, nr, "eventActor",
114112
Status.Notification, data);
115113
if ((eventActor != null) && !allowActor) {
116-
Result eacr = new Result(proto);
117-
eacr.setCode("content");
114+
Result eacr = new Result(nr);
118115
eacr.addNode("eventActor");
119116
eacr.setInfo("not permitted here");
120117
eacr.setStatus(Status.Failure);

src/main/java/net/apnic/rdap/conformance/attributetest/Link.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public boolean run(final Context context, final Result proto,
171171

172172
Result nr = new Result(proto);
173173
nr.setCode("content");
174-
nr.setDocument("draft-ietf-weirds-json-response-06");
174+
nr.setDocument("draft-ietf-weirds-json-response-07");
175175
nr.setReference("5.2");
176176

177177
boolean success = true;

src/main/java/net/apnic/rdap/conformance/attributetest/Links.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public boolean run(final Context context, final Result proto,
2828

2929
Result nr = new Result(proto);
3030
nr.setCode("content");
31-
nr.setDocument("draft-ietf-weirds-json-response-06");
31+
nr.setDocument("draft-ietf-weirds-json-response-07");
3232
nr.setReference("5.2");
3333

3434
return arrayTest.run(context, nr, data);

src/main/java/net/apnic/rdap/conformance/attributetest/Notices.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
/**
1313
* <p>Notices class.</p>
1414
*
15+
* The key argument in the constructor is present so that both
16+
* 'remarks' and 'notices' elements can be tested by way of this
17+
* class.
18+
*
1519
* @author Tom Harrison <[email protected]>
1620
* @version 0.2
1721
*/
@@ -40,7 +44,7 @@ public boolean run(final Context context, final Result proto,
4044

4145
Result nr = new Result(proto);
4246
nr.setCode("content");
43-
nr.setDocument("draft-ietf-weirds-json-response-06");
47+
nr.setDocument("draft-ietf-weirds-json-response-07");
4448
nr.setReference("5.3");
4549

4650
return arrayTest.run(context, nr, data);

src/main/java/net/apnic/rdap/conformance/attributetest/Port43.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public boolean run(final Context context, final Result proto,
3939

4040
Result nr = new Result(proto);
4141
nr.setCode("content");
42-
nr.setDocument("draft-ietf-weirds-json-response-06");
42+
nr.setDocument("draft-ietf-weirds-json-response-07");
4343
nr.setReference("5.7");
4444

4545
String port43 = Utils.getStringAttribute(context, nr, "port43",

0 commit comments

Comments
 (0)