Skip to content

abm structs generated from apple-device-services repo#8

Merged
jessepeterson merged 7 commits into
micromdm:mainfrom
jessepeterson:abm-structs
Dec 1, 2025
Merged

abm structs generated from apple-device-services repo#8
jessepeterson merged 7 commits into
micromdm:mainfrom
jessepeterson:abm-structs

Conversation

@jessepeterson

Copy link
Copy Markdown
Member

Generate the ABM structs from the Apple Device Services repo using go-jsonschema. Add a single ABM call as an example (for the single service we have supported for now). The re-marshalled JSON exactly matches the raw HTTP json returned from the service:

$ diff -u /tmp/b1o.json /tmp/b2o.json
$ ls -l /tmp/b1o.json /tmp/b2o.json
-rw-r--r--  1 user  wheel  1179 Sep  8 12:21 /tmp/b1o.json
-rw-r--r--  1 user  wheel  1179 Sep  8 12:21 /tmp/b2o.json
$ head -2 /tmp/b1o.json /tmp/b2o.json
==> /tmp/b1o.json <==
{
  "data": [

==> /tmp/b2o.json <==
{
  "data": [

I.e. using this:

	c := goaxm.NewClient(s)

	resp, err := c.ABMv1MDMServers(context.Background(), "myAXMName")
	if err != nil {
		log.Fatal(err)
	}

	err = json.NewEncoder(os.Stdout).Encode(resp)
	if err != nil {
		log.Fatal(err)
	}

(And comparing with the curl transparent reverse proxy)

@jessepeterson jessepeterson merged commit 3d38a35 into micromdm:main Dec 1, 2025
9 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