mix atex.lexicons (atex v0.6.0)
View SourceGenerate Elixir modules from AT Protocol lexicons, which can then be used to validate data at runtime.
AT Protocol lexicons are JSON files that define parts of the AT Protocol data model. This task processes these lexicon files and generates corresponding Elixir modules.
Usage
mix atex.lexicons [OPTIONS] [PATHS]Arguments
PATHS- List of lexicon files to process. Also supports standard glob syntax for reading many lexicons at once.
Options
-o/--output- Output directory for generated modules (default:lib/atproto)
Examples
Process all JSON files in the lexicons directory:
mix atex.lexicons lexicons/**/*.jsonProcess specific lexicon files:
mix atex.lexicons lexicons/com/atproto/repo/*.json lexicons/app/bsky/actor/profile.jsonGenerate modules to a custom output directory:
mix atex.lexicons lexicons/**/*.json --output lib/my_atproto