docs(api): add AX example for SDK availability check

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-02 09:12:00 +00:00
parent 71c179018d
commit 78d16a75cc

View file

@ -95,6 +95,12 @@ func (g *SDKGenerator) buildArgs(generator, outputDir string) []string {
}
// Available checks if openapi-generator-cli is installed and accessible.
//
// Example:
//
// if !gen.Available() {
// t.Fatal("openapi-generator-cli is required")
// }
func (g *SDKGenerator) Available() bool {
_, err := exec.LookPath("openapi-generator-cli")
return err == nil