docs(api): add AX example for SDK availability check
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
71c179018d
commit
78d16a75cc
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue