
Fixes Homebrew/homebrew#47914 by distinguishing between required, optional, and recommended dependencies when using `brew info --json=v1`. This is done by adding the `optional_dependencies` and `recommended_dependencies` fields to the JSON output. A good example of this fix is `brew info --json=v1 dtrx`. Closes Homebrew/homebrew#48196. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Homebrew's Formula API
This is the (partially) documented public API for Homebrew.
The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.
You may also find the Formula Cookbook and Ruby Style Guide helpful in creating formulae.
Good luck!