Updates the Gherkin test definitions - #63
Conversation
CAMARA Validation — PASS (with warnings)0 errors, 2 warnings, 2 hints | Profile: standard |
|
Hi @eric-murray, this PR updates the test definitions for the Sync26 RC and is the last pending change before we can trigger /create-snapshot on release issue #56 (r2.1 RC — predictive-connectivity-data v0.2.0). Could you take a look and approve when ready? Are there any other points left to address? Thanks |
|
Hi @eric-murray, we have to create the snapshot before July 31. Is there anything else we need to check here? |
| Scenario: Validate success response for a supported area request defined as a list of geohashes | ||
| Given the request body property "$.area.areaType" is set to "GEOHASHLIST" | ||
| And the request body property "$.area.geohashes" is set to a list of valid geohashes within supported area | ||
| And the request body property "$.precision" is not included |
There was a problem hiding this comment.
If I understand the API operation correctly, when precision is not specified and the area is a list of geohashes, the API can infer the precision from the precision of the geohashes.
First comment is that we should update the precision description in the YAML, which currently says "If not included the default precision level 7 is used by default".
Second comment is, can the API consumer request that the response has a higher precision than the precision of the geohashes? So if they provide a geohash as the input area that has precision 7, can they request that the output is, for example, four geohashes with precision 8? It does not make sense to request a lower precision, but could be reasonable to allow a request for a higher precision.
There was a problem hiding this comment.
Thanks, @eric-murray. You’re right that the current description could be clearer.
The intended behaviour is that when area.areaType = GEOHASHLIST, the precision request property is not applicable and must not be provided. In that case, the response granularity is determined directly by the precision of the input geohashes.
To avoid ambiguity, I’ll update the description of the precision property to explicitly state that the default precision (7) only applies to POLYGON requests when precision is omitted.
| And the response property "$.message" contains a user friendly text | ||
|
|
||
| @predictive_connectivity_data_400.17_precision_with_geohashlist | ||
| Scenario: Error 400 when precision is included together with a GEOHASHLIST area |
There was a problem hiding this comment.
Implication here is that the API consumer cannot ask for better precision than that of the geohashes they provide.
There was a problem hiding this comment.
The intended behaviour is no. For GEOHASHLIST requests, the precision request property is not used. The response preserves the granularity defined by the input geohashes, so consumers cannot request a higher (or lower) precision than the one already provided in the request. We’ll make this explicit in the specification to avoid confusion.
| And the response property "$.code" is "INVALID_ARGUMENT" | ||
| And the response property "$.message" contains a user friendly text | ||
|
|
||
| @predictive_connectivity_data_400.19_unexpected_property |
There was a problem hiding this comment.
Probably we should include additionalProperties: false in schema RetrieveConnectivityRequest if additional properties are to be explicitly excluded.
There was a problem hiding this comment.
Good point. I’m happy to add additionalProperties: false at the top level of RetrieveConnectivityRequest.
As you mention, this does not propagate automatically to nested schemas, but I think applying it at the request root is a reasonable improvement and aligns with the intended validation behaviour.
| And the response property "$.code" is "INVALID_ARGUMENT" | ||
| And the response property "$.message" contains a user friendly text | ||
|
|
||
| @predictive_connectivity_data_400.22_empty_request_body |
There was a problem hiding this comment.
This is a schema non-compliance, so would be caught by @predictive_connectivity_data_400.20_schema_not_compliant, but happy to keep this as a separate test for this specific non-compliance.
There was a problem hiding this comment.
Agreed. Although this case is already covered by the generic schema non-compliance validation, I think there is value in keeping this as a dedicated conformance test since it verifies a common invalid request pattern explicitly.
| And the response property "$.code" is "INVALID_ARGUMENT" | ||
| And the response property "$.message" contains a user friendly text | ||
|
|
||
| @predictive_connectivity_data_400.23_empty_area_property |
There was a problem hiding this comment.
Same comment, but happy to keep as a specific non-compliance test
There was a problem hiding this comment.
Agreed as well. It's technically covered by the generic schema validation, but I think keeping it as a dedicated test improves readability and makes the expected behaviour more explicit for implementers.
Apologies - so many things to do! I've reviewed now with some comments. |
|
Hi @eric-murray, Thanks for the comments—they were very helpful. I've addressed all. Let me know if there's anything else left to do, or if we can move on to the next steps! |
What type of PR is this?
Add one of the following kinds:
What this PR does / why we need it:
New scenarios — GEOHASHLIST area type support
areaType: GEOHASHLISTprecisionincluded together with a GEOHASHLIST requestareaobject, invalidx-correlatorheaderGEOHASHLISTnot supported by implementation)serviceLevelUpdates to existing scenarios
XCorrelatorschema reference updated to canonicalCAMARA_common.yamlpathBEST_EFFORTadded as a validserviceLevelvalueareaType: POLYGONadded as explicit preconditionScenario OutlinewithPLAINandREFRESHTOKENas examples; accepted error broadened toINVALID_CREDENTIALorINVALID_ARGUMENTareaType: POLYGONadded as explicit preconditionWhenstep added$.area.areaTypeadded to required-property examples tabletoo_Many_Requests→too_many_requests)Which issue(s) this PR fixes:
Fixes #39
Special notes for reviewers:
Changelog input
Additional documentation
This section can be blank.