jaguar_retrofit_gen 2.8.10

  • Readme
  • Changelog
  • Installing
  • 71

jaguar_http_cli #

An Http Api generator inspired by Retrofit for Dart

Install #

pub global activate jaguar_http_cli

Usage #

A simple usage example:

pubspec.yaml #

jaguar_http:
  - example/example.dart

example.yaml #

library example;

part 'example.g.dart';

/// definition
@JaguarHttp(name: "Api")
abstract class ApiDefinition extends JaguarInterceptors {
  @Get("/users/:id")
  Future<JaguarResponse<User>> getUserById(@Param() String id);

  @Post("/users")
  Future<JaguarResponse<User>> postUser(@Body() User user);

  @Put("/users/:uid")
  Future<JaguarResponse<User>> updateUser(@Param(name: "uid") String userId, @Body() User user);

  @Delete("/users/:id")
  Future<JaguarResponse> deleteUser(@Param() String id);
}

run #

jaguar_http build

use it #

final api = new Api(new IOClient(), "http://localhost:9000", serializers: repo);

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

2.8.10 #

  • Updated auth_header dependency

2.8.9 #

  • FormFieldBody bug fix

2.8.8 #

  • Upgraded analyzer package

2.6.4 #

  • Implemented AsBodyString annotation

2.5.2 #

  • PathParam alias bug fix

2.2.2 #

  • Added AsForm, AsFormField

2.2.1 #

Breaking changes #

  • Change extension to .jretro.dart

Use this package as a library

1. Depend on it

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


dependencies:
  jaguar_retrofit_gen: ^2.8.10

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_retrofit_gen/jaguar_retrofit_gen.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
52
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

We analyzed this package on Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: other

Primary library: package:jaguar_retrofit_gen/jaguar_retrofit_gen.dart with components: io, build, mirrors.

Health issues and suggestions

Document public APIs. (-0.48 points)

111 out of 113 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/parser/parser.dart. (-1 points)

Analysis of lib/parser/parser.dart reported 2 hints:

line 88 col 9: DO use curly braces for all flow control structures.

line 104 col 9: DO use curly braces for all flow control structures.

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

Analysis of lib/parsed_info/parsed_info.dart reported 1 hint:

line 26 col 43: Use = to separate a named parameter from its default value.

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

Analysis of lib/writer/writer.dart reported 1 hint:

line 14 col 33: DO use curly braces for all flow control structures.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (analyzer).

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and jaguar_retrofit_gen.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.0.0-dev.65 <3.0.0
analyzer ^0.36.0 0.36.4 0.38.5
build ^1.1.4 1.2.0
jaguar_resty ^2.10.14 2.10.14
jaguar_retrofit ^2.8.8 2.8.8
logging ^0.11.0 0.11.3+2
meta ^1.1.5 1.1.7
source_gen ^0.9.0 0.9.4+4 0.9.4+5
Transitive dependencies
args 1.5.2
async 2.4.0
auth_header 2.1.4
charcode 1.1.2
client_cookie 2.2.1
convert 2.1.1
crypto 2.1.3
csslib 0.16.1
dart_style 1.2.9 1.3.1
front_end 0.1.19 0.1.27
glob 1.2.0
html 0.14.0+3
http 0.12.0+2
http_parser 3.1.3
jaguar_mimetype 1.0.1
jaguar_serializer 2.2.12
js 0.6.1+1
kernel 0.3.19 0.3.27
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0
pedantic 1.8.0+1
pub_semver 1.4.2
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+12
yaml 2.2.0
Dev dependencies
build_runner ^1.5.0
collection ^1.14.10 1.14.12
path ^1.6.2 1.6.4
pedenatic any
test ^1.3.0