Skip to content

Commit

Permalink
add dox middleware to annotation (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
necessarylion authored Dec 15, 2023
1 parent 204ac39 commit 04dae93
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/dox-annotation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.5-alpha2.0

- Add IDoxMiddleware interface

## 1.0.5-alpha1.9

- Remove auth annotation
Expand Down
11 changes: 10 additions & 1 deletion packages/dox-annotation/lib/src/core_annotation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ abstract class IDox {
}

abstract class IDoxRequest {
late Uri uri;
String method = 'GET';
HttpRequest get httpRequest;
ContentType? get contentType;
String getRouteIdentifier();
dynamic getRouteData();
Map<String, dynamic> get headers;
String? header(String key);
void add(String key, dynamic value);
Expand All @@ -28,7 +32,8 @@ abstract class IDoxRequest {
String? referer();
void validate(Map<String, String> rules,
{Map<String, String> messages = const <String, String>{}});
void mapInputs(Map<String, String> mapper);
void processInputMapper(Map<String, String> mapper);
Map<String, dynamic> toJson();
}

abstract class IStorageDriver {
Expand Down Expand Up @@ -62,3 +67,7 @@ abstract class IHttpException {
return message.toString();
}
}

abstract class IDoxMiddleware {
dynamic handle(IDoxRequest req);
}
2 changes: 1 addition & 1 deletion packages/dox-annotation/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dox_annotation
description: Dox annotation for dox framework
version: 1.0.5-alpha1.9
version: 1.0.5-alpha2.0
repository: https://github.com/dartondox/dox
homepage: https://dartondox.dev

Expand Down

0 comments on commit 04dae93

Please sign in to comment.