Skip to content

famedly/dart_openapi_codegen

Repository files navigation

dart_openapi_codegen

Generate dart client code for OpenAPI specifications

How to use

IMPORTANT: At the moment this code generator works only with JSON formatted OpenAPI files!

  1. Add this library to your dev_dependencies (Needs access to this repository via SSH):
dev_dependencies:
  dart_openapi_codegen:
    git: [email protected]:famedly/dart_openapi_codegen.git
  1. Run dart pub get

  2. Start the code generator and pass the necessary arguments:

dart_openapi_codegen <OUTPUT_DIRECTORY> <PATH_TO_OPENAPI_FILE> <OPTIONAL_RULES_FILE>

Examples:

// Create a simple client SDK from an openapi file:
pub run dart_openapi_codegen ./lib/src/generated ./openapi.json

matrix_api_lite

To update the generated code in matrix_api_lite, use the script:

./scripts/matrix.sh ../dart_matrix_api_lite/lib/src/generated

The script clones and patches matrix-doc and generates code using the rules in rules/matrix.yaml.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published