|
| 1 | +# P005 - OpenAPI Datetime Format Schema Annotations |
| 2 | + |
| 3 | +## Summary |
| 4 | +This synchronization tracks the addition of explicit OpenAPI datetime format schema annotations for `createdAt` and `modifiedAt` timestamp fields across multiple metadata models in gdc-nas. |
| 5 | + |
| 6 | +## GDC-NAS Changes |
| 7 | +- **Problem ID**: P005 |
| 8 | +- **JIRA**: STL-2296 |
| 9 | +- **Commits**: |
| 10 | + - ff5a90d9c251292fda3ef6a2dff5161de6317fa2 (merge) |
| 11 | + - 66eb00ce47e05d514d292491c47e16d4297b9487 (implementation) |
| 12 | + |
| 13 | +## Affected Entities |
| 14 | +The following metadata models had `@field:Schema` annotations added to their `createdAt` and `modifiedAt` fields: |
| 15 | + |
| 16 | +1. AnalyticalDashboard |
| 17 | +2. AttributeHierarchy |
| 18 | +3. Automation |
| 19 | +4. DashboardPlugin |
| 20 | +5. ExportDefinition |
| 21 | +6. MemoryItem |
| 22 | +7. Metric |
| 23 | +8. VisualizationObject |
| 24 | + |
| 25 | +## Schema Annotations Added |
| 26 | +```kotlin |
| 27 | +@field:Schema( |
| 28 | + description = "Time of the entity creation.", |
| 29 | + example = "[ \"2023-07-20 12:30\" ]", |
| 30 | + type = "string", |
| 31 | + pattern = "[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}", |
| 32 | + nullable = true |
| 33 | +) |
| 34 | +``` |
| 35 | + |
| 36 | +## SDK Impact |
| 37 | +The Python SDK's gooddata-api-client has been regenerated from the updated OpenAPI spec. All affected entity model files now include: |
| 38 | + |
| 39 | +- Proper datetime type annotations: `(datetime, none_type,)` |
| 40 | +- Regex validation patterns: `r'[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}'` |
| 41 | + |
| 42 | +### Verified Files |
| 43 | +- `gooddata-api-client/gooddata_api_client/model/json_api_metric_out_attributes.py` |
| 44 | +- `gooddata-api-client/gooddata_api_client/model/json_api_analytical_dashboard_out_attributes.py` |
| 45 | +- `gooddata-api-client/gooddata_api_client/model/json_api_visualization_object_out_attributes.py` |
| 46 | +- `gooddata-api-client/gooddata_api_client/model/json_api_automation_out_attributes.py` |
| 47 | +- `gooddata-api-client/gooddata_api_client/model/json_api_attribute_hierarchy_out_attributes.py` |
| 48 | +- `gooddata-api-client/gooddata_api_client/model/json_api_dashboard_plugin_out_attributes.py` |
| 49 | +- `gooddata-api-client/gooddata_api_client/model/json_api_export_definition_out_attributes.py` |
| 50 | +- `gooddata-api-client/gooddata_api_client/model/json_api_memory_item_out_attributes.py` |
| 51 | + |
| 52 | +## Verification Status |
| 53 | +✅ All affected models have proper datetime format specifications |
| 54 | +✅ Regex patterns match the backend schema annotations |
| 55 | +✅ Type annotations correctly reflect nullable datetime fields |
| 56 | +✅ No additional SDK code changes required |
| 57 | + |
| 58 | +## Jira Ticket |
| 59 | +**NOTE**: Jira sandbox was under maintenance during sync process. Ticket should be created manually: |
| 60 | +- **Project**: DX (or appropriate project) |
| 61 | +- **Type**: Task |
| 62 | +- **Summary**: Sync SDK with datetime format schema annotations |
| 63 | +- **Description**: See commit message for full details |
| 64 | +- **Related Issues**: STL-2296 |
| 65 | + |
| 66 | +## Notes |
| 67 | +The changes were automatically incorporated through OpenAPI client regeneration. The datetime format specifications ensure consistent parsing and serialization of timestamp fields between the backend API and Python SDK clients. |
0 commit comments