senzing-garage / senzing-api-server

Server of Senzing REST API.
Apache License 2.0
7 stars 2 forks source link

Potentially inconsistent maximum values of parameters #418

Closed nntzuekai closed 1 year ago

nntzuekai commented 1 year ago

Hi,

In the specification, I see that maxDegrees and buildOut of GET /entity-networks (https://github.com/Senzing/senzing-rest-api-specification/blob/4f1bb86a4d9749b1689a4f3eef8ebea2cc94b5dc/senzing-rest-api.yaml#L2278) and maxDegrees of GET /entity-paths (https://github.com/Senzing/senzing-rest-api-specification/blob/4f1bb86a4d9749b1689a4f3eef8ebea2cc94b5dc/senzing-rest-api.yaml#L2013) are specified to have a maximum value of 100. But in code I don't see them explicitly checked against the maximum value (https://github.com/Senzing/senzing-api-server/blob/75e153c08866c2c07871753c679c35bf3bd8e98a/src/main/java/com/senzing/api/services/EntityGraphServices.java#L406 and https://github.com/Senzing/senzing-api-server/blob/75e153c08866c2c07871753c679c35bf3bd8e98a/src/main/java/com/senzing/api/services/EntityGraphServices.java#L65)

Are those maximum values more like suggestions or actual constraints?

Thank you!

barrycaceres commented 1 year ago

More like suggestions, but I will check with our engine team to see if we need to be imposing hard limits.... Some systems may have queries crawl to a halt with much smaller values (e.g.: 5) if you encounter an entity with thousands of related entities.

barrycaceres commented 1 year ago

So the default value is 3 and there is no programmatically imposed maximum value. However, depending on the data, larger values may impact performance. I am removing the documented maximum from the specification. Further, the buildOut parameter was marked with a default value of 1, however, the description stated the default value was 3 -- this will be corrected as well.

barrycaceres commented 1 year ago

This is addressed in version 3.4.0 release of senzing-rest-api-specification

nntzuekai commented 1 year ago

Thank you for confirming this!