oretgen 0.0.3

  • Readme
  • Changelog
  • Installing
  • 47

Oretgen #

A small dart library to generate retrofit skeleton from open api yaml file with generated models.

A sample command-line application with an entrypoint in bin/, library code in lib/. To build use command

dart2native bin/main.dart -o bin/oretgen

If You have open api file, You can generate retrofit

bin/oretgen -p full path to yaml file  -o full path tooutput directory for models

You can use common yaml open api file with slitted files. But it is necessary all file are in the same directory. Use flag 'multiple'

bin/oretgen -p full path to yaml file  -o full path tooutput directory for models --multiple

Example #

In example folder You can find test files. Use command

./bin/oretgen -p  $(pwd)/example/test.yaml -o $(pwd)/example

Warning #

This is alpha version. And may be have errors. Generator makes objects only from components/scheme

License #

Copyright © 2020 Licensed under license.

0.0.3 #

-- fix version error

0.0.2 #

-- fix pedantic errors

0.0.1 #

  • alpha release
  • added dart class generator
  • add code documentation

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  oretgen: ^0.0.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:oretgen/models_generator.dart';
import 'package:oretgen/retrofit_generator.dart';
import 'package:oretgen/utils.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
47
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Analysis suggestions

Package not compatible with runtime flutter-web on web

Because of the import of dart:io via the import chain package:oretgen/models_generator.dartpackage:oretgen/utils.dartdart:io

Package not compatible with runtime web

Because of the import of dart:io via the import chain package:oretgen/models_generator.dartpackage:oretgen/utils.dartdart:io

Health issues and suggestions

Document public APIs. (-1 points)

27 out of 27 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/models_generator.dart. (-1 points)

Analysis of lib/models_generator.dart reported 2 hints:

line 1 col 8: Unused import: 'dart:convert'.

line 79 col 7: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

Fix lib/retrofit_generator.dart. (-0.50 points)

Analysis of lib/retrofit_generator.dart reported 1 hint:

line 55 col 9: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

Format bin/main.dart.

Run dartfmt to format bin/main.dart.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and oretgen.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
args ^1.6.0 1.6.0
path ^1.6.4 1.7.0
yaml ^2.2.0 2.2.1
Transitive dependencies
charcode 1.1.3
collection 1.14.13 1.15.0-nullsafety
meta 1.2.2 1.3.0-nullsafety
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
Dev dependencies
pedantic ^1.9.0
test ^1.14.2