openapi_generator_annotations 1.0.1 copy "openapi_generator_annotations: ^1.0.1" to clipboard
openapi_generator_annotations: ^1.0.1 copied to clipboard

outdated

Annotations for openapi code generation.

Annotation library for dart/flutter implementation of openapi client code generation. To be used together with openapi-generator

license.

Usage #

Include openapi-generator-annotations as a dependency in the dependencies section of your pubspec.yaml file :

dependencies:
  openapi_generator_annotations: ^1.0.0

Add openapi-generator in the dev dependencies section of your pubspec.yaml file:

dev_dependencies:
  openapi_generator: ^0.0.2-beta

Annotate a dart class with @Openapi() annotation

@Openapi(
    additionalProperties:
    AdditionalProperties(pubName: 'petstore_api', pubAuthor: 'Johnny dep'),
    inputSpecFile: 'example/openapi-spec.yaml',
    generatorName: 'dart-jaguar',
    outputDirectory: 'api/petstore_api')
class Example extends OpenapiGeneratorConfig {}

Run

flutter pub run build_runner build --delete-conflicting-outputs

to generate open api client sdk from spec file specified in annotation. The api sdk will be generated in the folder specified in the annotation. See examples for more details

Features and bugs #

Please file feature requests and bugs at the issue tracker.

20
likes
0
points
20.6k
downloads

Publisher

verified publisherdevappliance.com

Weekly Downloads

Annotations for openapi code generation.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on openapi_generator_annotations