Skip to content

Commit

Permalink
🔀 post release branch sync (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse authored Feb 8, 2025
1 parent fc60863 commit 79948ff
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 25 deletions.
4 changes: 4 additions & 0 deletions chopper/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 8.1.0

- Deprecate all lower-case method annotations ([#651](https://github.com/lejard-h/chopper/pull/651))

## 8.0.4

- Update dependencies
Expand Down
38 changes: 19 additions & 19 deletions chopper/lib/src/annotations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ final class ChopperApi {
///
/// Declared as follows inside the path String:
/// ```dart
/// @Get(path: '/{param}')
/// @GET(path: '/{param}')
/// ```
///
/// Available inside method declaration:
/// ```dart
/// @Get(path: '/{param}')
/// @GET(path: '/{param}')
/// Future<Response> fetch(@Path() String param);
/// ```
/// {@endtemplate}
Expand All @@ -57,7 +57,7 @@ final class Path {
/// Name is used to bind a method parameter to
/// a URL path parameter.
/// ```dart
/// @Get(path: '/{param}')
/// @GET(path: '/{param}')
/// Future<Response> fetch(@Path('param') String hello);
/// ```
final String? name;
Expand All @@ -72,7 +72,7 @@ final class Path {
/// [Query] is used to add query parameters after the request url.
/// Example: /something?id=42
/// ```dart
/// @Get(path: '/something')
/// @GET(path: '/something')
/// Future<Response> fetch({@Query() String id});
/// ```
///
Expand All @@ -84,7 +84,7 @@ final class Query {
/// Name is used to bind a method parameter to
/// the query parameter.
/// ```dart
/// @Get(path: '/something')
/// @GET(path: '/something')
/// Future<Response> fetch({@Query('id') String mySuperId});
/// ```
final String? name;
Expand All @@ -97,7 +97,7 @@ final class Query {
/// Provides query parameters of a request as [Map<String, dynamic>].
///
/// ```dart
/// @Get(path: '/something')
/// @GET(path: '/something')
/// Future<Response> fetch(@QueryMap() Map<String, dynamic> query);
/// ```
///
Expand Down Expand Up @@ -138,7 +138,7 @@ final class Body {
/// Use the name of the method parameter or the name specified in the annotation.
///
/// ```dart
/// @Get()
/// @GET()
/// Future<Response> fetch(@Header() String foo);
/// ```
/// {@endtemplate}
Expand All @@ -148,7 +148,7 @@ final class Header {
/// Name is used to bind a method parameter to
/// a header name.
/// ```dart
/// @Get()
/// @GET()
/// Future<Response> fetch(@Header('foo') String headerFoo);
/// ```
final String? name;
Expand All @@ -166,7 +166,7 @@ final class Header {
/// [GET], [POST], [PUT], [DELETE], [PATCH], or [HEAD] should be used instead.
///
/// ```dart
/// @Get(headers: const {'foo': 'bar' })
/// @GET(headers: const {'foo': 'bar' })
/// Future<Response> myGetRequest();
/// ```
///
Expand Down Expand Up @@ -215,7 +215,7 @@ sealed class Method {
/// NOTE: Empty strings are always included.
///
/// ```dart
/// @Get(
/// @GET(
/// path: '/script',
/// includeNullQueryVars: true,
/// )
Expand Down Expand Up @@ -549,7 +549,7 @@ typedef ConvertResponse<T> = FutureOr<Response<T>> Function(Response response);
/// );
/// }
///
/// @Get(path: "/{id}")
/// @GET(path: "/{id}")
/// @FactoryConverter(
/// request: customRequestConverter,
/// response: customResponseConverter
Expand All @@ -576,7 +576,7 @@ final class FactoryConverter {
/// Automatically binds to the name of the method parameter.
///
/// ```dart
/// @Post(path: '/')
/// @POST(path: '/')
/// Future<Response> create(@Field() String name);
/// ```
/// Will be converted to `{ 'name': value }`.
Expand All @@ -586,7 +586,7 @@ final class FactoryConverter {
final class Field {
/// Name can be use to specify the name of the field
/// ```dart
/// @Post(path: '/')
/// @POST(path: '/')
/// Future<Response> create(@Field('id') String myId);
/// ```
final String? name;
Expand All @@ -599,7 +599,7 @@ final class Field {
/// Provides field parameters of a request as [Map<String, dynamic>].
///
/// ```dart
/// @Post(path: '/something')
/// @POST(path: '/something')
/// Future<Response> fetch(@FieldMap Map<String, dynamic> query);
/// ```
/// {@endtemplate}
Expand All @@ -614,7 +614,7 @@ final class FieldMap {
/// Defines a multipart request.
///
/// ```dart
/// @Post(path: '/')
/// @POST(path: '/')
/// @Multipart()
/// Future<Response> create(@Part() String name);
/// ```
Expand Down Expand Up @@ -649,7 +649,7 @@ final class Part {
/// Provides part parameters of a request as [PartValue].
///
/// ```dart
/// @Post(path: '/something')
/// @POST(path: '/something')
/// @Multipart
/// Future<Response> fetch(@PartMap() List<PartValue> query);
/// ```
Expand All @@ -665,7 +665,7 @@ final class PartMap {
/// Use [PartFile] to define a file field for a [Multipart] request.
///
/// ```dart
/// @Post(path: 'file')
/// @POST(path: 'file')
/// @multipart
/// Future<Response> postFile(@PartFile('file') List<int> bytes);
/// ```
Expand All @@ -688,7 +688,7 @@ final class PartFile {
/// Provides partFile parameters of a request as [PartValueFile].
///
/// ```dart
/// @Post(path: '/something')
/// @POST(path: '/something')
/// @Multipart
/// Future<Response> fetch(@PartFileMap() List<PartValueFile> query);
/// ```
Expand All @@ -712,7 +712,7 @@ final class PartFileMap {
///
///
/// ```dart
/// @Post(path: '/something')
/// @POST(path: '/something')
/// @FormUrlEncoded
/// Future<Response> fetch(@Field("param") String? param);
/// ```
Expand Down
2 changes: 1 addition & 1 deletion chopper/lib/src/converters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ abstract interface class ErrorConverter {
/// This `Converter` also adds the `content-type: application/json` header to each request.
///
/// If content type header is modified (for example by using
/// `@Post(headers: {'content-type': '...'})`), `JsonConverter` won't add the
/// `@POST(headers: {'content-type': '...'})`), `JsonConverter` won't add the
/// header and it won't call json.encode if content type is not JSON.
/// {@endtemplate}
@immutable
Expand Down
4 changes: 2 additions & 2 deletions chopper/lib/src/response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import 'package:meta/meta.dart';
/// A [http.BaseResponse] wrapper representing a response of a Chopper network call.
///
/// ```dart
/// @Get(path: '/something')
/// @GET(path: '/something')
/// Future<Response> fetchSomething();
/// ```
///
/// ```dart
/// @Get(path: '/items/{id}')
/// @GET(path: '/items/{id}')
/// Future<Response<Item>> fetchItem();
/// ```
/// {@endtemplate}
Expand Down
2 changes: 1 addition & 1 deletion chopper/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: chopper
description: Chopper is an http client generator using source_gen, inspired by Retrofit
version: 8.0.4
version: 8.1.0
documentation: https://hadrien-lejard.gitbook.io/chopper
repository: https://github.com/lejard-h/chopper

Expand Down
4 changes: 4 additions & 0 deletions chopper_generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 8.1.0

- Deprecate all lower-case method annotations ([#651](https://github.com/lejard-h/chopper/pull/651))

## 8.0.4

- Update dependencies
Expand Down
4 changes: 2 additions & 2 deletions chopper_generator/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: chopper_generator
description: Chopper is an http client generator using source_gen, inspired by Retrofit
version: 8.0.4
version: 8.1.0
documentation: https://hadrien-lejard.gitbook.io/chopper
repository: https://github.com/lejard-h/chopper

Expand All @@ -11,7 +11,7 @@ dependencies:
analyzer: ">=6.9.0 <8.0.0"
build: ^2.4.1
built_collection: ^5.1.1
chopper: ^8.0.3
chopper: ^8.0.4
code_builder: ^4.10.0
logging: ^1.2.0
meta: ^1.9.1
Expand Down

0 comments on commit 79948ff

Please sign in to comment.