Skip to content

Fix Interval schema to reflect ISO 8601 string serialization#463

Open
benedikt-buchert wants to merge 1 commit intoAdobeDocs:mainfrom
benedikt-buchert:fix/interval-schema-string-serialization
Open

Fix Interval schema to reflect ISO 8601 string serialization#463
benedikt-buchert wants to merge 1 commit intoAdobeDocs:mainfrom
benedikt-buchert:fix/interval-schema-string-serialization

Conversation

@benedikt-buchert
Copy link
Copy Markdown

Summary

The Adobe Target API serializes Interval values as ISO 8601 interval strings (e.g. 2023-11-01T15:00Z/2024-06-27T10:00Z) rather than JSON objects. The current schema defines Interval as type: object, which causes validation errors in strictly-typed clients.

Observed API response:
```json
{ "reportInterval": "2023-11-01T15:00Z/2024-06-27T10:00Z" }
```

Current schema (incorrect):
```json
{ "type": "object", "properties": { "start": ..., "end": ..., ... } }
```

Fix: Change Interval to oneOf: [string, object] so both the ISO 8601 string form returned by the API and the structured object form are considered valid.

🤖 Generated with Claude Code

The Adobe Target API serializes Interval values as ISO 8601 interval
strings (e.g. "2023-11-01T15:00Z/2024-06-27T10:00Z") rather than JSON
objects. Update the schema to use oneOf so both the string form returned
by the API and the object form are valid.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant