The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

openapi-codegen.pl - create and maintain (client) libraries from OpenAPI / Swagger spec

SYNOPSIS

  openapi-codegen.pl -a openapi/petstore-expanded.yaml -o t/petstore -p OpenAPI::PetStore --compile

OPTIONS

  • prefix - the class prefix

  • force - overwrite all files, even the stub client

  • output - name of the output directory

  • api - name of the OpenAPI file (YAML or JSON)

  • tidy - clean up the code using perltidy

  • compile - check that the generated code compiles

SEE ALSO

The OpenAPI spec - https://spec.openapis.org/oas/v3.1.0#openapi-document