id = "swagger-typescript-api" name = "swagger-typescript-api" description = "Generate a TypeScript or JavaScript API client from a Swagger/OpenAPI schema." executables = ["swagger-typescript-api"] [commands] format = 1 label = "Generate API client" description = "Generate an API client from a schema file or URL. Template generation and SSL/proxy switches are not included." quality = "ai-draft" base = "fig:swagger-typescript-api" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/swagger-typescript-api.ts" license = "MIT" [[commands.field]] id = "path" label = "Schema path or URL" type = "string" option = ["--path", "-p"] sources = ["fig"] [[commands.field]] id = "output" label = "Output folder" type = "path" option = ["--output", "-o"] path = { kind = "directory", role = "output" } sources = ["fig"] [[commands.field]] id = "name" label = "Output file name" description = "Default is Api.ts." type = "string" option = ["--name", "-n"] sources = ["fig"] [[commands.field]] id = "templates" label = "Templates folder" type = "path" option = ["--templates", "-t"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.field]] id = "axios" label = "Axios HTTP client" type = "boolean" option = ["--axios"] sources = ["fig"] [[commands.field]] id = "modular" label = "Separate files" type = "boolean" option = ["--modular"] sources = ["fig"] [[commands.field]] id = "js" label = "JavaScript output" type = "boolean" option = ["--js"] sources = ["fig"] [[commands.field]] id = "union_enums" label = "Union enums" type = "boolean" option = ["--union-enums"] sources = ["fig"] [[commands.field]] id = "route_types" label = "Route types" type = "boolean" option = ["--route-types"] sources = ["fig"] [[commands.field]] id = "no_client" label = "No API class" type = "boolean" option = ["--no-client"] sources = ["fig"] [[commands.field]] id = "responses" label = "Response info" type = "boolean" option = ["--responses"] sources = ["fig"] [[commands.field]] id = "clean" label = "Clean output folder first" description = "May delete existing files in the output folder." type = "boolean" option = ["--clean-output"] sources = ["fig"] [[commands.field]] id = "prefix" label = "Type prefix" type = "string" option = ["--type-prefix"] sources = ["fig"] [[commands.field]] id = "silent" label = "Errors only" type = "boolean" option = ["--silent"] sources = ["fig"] [[commands.task]] id = "generate" label = "Generate client" fields = ["path", "output", "name", "axios", "modular", "union_enums"] required = ["path"] [[commands.group]] id = "basic" label = "Basic" fields = ["path", "output", "name", "axios", "modular", "union_enums"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["templates", "js", "route_types", "no_client", "responses", "clean", "prefix", "silent"]