Problem description
release-plan.yaml declares commonalities_release: r4.4 for release r2.1 (#102), and the r4.4 common files are now in code/common/ (#103). This issue collects the points that need to be addressed to bring network-health-assessment and network-traffic-analysis to Commonalities 0.9.0 (r4.4).
Note that CI validation is currently green — 0 errors, with two P-027 warnings and five hints. Most of the items below are not covered by any validation rule; they come from the r4.4 changelog and the CAMARA API Design Guide. A passing pipeline should not be read as r4.4 alignment.
Both APIs are at 0.2.0 targeting rc, with no published stable version and no snapshot currently open, so the changes below can be made directly on main.
Expected behavior
Metadata and documentation
Error responses — migrate off the deprecated Generic<status> responses
r4.4 deprecates all Generic<status> responses in favour of a minimal named catalogue plus a shared example pool, and plans their removal next cycle (Commonalities#665). Both specs currently define their own Generic400, Generic401, Generic403 and Generic404 locally, each against a bare ErrorInfo with no restriction on status or code. The catalogue entries restrict both to exactly the codes the operation can return, so replacing them removes the duplication and tightens the documented contract at the same time.
NotFound404 rather than IdentifierNotFound404 is the right entry for both operations: r4.4 scopes the latter to APIs that identify their subject by device or phone number, whereas the subject here is a networkId passed as a query parameter.
Using BadRequest400 for getHealthScores drops OUT_OF_RANGE and so resolves #97. That operation accepts only a UUID-formatted networkId and a closed netType enum, so every invalid value is an INVALID_ARGUMENT schema violation and no input can produce OUT_OF_RANGE. getTrafficAnalysis keeps the code, because endDate before startDate is a genuine out-of-range condition.
Common component reuse
The r4.4 API template (artifacts/api-templates/sample-service.yaml) references the common security scheme, x-correlator parameter and x-correlator header rather than redefining them. Both specs currently redefine all three locally, with text identical to the common definitions.
accessDate is handled separately in #104 and #90.
Pagination
Test definitions
Additional context
Related issues that are linked rather than covered here: #90 and #104 (accessDate), the IPv6 part of #93, #94 (no defined error for a startDate/endDate misaligned with the chosen frequency), and #96 (missing test scenarios for the app filter, pagination and the empty/null success responses).
Problem description
release-plan.yamldeclarescommonalities_release: r4.4for release r2.1 (#102), and the r4.4 common files are now incode/common/(#103). This issue collects the points that need to be addressed to bringnetwork-health-assessmentandnetwork-traffic-analysisto Commonalities 0.9.0 (r4.4).Note that CI validation is currently green — 0 errors, with two
P-027warnings and five hints. Most of the items below are not covered by any validation rule; they come from the r4.4 changelog and the CAMARA API Design Guide. A passing pipeline should not be read as r4.4 alignment.Both APIs are at
0.2.0targetingrc, with no published stable version and no snapshot currently open, so the changes below can be made directly onmain.Expected behavior
Metadata and documentation
x-camara-commonalities: "0.9.0"in both specs (r4.4VERSION.yamlis0.9.0), for accuracy onmain— currently"0.7". Fornetwork-traffic-analysisthis is already covered by fix: reference DateTime schema for accessDate #104.additional-error-responsesCAMARA:MANDATORY:BEGIN..ENDblock ininfo.descriptionfromcode/common/info-description-templates.yamlinto both specs. This is theP-027warning: paragraph 3 changed in Commonalities#693, so "The applicable Commonalities Release can be identified in theAPI Readiness Checklistdocument associated to this API version." becomes "The applicable Commonalities Release can be identified from thex-camara-commonalitiesfield, the changelog and the metadata of the released API version.":BEGIN(Commonalities#660) to theauthorization-and-authenticationandrequest-body-strictnessblocks in both specs, if not already there — those two are otherwise already at r4.4 wording.externalDocs.descriptionto exactlyProduct documentation at CAMARAin both specs — currentlyProject documentation at CAMARA. This is theP-039hint.Error responses — migrate off the deprecated
Generic<status>responsesr4.4 deprecates all
Generic<status>responses in favour of a minimal named catalogue plus a shared example pool, and plans their removal next cycle (Commonalities#665). Both specs currently define their ownGeneric400,Generic401,Generic403andGeneric404locally, each against a bareErrorInfowith no restriction onstatusorcode. The catalogue entries restrict both to exactly the codes the operation can return, so replacing them removes the duplication and tightens the documented contract at the same time.Generic401→CAMARA_common.yaml#/components/responses/Unauthenticated401,Generic403→PermissionDenied403,Generic404→NotFound404.network-health-assessment:Generic400→BadRequest400.network-traffic-analysis:Generic400→BadRequestWithRange400, which keeps bothINVALID_ARGUMENTandOUT_OF_RANGE.NotFound404rather thanIdentifierNotFound404is the right entry for both operations: r4.4 scopes the latter to APIs that identify their subject by device or phone number, whereas the subject here is anetworkIdpassed as a query parameter.Using
BadRequest400forgetHealthScoresdropsOUT_OF_RANGEand so resolves #97. That operation accepts only a UUID-formattednetworkIdand a closednetTypeenum, so every invalid value is anINVALID_ARGUMENTschema violation and no input can produceOUT_OF_RANGE.getTrafficAnalysiskeeps the code, becauseendDatebeforestartDateis a genuine out-of-range condition.Common component reuse
The r4.4 API template (
artifacts/api-templates/sample-service.yaml) references the common security scheme,x-correlatorparameter andx-correlatorheader rather than redefining them. Both specs currently redefine all three locally, with text identical to the common definitions.x-correlatorparameter and header in both specs with$refs toCAMARA_common.yaml#/components/parameters/x-correlatorand#/components/headers/x-correlator.openIdsecurity scheme in both specs with a$reftoCAMARA_common.yaml#/components/securitySchemes/openId, as the template does.network-traffic-analysis: reference the commonparameters/pageandparameters/perPageinstead of declaring the parameters locally around the already-referencedPageandPerPageschemas. The common descriptions additionally document the400 INVALID_ARGUMENTrejection required by Design Guide §4.1.1.network-traffic-analysis: replace the localipv4Addressdefinition with a$reftoCAMARA_common.yaml#/components/schemas/SingleIpv4Address. Constraints are identical (format: ipv4,maxLength: 15); only the example value differs. This covers the first part of Reuse common IPv4 schema and add IPv6 support for ipv4Address #93. r4.4 also addsSingleIpv6Address(Commonalities#654), which makes the IPv6 counterpart requested in Reuse common IPv4 schema and add IPv6 support for ipv4Address #93 available — worth considering in the same pass.network-health-assessment: reference the commonDateTimeschema forscoringTimeinstead of the constraint-identical local definition, keepingnullable: trueand the field-specific description as siblings of theallOf— the patternnetwork-traffic-analysisalready uses forstartDateandendDate.accessDateis handled separately in #104 and #90.Pagination
network-traffic-analysis: document the out-of-range page case. Design Guide §4.1.5 requires a request withpagegreater thantotalPagesto return200with an empty collection and an accuratepaginationobject. The spec currently documents only the no-data case, and its singleEmptyResponseexample (totalCount: 0,totalPages: 0) illustrates only that.Test definitions
#/prefix used by the r4.4 test template (Commonalities#678, #683) —network-health-assessment-getHealthScores.featureandnetwork-traffic-analysis-getTrafficAnalysis.featureeach use#/components/schemas/XCorrelatorin theirBackgroundbut the un-prefixed form in the success scenario.network-health-assessment-getHealthScores.feature: removenetwork_health_assessment_getHealthScores_03_out_of_range_scenario, following theBadRequest400change above. Its example ("an invalid netType value") is anINVALID_ARGUMENTcase already covered by scenario 02. This is the second part of getHealthScores declares an unreachable 400 OUT_OF_RANGE, test scenario mislabeled #97.Additional context
Related issues that are linked rather than covered here: #90 and #104 (
accessDate), the IPv6 part of #93, #94 (no defined error for astartDate/endDatemisaligned with the chosenfrequency), and #96 (missing test scenarios for theappfilter, pagination and the empty/null success responses).