jaguar_generator 1.3.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

jaguar-generator

Generates RequestHandler for a given Api class.

Usage

Api class

lib/api.dart:

import 'package:jaguar/jaguar.dart';

part 'api.g.dart';

/// Example of basic API class
@Api(path: '/api')
class MotherGroup extends _$JaguarMotherGroup {
  /// Example of basic route
  @Route(path: '/ping')
  String ping(Context ctx) => "You pinged me!";
}

build.yaml settings


Changelog

0.6.0

  • jaguar 0.6.x

0.1.0

  • Generators for RouteGroup and Api

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate jaguar_generator

2. Use it

The package has the following executables:


$ jaguar_gen

Use this package as a library

1. Depend on it

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


dependencies:
  jaguar_generator: ^1.3.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:jaguar_generator/builder.dart';
import 'package:jaguar_generator/common/constants.dart';
import 'package:jaguar_generator/common/exceptions/exceptions.dart';
import 'package:jaguar_generator/common/validator.dart';
import 'package:jaguar_generator/generator/generator.dart';
import 'package:jaguar_generator/models/exception.dart';
import 'package:jaguar_generator/models/interceptor.dart';
import 'package:jaguar_generator/models/models.dart';
import 'package:jaguar_generator/models/route.dart';
import 'package:jaguar_generator/parser/exception.dart';
import 'package:jaguar_generator/parser/group.dart';
import 'package:jaguar_generator/parser/interceptor/wrapper_creator.dart';
import 'package:jaguar_generator/parser/parser.dart';
import 'package:jaguar_generator/parser/route.dart';
import 'package:jaguar_generator/to_model/to_model.dart';
import 'package:jaguar_generator/validator/interceptor.dart';
import 'package:jaguar_generator/validator/validator.dart';
import 'package:jaguar_generator/writer/exception.dart';
import 'package:jaguar_generator/writer/writer.dart';
  
Version Uploaded Documentation Archive
1.3.1 Feb 2, 2018 Go to the documentation of jaguar_generator 1.3.1 Download jaguar_generator 1.3.1 archive
1.2.14 Feb 1, 2018 Go to the documentation of jaguar_generator 1.2.14 Download jaguar_generator 1.2.14 archive
1.2.10 Feb 1, 2018 Go to the documentation of jaguar_generator 1.2.10 Download jaguar_generator 1.2.10 archive
1.2.5 Jan 13, 2018 Go to the documentation of jaguar_generator 1.2.5 Download jaguar_generator 1.2.5 archive
1.2.3 Jan 13, 2018 Go to the documentation of jaguar_generator 1.2.3 Download jaguar_generator 1.2.3 archive
1.2.2 Jan 13, 2018 Go to the documentation of jaguar_generator 1.2.2 Download jaguar_generator 1.2.2 archive
1.2.1 Jan 13, 2018 Go to the documentation of jaguar_generator 1.2.1 Download jaguar_generator 1.2.1 archive
0.8.0 Aug 4, 2017 Go to the documentation of jaguar_generator 0.8.0 Download jaguar_generator 0.8.0 archive
0.7.2 Jul 9, 2017 Go to the documentation of jaguar_generator 0.7.2 Download jaguar_generator 0.7.2 archive
0.7.1 Jul 9, 2017 Go to the documentation of jaguar_generator 0.7.1 Download jaguar_generator 0.7.1 archive

All 48 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.1.0.
 
 Because jaguar_generator depends on build >=0.0.1+1 <=0.12.7 which requires SDK version <2.0.0 or >=2.0.0-dev.9 <2.0.0, version solving failed.

Health suggestions

Format lib/writer/writer.dart.

Run dartfmt to format lib/writer/writer.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example.

None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use jaguar_generator.dart. Packages with multiple examples should use example/readme.md.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <3.0.0