Adapt qos-profiles API spec and tests to Commonalities r4.3 (0.8.0) - #575
Adapt qos-profiles API spec and tests to Commonalities r4.3 (0.8.0)#575RandyLevensalor wants to merge 14 commits into
Conversation
CAMARA Validation — PASS (with warnings)0 errors, 34 warnings, 6 hints | Profile: standard |
|
@hdamker @eric-murray @jlurien can you please review. IMHO, the largest potential issue is that these limits are broader than they need to be. My concern is that we will have more issues if they are overly constrained. But I'm happy to make these more reasonable. |
|
@RandyLevensalor I found only one "should" fix:
The limits I would keep broad as you have chosen. All the new A minor point:
|
2b31bf2 to
02af476
Compare
Would it be worth adding a canonical CAMARA "printable text" pattern to in Commonalities? I've updated this to allow tab, LF and CF plus added more exclusions. |
|
@RandyLevensalor sorry for the false-positive error by Validation ... already working on it: camaraproject/tooling#394. Will come with patch release of tooling soon. |
- Bump x-camara-commonalities 0.6 -> 0.8.0 - Reference synced common schemas/responses via $ref into code/common/CAMARA_common.yaml; remove duplicated XCorrelator, Device and identifier schemas, ErrorInfo, and Generic400/401/429/Device404 - Add mandatory info.description section markers (authorization-and-authentication, additional-error-responses, request-body-strictness) - Add S-309/S-312 constraints (maxItems/maxLength) to remaining local schemas - Restructure both test definition files to the r4.3 sample-service-template (section banners, double-digit error tags, x-correlator/Content-Type assertions, 429 and invalid x-correlator scenarios) Fixes #573
- Duration.value: add maximum (int32) to satisfy S-311 (integer must declare minimum and maximum) - Availability items: add description to satisfy S-031 (array items must have a description)
Availability networks items: add pattern '^[0-9]{5,6}$' for the PLMN
identifier (MCC + MNC), addressing the owasp:api4:2023-string-restricted
hint that strings should declare a format/pattern/enum/const.
Add pattern to the free-form description string addressing the owasp:api4:2023-string-restricted hint that strings should declare a format/pattern/enum/const. The pattern excludes C0 controls (except TAB/LF/CR, so multiline descriptions remain valid), DEL, and the C1 range (U+0080-U+009F).
QosProfileDeviceRequest has no required properties, so an empty object is a valid request returning all profiles (as asserted by scenario 05_not_return_restricted_profiles); the template's 400 empty-body case does not apply to this operation (Commonalities #247). Renumber the invalid-x-correlator scenario from 400.04 to 400.03.
Point all x-correlator parameter/header $refs at ../common/CAMARA_common.yaml and drop the now-unused local component definitions, matching the style adopted in PR #579 (quality-on-demand).
cb4247d to
5c007ac
Compare
|
Note on the failing The single blocking finding is a false positive in the validation tooling: The resource path This is already fixed upstream in camaraproject/tooling#395 ( |
Done and Validation re-run shows now 0 errors, 37 warnings, 6 hints (no warnings about qos-profiles API and test definition, the warning regarding qos-provisioning will be addressed by #580 |
Co-authored-by: Herbert Damker <herbert.damker@telekom.de>
Co-authored-by: Herbert Damker <herbert.damker@telekom.de>
Co-authored-by: Herbert Damker <herbert.damker@telekom.de>
Co-authored-by: Herbert Damker <herbert.damker@telekom.de>
Co-authored-by: Herbert Damker <herbert.damker@telekom.de>
Co-authored-by: Herbert Damker <herbert.damker@telekom.de>
Remove the blank line inserted after each CAMARA:MANDATORY BEGIN marker; those lines carried trailing whitespace and triggered the blocking [Y-012] validation errors. The heading now immediately follows the BEGIN marker, matching code/common/info-description-templates.yaml.
Swagger editor ignores a markdown heading placed directly after an SGML comment (camaraproject/Commonalities#651); a preceding blank line restores it. The inserted lines are zero-length, so they do not reintroduce the [Y-012] trailing-whitespace errors that caused 676b37b to remove them. This matches quality-on-demand.yaml on main and the template on Commonalities main.
hdamker
left a comment
There was a problem hiding this comment.
LGTM - thanks Randy!
Note: I reintroduced the blank lines after CAMARA:MANDATORY BEGIN markers. The GitHub suggestions had introduced within the lines four spaces each which triggered the YAML linting. Now clean and in line with camaraproject/Commonalities#651 and with the upcoming templates of Commonalities r4.4.
|
@eric-murray would be great if you can review the changes since your approval and re-approve. Then I can create tomorrow the snapshot at the deadline. |
What type of PR is this?
What this PR does / why we need it:
Adapts the
qos-profilesAPI specification and its test definitions to CAMARA Commonalities r4.3 (Commonalities 0.8.0), using the analysis done by the Commonalities Working Group (Analysis of Commonalities 0.8.0) and the ConsentManagement #29 alignment as references.API specification (
qos-profiles.yaml):x-camara-commonalitiesfrom0.6to0.8.0.$refintocode/common/CAMARA_common.yaml:openIdsecurity scheme,x-correlatorparameter/header,Device,ErrorInfo, and responsesGeneric400,Generic401,Generic429;GenericDevice404now references the commonGeneric404(identical code set).XCorrelator,PhoneNumber,NetworkAccessIdentifier,DeviceIpv4Addr,SingleIpv4Addr,Port,DeviceIpv6Address(rule S-211).Generic403(PERMISSION_DENIEDonly),Generic404(NOT_FOUNDonly, forgetQosProfile),Generic422(SERVICE_NOT_APPLICABLE,UNSUPPORTED_IDENTIFIER,UNNECESSARY_IDENTIFIER).info.descriptionsection markers (text copied as-is fromcode/common/info-description-templates.yaml):authorization-and-authentication,additional-error-responses, and the newrequest-body-strictness.maxLength/maxItemsconstraints (rules S-312 / S-309) to the remaining local schemas:QosProfile.description,Availabilityand itsnetworksarray,countryName, and theretrieveQoSProfiles200 response array.Test definitions (both
.featurefiles):Happy Path Scenarios/Error Scenariosbanners andSyntax Error/Service Errorsubsections.400.01,401.01,403.01,404.01,429.01, …).429.01_too_many_requestsandinvalid_x-correlatorscenarios (and400.03_empty_request_bodyforretrieveQoSProfiles); addedx-correlator/Content-Typeresponse-header assertions to the device error scenarios.XCorrelator,PhoneNumber,DeviceIpv4Address,DeviceIpv6Address,NetworkAccessIdentifier) to point at../common/CAMARA_common.yaml.Which issue(s) this PR fixes:
Fixes #573
Special notes for reviewers:
Two deliberate deviations from the generic Commonalities template, for your attention:
identifying-device-from-access-tokenmandatory block not embedded verbatim. The standard opt-in block states thedeviceobject "MUST be provided" with a two-legged token and defines a422 MISSING_IDENTIFIERcase. Inqos-profiles, however,deviceis an optional filter —retrieveQoSProfileslegitimately returns all profiles when no device is supplied, soMISSING_IDENTIFIERdoes not apply. The existing, accurate "Identifying the device from the access token" section (documenting the optional filter and the422 UNNECESSARY_IDENTIFIERbehaviour) has been kept instead. This is compliant because the Appendix A block is opt-in.No
403.02_api_client_token_mismatchscenario. That template scenario targets resources created/managed by a specific API client. QoS Profiles are provider-defined, read-only resources with no per-client ownership, so the scenario does not apply to either operation.Also: the
403/404/422responses are intentionally kept as local code-subsets (rather than$ref-ing the common responses) because the common versions include additional codes (INVALID_TOKEN_CONTEXT,IDENTIFIER_NOT_FOUND,MISSING_IDENTIFIER) that are not applicable to these operations — the same selective approach taken in ConsentManagement #29.The CHANGELOG and API Readiness Checklist are intentionally not modified in this PR (the changelog is generated from the changelog-input below at release time), matching the ConsentManagement #29 precedent.
Changelog input
Additional documentation
This section can be blank.