About
This repo contains a WIP Go parser and generator for Apple's Device Management schemas.
All of Apple's device management schemas (e.g. commands, profiles, declarative management, etc) are themselves described by Apple's Device Management root schema.
Current Features
yamlschema is a Go package that contains a YAML Schema (YAML version of JSON Schema) parser. It's a generic parser in theory, but only tested on the root schema.
yamlschemagen
yamlschemagen
is a tool to generate Go structs for the root schema, from a file path or directly from a git repo.
schema is a Go package that contains a parser (built in part by yamlschemagen
) for Apple's device management schemas (e.g. commands, profiles, declarative management, etc). It is capable of parsing every schema in Apple's Device Management repo into a Schema AST.
TODO
- Write Go struct generators for commands, profiles, and declarative management schemas
- Write schema validators for commands, profiles, and declarative management schemas
YAML Fork
This project currently uses a fork of github.com/goccy/go-yaml, since the upstream project can't currently parse Apple's schema files due to recursive aliases. If/when the PR is merged, this project will revert to the upstream repo.