[config] skip_core_tasks = true [tasks.pull] description = "Pull latest OpenAPI spec" command = "curl" args = [ "-o", "api/openapi.yaml", "https://gitlab.com/mayachain/mayanode/-/raw/mainnet/openapi/openapi.yaml" ] [tasks.generate] description = "Generate Rust client from OpenAPI spec" command = "openapi-generator-cli" args = [ "generate", "-i", "api/openapi.yaml", "-g", "rust", "-o", ".", "--global-property", "skipFormModel=false,skipCi=true,hideGenerationTimestamp=true", "--ignore-file-override", ".openapi-generator-ignore", "--additional-properties", ''' packageName=mayachain_rs, supportAsync=true, useSingleRequestParameter=true, useStdError=true, gitUserId=, gitRepoId=, hideGenerationTimestamp=true ''' ] [tasks.clean] description = "Clean generated files" script = ''' #!@shell rm -rf src/apis src/models rm -f src/lib.rs rm -f git_push.sh rm -f .travis.yml rm -f .openapi-generator.json rm -rf .openapi-generator/ rm -f docs/*.md ''' [tasks.codegen] description = "Clean and regenerate client code" dependencies = ["clean", "generate"]