diff --git a/java/google/registry/rdap/RdapJsonFormatter.java b/java/google/registry/rdap/RdapJsonFormatter.java index cbf345b0c..d8d1bc3be 100644 --- a/java/google/registry/rdap/RdapJsonFormatter.java +++ b/java/google/registry/rdap/RdapJsonFormatter.java @@ -696,6 +696,16 @@ public class RdapJsonFormatter { jsonBuilder.put("ipAddresses", ipAddressesBuilder.build()); } } + ImmutableList> entities = + addRegistrarEntity( + ImmutableList.of(), + hostResource.getPersistedCurrentSponsorClientId(), + linkBase, + whoisServer, + now); + if (!entities.isEmpty()) { + jsonBuilder.put("entities", entities); + } if (whoisServer != null) { jsonBuilder.put("port43", whoisServer); } diff --git a/javatests/google/registry/rdap/RdapJsonFormatterTest.java b/javatests/google/registry/rdap/RdapJsonFormatterTest.java index a757c1141..cfdecf8ff 100644 --- a/javatests/google/registry/rdap/RdapJsonFormatterTest.java +++ b/javatests/google/registry/rdap/RdapJsonFormatterTest.java @@ -133,42 +133,60 @@ public class RdapJsonFormatterTest { ImmutableList.of("Somewhere", "Over the Rainbow"), clock.nowUtc().minusYears(4), registrar); - hostResourceIpv4 = makeAndPersistHostResource( - "ns1.cat.みんな", "1.2.3.4", clock.nowUtc().minusYears(1)); - hostResourceIpv6 = makeAndPersistHostResource( - "ns2.cat.みんな", "bad:f00d:cafe:0:0:0:15:beef", clock.nowUtc().minusYears(2)); - hostResourceBoth = makeAndPersistHostResource( - "ns3.cat.みんな", "1.2.3.4", "bad:f00d:cafe:0:0:0:15:beef", clock.nowUtc().minusYears(3)); - hostResourceNoAddresses = makeAndPersistHostResource( - "ns4.cat.みんな", null, clock.nowUtc().minusYears(4)); - hostResourceNotLinked = makeAndPersistHostResource( - "ns5.cat.みんな", null, clock.nowUtc().minusYears(5)); - hostResourceSuperordinatePendingTransfer = persistResource( - makeAndPersistHostResource("ns1.dog.みんな", null, clock.nowUtc().minusYears(6)) - .asBuilder() - .setSuperordinateDomain(Key.create( - persistResource( - makeDomainResource( - "dog.みんな", - contactResourceRegistrant, - contactResourceAdmin, - contactResourceTech, - null, - null, - registrar) - .asBuilder() - .addStatusValue(StatusValue.PENDING_TRANSFER) - .setTransferData(new TransferData.Builder() - .setTransferStatus(TransferStatus.PENDING) - .setGainingClientId("NewRegistrar") - .setTransferRequestTime(clock.nowUtc().minusDays(1)) - .setLosingClientId("TheRegistrar") - .setPendingTransferExpirationTime(clock.nowUtc().plusYears(100)) - .setTransferredRegistrationExpirationTime( - DateTime.parse("2111-10-08T00:44:59Z")) - .build()) - .build()))) - .build()); + hostResourceIpv4 = + makeAndPersistHostResource( + "ns1.cat.みんな", "1.2.3.4", null, clock.nowUtc().minusYears(1), "unicoderegistrar"); + hostResourceIpv6 = + makeAndPersistHostResource( + "ns2.cat.みんな", + "bad:f00d:cafe:0:0:0:15:beef", + null, + clock.nowUtc().minusYears(2), + "unicoderegistrar"); + hostResourceBoth = + makeAndPersistHostResource( + "ns3.cat.みんな", + "1.2.3.4", + "bad:f00d:cafe:0:0:0:15:beef", + clock.nowUtc().minusYears(3), + "unicoderegistrar"); + hostResourceNoAddresses = + makeAndPersistHostResource( + "ns4.cat.みんな", null, null, clock.nowUtc().minusYears(4), "unicoderegistrar"); + hostResourceNotLinked = + makeAndPersistHostResource( + "ns5.cat.みんな", null, null, clock.nowUtc().minusYears(5), "unicoderegistrar"); + hostResourceSuperordinatePendingTransfer = + persistResource( + makeAndPersistHostResource( + "ns1.dog.みんな", null, null, clock.nowUtc().minusYears(6), "unicoderegistrar") + .asBuilder() + .setSuperordinateDomain( + Key.create( + persistResource( + makeDomainResource( + "dog.みんな", + contactResourceRegistrant, + contactResourceAdmin, + contactResourceTech, + null, + null, + registrar) + .asBuilder() + .addStatusValue(StatusValue.PENDING_TRANSFER) + .setTransferData( + new TransferData.Builder() + .setTransferStatus(TransferStatus.PENDING) + .setGainingClientId("NewRegistrar") + .setTransferRequestTime(clock.nowUtc().minusDays(1)) + .setLosingClientId("TheRegistrar") + .setPendingTransferExpirationTime( + clock.nowUtc().plusYears(100)) + .setTransferredRegistrationExpirationTime( + DateTime.parse("2111-10-08T00:44:59Z")) + .build()) + .build()))) + .build()); domainResourceFull = persistResource( makeDomainResource( "cat.みんな", diff --git a/javatests/google/registry/rdap/testdata/rdap_domain.json b/javatests/google/registry/rdap/testdata/rdap_domain.json index a0ddc3655..b02e3f86e 100644 --- a/javatests/google/registry/rdap/testdata/rdap_domain.json +++ b/javatests/google/registry/rdap/testdata/rdap_domain.json @@ -65,7 +65,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] }, { "status": [ @@ -98,7 +152,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] } ], "ldhName": "%NAME%", diff --git a/javatests/google/registry/rdap/testdata/rdap_domain_cat2.json b/javatests/google/registry/rdap/testdata/rdap_domain_cat2.json index 94c974aa5..f8c03c622 100644 --- a/javatests/google/registry/rdap/testdata/rdap_domain_cat2.json +++ b/javatests/google/registry/rdap/testdata/rdap_domain_cat2.json @@ -65,7 +65,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] }, { "status": [ @@ -98,7 +152,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] } ], "ldhName": "%NAME%", diff --git a/javatests/google/registry/rdap/testdata/rdap_domain_deleted.json b/javatests/google/registry/rdap/testdata/rdap_domain_deleted.json index 275bcdeea..d5827f9fb 100644 --- a/javatests/google/registry/rdap/testdata/rdap_domain_deleted.json +++ b/javatests/google/registry/rdap/testdata/rdap_domain_deleted.json @@ -71,7 +71,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] }, { "status": [ @@ -103,7 +157,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] } ], "ldhName": "%NAME%", diff --git a/javatests/google/registry/rdap/testdata/rdap_domain_no_contacts.json b/javatests/google/registry/rdap/testdata/rdap_domain_no_contacts.json index 45d568469..e8b0e4945 100644 --- a/javatests/google/registry/rdap/testdata/rdap_domain_no_contacts.json +++ b/javatests/google/registry/rdap/testdata/rdap_domain_no_contacts.json @@ -67,7 +67,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] }, { "status": [ @@ -100,7 +154,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] } ], "entities": [ diff --git a/javatests/google/registry/rdap/testdata/rdap_domain_no_contacts_with_remark.json b/javatests/google/registry/rdap/testdata/rdap_domain_no_contacts_with_remark.json index 56401a7df..7ae7a4c71 100644 --- a/javatests/google/registry/rdap/testdata/rdap_domain_no_contacts_with_remark.json +++ b/javatests/google/registry/rdap/testdata/rdap_domain_no_contacts_with_remark.json @@ -67,7 +67,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] }, { "status": [ @@ -100,7 +154,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] } ], "entities": [ diff --git a/javatests/google/registry/rdap/testdata/rdap_domain_unicode.json b/javatests/google/registry/rdap/testdata/rdap_domain_unicode.json index 36bba7422..2d50cfaaa 100644 --- a/javatests/google/registry/rdap/testdata/rdap_domain_unicode.json +++ b/javatests/google/registry/rdap/testdata/rdap_domain_unicode.json @@ -68,7 +68,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] }, { "status": [ @@ -103,7 +157,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] } ], "ldhName": "%PUNYCODENAME%", diff --git a/javatests/google/registry/rdap/testdata/rdap_domain_unicode_no_contacts_with_remark.json b/javatests/google/registry/rdap/testdata/rdap_domain_unicode_no_contacts_with_remark.json index ac4bcd985..22ad10440 100644 --- a/javatests/google/registry/rdap/testdata/rdap_domain_unicode_no_contacts_with_remark.json +++ b/javatests/google/registry/rdap/testdata/rdap_domain_unicode_no_contacts_with_remark.json @@ -69,7 +69,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] }, { "status": [ @@ -103,7 +157,61 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities": [ + { + "objectClassName": "entity", + "status": [ "active" ], + "handle": "1", + "roles": [ "registrar" ], + "links": [ + { + "href": "https://example.com/rdap/entity/1", + "type": "application/rdap+json", + "rel": "self", + "value": "https://example.com/rdap/entity/1" + } + ], + "vcardArray" : [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + [ + "adr", + {}, + "text", + [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States" + ] + ], + ["tel", {"type":["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "publicIds" : [ + { + "type": "IANA Registrar ID", + "identifier":"1" + } + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] } ], "entities": [ diff --git a/javatests/google/registry/rdap/testdata/rdap_host.json b/javatests/google/registry/rdap/testdata/rdap_host.json index f6b76b4af..0e63df24c 100644 --- a/javatests/google/registry/rdap/testdata/rdap_host.json +++ b/javatests/google/registry/rdap/testdata/rdap_host.json @@ -28,5 +28,56 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] } diff --git a/javatests/google/registry/rdap/testdata/rdap_host_external.json b/javatests/google/registry/rdap/testdata/rdap_host_external.json index 282c4b928..775355ad5 100644 --- a/javatests/google/registry/rdap/testdata/rdap_host_external.json +++ b/javatests/google/registry/rdap/testdata/rdap_host_external.json @@ -23,5 +23,56 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] } diff --git a/javatests/google/registry/rdap/testdata/rdap_host_linked.json b/javatests/google/registry/rdap/testdata/rdap_host_linked.json index ec0386b2a..40ef93d65 100644 --- a/javatests/google/registry/rdap/testdata/rdap_host_linked.json +++ b/javatests/google/registry/rdap/testdata/rdap_host_linked.json @@ -29,5 +29,56 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] } diff --git a/javatests/google/registry/rdap/testdata/rdap_host_unicode.json b/javatests/google/registry/rdap/testdata/rdap_host_unicode.json index 86be4ca04..bc4eb03cf 100644 --- a/javatests/google/registry/rdap/testdata/rdap_host_unicode.json +++ b/javatests/google/registry/rdap/testdata/rdap_host_unicode.json @@ -29,5 +29,56 @@ "eventDate": "2000-01-01T00:00:00.000Z" } ], - "objectClassName": "nameserver" + "objectClassName": "nameserver", + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } + ] } diff --git a/javatests/google/registry/rdap/testdata/rdap_multiple_hosts.json b/javatests/google/registry/rdap/testdata/rdap_multiple_hosts.json index 239af79dd..50da9751e 100644 --- a/javatests/google/registry/rdap/testdata/rdap_multiple_hosts.json +++ b/javatests/google/registry/rdap/testdata/rdap_multiple_hosts.json @@ -27,6 +27,57 @@ ], "type": "object truncated due to unexplainable reasons" } + ], + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } ] }, { @@ -56,6 +107,57 @@ ], "type": "object truncated due to unexplainable reasons" } + ], + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } ] } ], diff --git a/javatests/google/registry/rdap/testdata/rdap_nontruncated_hosts.json b/javatests/google/registry/rdap/testdata/rdap_nontruncated_hosts.json index 03653b9ff..b4f477de9 100644 --- a/javatests/google/registry/rdap/testdata/rdap_nontruncated_hosts.json +++ b/javatests/google/registry/rdap/testdata/rdap_nontruncated_hosts.json @@ -27,6 +27,57 @@ ], "type": "object truncated due to unexplainable reasons" } + ], + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } ] }, { @@ -55,6 +106,57 @@ ], "type": "object truncated due to unexplainable reasons" } + ], + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } ] }, { @@ -83,6 +185,57 @@ ], "type": "object truncated due to unexplainable reasons" } + ], + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } ] }, { @@ -111,6 +264,57 @@ ], "type": "object truncated due to unexplainable reasons" } + ], + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } ] } ], diff --git a/javatests/google/registry/rdap/testdata/rdap_truncated_hosts.json b/javatests/google/registry/rdap/testdata/rdap_truncated_hosts.json index 224f2621a..1f96af833 100644 --- a/javatests/google/registry/rdap/testdata/rdap_truncated_hosts.json +++ b/javatests/google/registry/rdap/testdata/rdap_truncated_hosts.json @@ -27,6 +27,57 @@ ], "type": "object truncated due to unexplainable reasons" } + ], + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } ] }, { @@ -55,6 +106,57 @@ ], "type": "object truncated due to unexplainable reasons" } + ], + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } ] }, { @@ -83,6 +185,57 @@ ], "type": "object truncated due to unexplainable reasons" } + ], + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } ] }, { @@ -111,6 +264,57 @@ ], "type": "object truncated due to unexplainable reasons" } + ], + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "https://example.tld/rdap/entity/1", + "rel" : "self", + "href" : "https://example.tld/rdap/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "The Registrar"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard", + "Williamsburg", + "NY", + "11211", + "United States"]], + ["tel", {"type" : ["voice"]}, "uri", "tel:+1.2223334444"], + ["email", {}, "text", "new.registrar@example.com"] + ] + ], + "remarks": [ + { + "title": "Incomplete Data", + "description": [ + "Summary data only. For complete data, send a specific query for the object." + ], + "type": "object truncated due to unexplainable reasons" + } + ] + } ] } ], diff --git a/javatests/google/registry/rdap/testdata/rdapjson_domain_full.json b/javatests/google/registry/rdap/testdata/rdapjson_domain_full.json index 660137266..2671ecc6e 100644 --- a/javatests/google/registry/rdap/testdata/rdapjson_domain_full.json +++ b/javatests/google/registry/rdap/testdata/rdapjson_domain_full.json @@ -69,7 +69,59 @@ "ipAddresses" : { "v4" : ["1.2.3.4"] - } + }, + "entities" : [ + { + "objectClassName" : "entity", + "handle" : "1", + "status" : ["active"], + "roles" : ["registrar"], + "links" : + [ + { + "value" : "http://myserver.example.com/entity/1", + "rel" : "self", + "href" : "http://myserver.example.com/entity/1", + "type" : "application/rdap+json" + } + ], + "publicIds" : + [ + { + "type" : "IANA Registrar ID", + "identifier" : "1" + } + ], + "vcardArray" : + [ + "vcard", + [ + ["version", {}, "text", "4.0"], + ["fn", {}, "text", "みんな"], + ["adr", {}, "text", [ + "", + "", + "123 Example Boulevard