Ticket Dto
OpenFrame Documentation
Get the most out of OpenFrame · Book 30 minutes with Conrad, 25 years in IT. He'll show you what Mingo and Fae can take off your list.
OpenFrame Documentation
Ticket Dto is a small, test-support data-transfer module from the OpenFrame OSS Library artifact com.openframe.oss:openframe-test-service-core. It supplies Jackson-deserializable Java models used by the OpenFrame test service when test code reads ticket-related API responses. The tenant repository runs that library through its OpenFrame test service; the DTO source itself is maintained in the library repository.
The module deliberately models only the ticket fields needed by tests: attachments and images, a ticket owner and its possible user or machine identities, cursor-pagination metadata, status totals, and AI dialog token consumption. All DTOs ignore unknown JSON properties so tests stay compatible when an upstream response adds fields.
flowchart LR
TestCase["Ticket Test"] -->|"deserializes response"| TicketDto["Ticket Dto"]
TicketDto --> Owner["Ticket Owner"]
Owner --> User["Ticket User"]
Owner --> Machine["Ticket Machine"]
TicketDto --> Attachment["Ticket Attachment"]
TicketDto --> Image["Ticket Image"]
TicketDto --> PageInfo["Ticket Page Info"]
TicketDto --> StatusCount["Ticket Status Definition Count"]
TicketDto --> Dialog["Ticket Dialog"]
Dialog --> TokenUsage["Ticket Token Usage"]
TicketOwner carries a discriminator plus both identifier fields and optional expanded user or machine objects. Consumers should interpret the type field before relying on a nested object.The following generated submodule documents partition all nine Ticket Dto components by their response concern:
Ticket Dto belongs to the test-service-core library rather than the ticket domain implementation. Production ticket operations are exposed through the external API ticket controller and request/response contracts, while ticket persistence and projections are provided by the data modules. Ticket Dto gives integration and end-to-end tests lightweight, tolerant representations of selected ticket response fragments.
sequenceDiagram
participant Test as "Ticket Test"
participant Api as "Ticket API"
participant Json as "JSON Response"
participant Dto as "Ticket Dto"
Test->>Api: Request ticket data
Api->>Json: Return ticket response
Json->>Dto: Deserialize known fields
Note over Dto: Unknown fields are ignored
Dto->>Test: Provide typed assertions
When an API response changes, preserve field names and Java types that existing tests deserialize. Additive response fields normally require no DTO change because unknown fields are ignored. Add a field only when a test must assert it, and retain the Lombok and Jackson annotations so construction and deserialization conventions remain consistent.
The status count DTO depends on the library's TicketStatusDefinition test DTO, which is outside this module's component list. It pairs that status definition with an integer count rather than redefining the status schema.
The component source is in the OpenFrame OSS Library, pinned by this repository at version 7.0.11. For example, see Ticket Attachment.