-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDAP Relation Searches Endpoint #1603
base: master
Are you sure you want to change the base?
Conversation
Code scanning results / CodeQL is throwing an issue not related with this PR. It is scanning the class and complaining about a regex that exist already in master. I created a task in the backlog to look into it. |
whois-api/src/main/java/net/ripe/db/whois/api/rdap/RdapRelationService.java
Outdated
Show resolved
Hide resolved
whois-api/src/main/java/net/ripe/db/whois/api/rdap/RdapRelationService.java
Outdated
Show resolved
Hide resolved
whois-api/src/main/java/net/ripe/db/whois/api/rdap/RdapRelationService.java
Show resolved
Hide resolved
whois-api/src/main/java/net/ripe/db/whois/api/rdap/RdapRelationService.java
Outdated
Show resolved
Hide resolved
whois-api/src/test/java/net/ripe/db/whois/api/rdap/RdapServiceTestIntegration.java
Show resolved
Hide resolved
whois-api/src/test/java/net/ripe/db/whois/api/rdap/RdapServiceTestIntegration.java
Show resolved
Hide resolved
whois-api/src/test/java/net/ripe/db/whois/api/rdap/RdapServiceTestIntegration.java
Show resolved
Hide resolved
whois-rpsl/src/main/java/net/ripe/db/whois/common/rpsl/attrs/Inet6numStatus.java
Outdated
Show resolved
Hide resolved
whois-rpsl/src/main/java/net/ripe/db/whois/common/rpsl/attrs/InetnumStatus.java
Outdated
Show resolved
Hide resolved
|
||
return (ParamConverter<T>) new ParamConverter<RelationType>() { | ||
@Override | ||
public RelationType fromString(String relationType){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to add a toString method in enum for this ?
//TODO: [MH] Status is being ignored until administrative resources are included in RDAP. If status is not | ||
// given or status is inactive...include administrative resources in the output. However, if status is active | ||
// return just non administrative resources, as we are doing now. | ||
if (status != null && (relationType.equals(RelationType.DOWN) || relationType.equals(RelationType.BOTTOM))){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use stringUtils isEmpty method to check for empty string as well
// return just non administrative resources, as we are doing now. | ||
if (status != null && (relationType.equals(RelationType.DOWN) || relationType.equals(RelationType.BOTTOM))){ | ||
throw new RdapException("501 Not Implemented", "Status is not implement in down and bottom relation", HttpStatus.NOT_IMPLEMENTED_501); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just check if status is inactive and UP and DOWN? as by default we do return active status , also add a notification status is ignored rather than sending error?
|
||
/** | ||
* Finds all values associated with intervals that are contained within (more specific than) | ||
* and whose prefix is higher, more specific |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't all prefix in more specific will be higher than interval? Should it be whose prefix is most higher ?
This code is just for doing the controller changes.
Link relation and Extensions are not contemplated in this PR
Bottom relation pseudocode in the Jira
The status query parameter is not implemented until we have implemented administrative status task:
When status is there and inactive we should return the in region administrative resources.
In case status is active we should return non administrative in region resources.
For now just always return active resource. Ignore status query parameter. (added a TODO)
We follow the points addressed in https://datatracker.ietf.org/doc/draft-ietf-regext-rdap-rir-search/ RFC