swagger_dart_code_generator 2.3.13 copy "swagger_dart_code_generator: ^2.3.13" to clipboard
swagger_dart_code_generator: ^2.3.13 copied to clipboard

outdated

Have you been turned into a problem with writing code for Http requests? This package can help. It has all of the Http and model codegen functionality you have been looking for.

example/lib/main.dart

import 'swagger_generated_code/example_swagger.swagger.dart';

void main() async {
  final petsApi = ExampleSwagger.create();

  final postResult = await petsApi.petPost(
    body: Pet(
      name: 'Vovanella',
      photoUrls: [
        'https://i.ytimg.com/vi/hO6G8jxV-YU/maxresdefault.jpg',
        'https://i.ytimg.com/vi/5u3iv8AT8G8/maxresdefault.jpg'
      ],
      status: PetStatus.available,
      category: Category(),
    ),
  );

  final pet = Pet.fromJson(postResult.body as Map<String, dynamic>);

  print('Created pet id: ${pet.id}');
}
274
likes
0
pub points
89%
popularity

Publisher

verified publishermobilepeople.dev

Have you been turned into a problem with writing code for Http requests? This package can help. It has all of the Http and model codegen functionality you have been looking for.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

build, code_builder, collection, dart_style, json_annotation, markdown, path, recase, universal_io

More

Packages that depend on swagger_dart_code_generator