Log 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
Log Dto is the test-side data-transfer object for an organization option presented in log-related filtering. It belongs to the OpenFrame test service core supplied by the com.openframe.oss:openframe-test-service-core library, version 7.0.11, which this repository consumes. The module intentionally contains no filtering, persistence, or transport logic: it defines a small deserialization-friendly value shape with an organization identifier and display name.
The implementation is provided by the OpenFrame OSS Library: OrganizationFilterOption source.
The OrganizationFilterOption type models one selectable organization in a log-filter response consumed by test code. Its two properties are:
| Property | Java type | Meaning |
|---|---|---|
id |
String |
Identifier of the organization represented by the option. |
name |
String |
Human-readable organization name. |
Because this is a test DTO, it is a boundary model rather than a domain entity. It does not validate identifiers, fetch logs, apply a filter, or define an API route. Those responsibilities remain with the relevant API and test workflow layers.
flowchart LR
TestCode["Test code"] -->|"deserializes response data"| Dto["OrganizationFilterOption"]
Dto -->|"id"| OrganizationId["Organization identifier"]
Dto -->|"name"| OrganizationName["Organization display name"]
Jackson["Jackson mapper"] -->|"populates known properties"| Dto
UnknownFields["Unknown response properties"] -->|"ignored"| Dto
The module is deliberately narrow. Test code owns its request and assertion flow, while Jackson maps response data into the DTO. The DTO preserves only the organization fields required by this model and ignores additional properties to tolerate compatible response expansion.
OrganizationFilterOption is a mutable Java bean enhanced by Lombok and Jackson annotations.
| Facility | Role | Maintainer impact |
|---|---|---|
@Data |
Generates accessors and common value methods. | Callers can read and update id and name through generated methods. |
@Builder |
Generates a builder. | Tests can construct concise expected values without a long constructor call. |
@NoArgsConstructor |
Generates a no-argument constructor. | Supports bean-style construction and mapping frameworks. |
@AllArgsConstructor |
Generates a constructor containing both properties. | Supports direct fixture construction. |
@JsonIgnoreProperties(ignoreUnknown = true) |
Ignores unmodeled response fields during deserialization. | Adding fields upstream does not by itself break existing tests using this type. |
flowchart TD
Response["Log filter response payload"] --> Mapper["Jackson mapper"]
Mapper --> BeanConstructor["No-argument constructor"]
BeanConstructor --> Setters["Generated property setters"]
Setters --> Instance["OrganizationFilterOption instance"]
TestFixture["Test fixture"] --> Builder["Generated builder"]
Builder --> Instance
DirectSetup["Direct test setup"] --> AllArgsConstructor["Two-property constructor"]
AllArgsConstructor --> Instance
The source does not add custom constructors, methods, normalization, or validation. Lombok generates the constructors, builder, getters, setters, and value methods during compilation.
The following flow describes how the annotation configuration affects an incoming object. It is scoped to the DTO and makes no assumption about a particular endpoint or serialization container.
sequenceDiagram
participant Test as Test code
participant Mapper as Jackson mapper
participant Dto as OrganizationFilterOption
Test->>Mapper: Deserialize organization option
Mapper->>Dto: Create empty instance
Mapper->>Dto: Set id
Mapper->>Dto: Set name
alt Known property
Dto-->>Mapper: Property accepted
else Unknown property
Dto-->>Mapper: Property ignored
end
Mapper-->>Test: Return populated DTO
String values and the class itself imposes no required-field, format, uniqueness, or nullability rules.id or name changes the JSON property convention inferred by Jackson and can break consumers expecting the current shape.A representative object shape is:
{
"id": "organization-123",
"name": "Example Organization"
}
When evolving Log Dto:
id and name when the corresponding response fields remain part of the test contract.flowchart LR
TestService["OpenFrame test service core"] --> LogDto["Log Dto"]
LogDto --> TestModel["Log filter organization model"]
TestModel --> Assertions["Response assertions"]
Log Dto is packaged in the OpenFrame test service core library rather than implemented in this repository. The tenant repository assembles that library into its service ecosystem; the DTO supplies the model used by tests at the log-filter response boundary.