Skip to content

Conversation

@jessepeterson
Copy link
Member

@jessepeterson jessepeterson commented Sep 9, 2025

Generate the DEP structs from the Apple Device Services repo using go-jsonschema replacing the existing hand-created structs. Updated all API calls to use new structs including de-referencing properties/fields that have become pointers instead of regular types.

Tests below.

@jessepeterson
Copy link
Member Author

A test: querying the Account Detail endpoint using the proxy and comparing it against a marshaled JSON response from the godep package resulted in the exact same JSON response. Meaning through a Go json unmarshal<->re-marshal we retained all data and structure.

@jessepeterson
Copy link
Member Author

Another test was a (typical) device sync with the depsyncer tool. The system successfully synced and the JSON properties came through:

2025/09/12 13:56:56 ts=2025-09-12T13:56:56-07:00 level=debug component=syncer name=MY_DEP_NAME msg=device serial_number=FVXXXXXXXX5D [email protected] op_type=modified profile_uuid=9303FD5XXXXXXXX8FD0AEB3E5EFE7980 profile_status=modified op_date=2025-09-12 20:43:57 +0000 UTC device_assigned_date=2025-09-12 20:43:57 +0000 UTC profile_assign_time=2025-06-19 04:00:49 +0000 UTC caller=syncer.go:210

@jessepeterson jessepeterson merged commit 0ef3e3d into micromdm:main Sep 12, 2025
10 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.

1 participant