Skip to content

fix: reference DateTime schema for accessDate - #104

Merged
heliu0 merged 2 commits into
camaraproject:mainfrom
cnzj-Gc:main
Sep 18, 2026
Merged

heliu0 merged 2 commits into
camaraproject:mainfrom
cnzj-Gc:main

Conversation

@cnzj-Gc

@cnzj-Gc cnzj-Gc commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • bug
  • correction
  • enhancement/feature
  • cleanup
  • documentation
  • repository management
  • tests

What this PR does / why we need it:

Closes #90.

accessDate in TrafficAnalysisResponse.records.items now references the CAMARA common DateTime schema instead of a locally defined type: string with format: date.

The accessDate field represents the statistical point of each record, whose granularity depends on the requested frequency:

  • frequency=DAY: the date of the day (00:00:00Z)
  • frequency=HOUR: the start of the hour (HH:00:00Z)

The previous local definition (type: string, format: date) could only express YYYY-MM-DD, which cannot represent the hour-level statistical point required by frequency=HOUR. It also lacked proper RFC 3339 / timezone compliance.

Using the shared DateTime schema:

  • Covers both DAY and HOUR granularities
  • Is RFC 3339 / timezone compliant
  • Reuses the same schema already used by startDate and endDate
  • Removes a locally defined format in favor of the CAMARA common schema

Changes made:

  • accessDate now references DateTime
  • accessDate example updated from "2024-06-07" to "2024-06-07T00:00:00Z"
  • TrafficAnalysisSuccess example updated accordingly
  • x-camara-commonalities updated to "0.9.0" (Commonalities r4.4)

Which issue(s) this PR fixes:

Fixes #90

Special notes for reviewers:

We deliberately did not use the Date schema here (as originally suggested in #90) because Date only expresses YYYY-MM-DD and cannot represent the hour-level statistical point required by frequency=HOUR. DateTime is the correct fit for the semantics of this field.

No changes to network-traffic-analysis-getTrafficAnalysis.feature are required. The existing test scenarios validate the response body against the TrafficAnalysisResponse schema rather than asserting accessDate format directly, so the schema change is picked up automatically.

Changelog input

Reference DateTime schema for accessDate in Network Traffic Analysis

heliu0
heliu0 previously approved these changes Sep 18, 2026
@hdamker

hdamker commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

@cnzj-Gc have you defined an own PR description template for the repository or just forgot to tell your agent to use the template available within the repo? Does not mean that information isn't complete or helpful ... it is just difficult to read PR descriptions across the project if they are all differ in structure.

@hdamker

hdamker commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Beyond that I'm not a codeowner here, so no need for my review.

@hdamker
hdamker removed their request for review September 18, 2026 08:39

version: wip
x-camara-commonalities: "0.7"
x-camara-commonalities: "0.8.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
x-camara-commonalities: "0.8.0"
x-camara-commonalities: "0.9.0"

as your referring to r4.4 now.

@cnzj-Gc

cnzj-Gc commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

@hdamker Thanks for the suggestion — I've updated the PR description to follow the repository's PR template, and also corrected x-camara-commonalities to "0.9.0" (Commonalities r4.4).

@heliu0
heliu0 requested review from hdamker and heliu0 September 18, 2026 09:03
@heliu0
heliu0 merged commit 495ee2d into camaraproject:main Sep 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use CAMARA Common schema "Date" in network-traffic-analysis.yaml

3 participants