Skip to main content

dox_annotation 3.2.0 copy "dox_annotation: ^3.2.0" to clipboard
dox_annotation: ^3.2.0 copied to clipboard

Dox annotation for dox framework

3.2.0 #

  • New: package:dox_annotation/install.dart with Installer, the steps of a <package>:install command that dox add runs. writeFile (only when the file is not there), makeFolder, addEnv (to .env and .env.example, only when the key is missing), addEnvGetter (to AppEnv in lib/config/env.dart), addDependency (dart pub add, also dev), buildRunner, note (add your own summary line) and printSummary. lines is read only. Every step is safe to run twice. It is not in the dox_annotation.dart barrel.
  • New: DoxProvider.boot(). It runs once in every isolate after setup() of every provider is done. Optional, the default does nothing. dox_queue starts its in-process worker there, so the other providers (eg. the mail jobs) are ready first.
  • New: package:dox_annotation/provider.dart with DoxProvider. It moved here from dox_core, so a package below dox_core can have a provider. It is not in the dox_annotation.dart barrel.
  • New: package:dox_annotation/command.dart with Command and MigrationFile. They moved here from dox_core, so a package below dox_core can add dox commands.
  • New: GlobalMiddleware, a small shared list that packages use to add global middleware at startup. A package that does not depend on dox_core can use it. GlobalMiddleware.clear() is for tests.

3.1.3 #

  • Version bump only, to match the other packages.

3.1.2 #

  • Version bump only, to match the other packages.

3.1.1 #

  • Version bump only, to match the other packages.

3.1.0 #

  • New: id() on IAuth, so req.auth?.id() works. It gives the primary key of the logged-in user from the id() of the auth class (like Auth().id() of dox_auth), or null. It is an extension (IAuthHelpers), so a class that implements IAuth does not need to change. For a guest, req.auth is null.

3.0.2 #

  • Removed: ICacheDriver and IStorageDriver. Nothing used them. For a cache driver, use CacheDriver from dox_cache.
  • Tests for IHttpException.toResponse().

3.0.1 #

  • Version bump only, to match the other packages.

3.0.0 #

  • The first stable release.

3.0.0-rc.1 #

  • IDoxRequest.auth is now a field (getter and setter), not only a getter. The auth is kept apart from the input.

3.0.0-alpha.17 #

  • Version bump only, to match the other packages.

3.0.0-alpha.16 #

  • Version bump only, to match the other packages.

3.0.0-alpha.15 #

  • Version bump only, to match the other packages.

3.0.0-alpha.14 #

  • New: @Security.bearer(format: 'API key') and @Security.apiKey(header: 'X-API-Key'). Put it above a middleware class to show its login scheme in the OpenAPI docs.

3.0.0-alpha.13 #

  • Version bump only, to match the other packages.

3.0.0-alpha.12 #

  • Version bump only, to match the other packages.

3.0.0-alpha.11 #

  • Version bump only, to match the other packages.

3.0.0-alpha.10 #

  • Version bump only, to match the other packages.

3.0.0-alpha.9 #

  • New: @Inject(). Put it above a class and dox_builder adds the class to the Dox container. @Inject(singleton: false) makes a new instance each time.

3.0.0-alpha.8 #

  • Version bump only, to match the other packages.

3.0.0-alpha.7 #

  • Breaking: IDox, IDoxWebsocket and WebsocketEvent are removed. They were only used by dox_websocket.

3.0.0-alpha.6 #

  • Version bump only, to match the other packages.

3.0.0-alpha.5 #

  • New timestamps option on @DoxModel. timestamps: false turns off created_at and updated_at, like $timestamps = false in Laravel. createdAt: null or updatedAt: null turns off one of them.
  • New primaryKeyType option on @DoxModel. Use primaryKeyType: String for a UUID key. The default is int.
  • Fix: IHttpException.toResponse() now returns {"code": errorCode, "message": message} for a text message, so the client gets the errorCode. A Map message is returned as it is.

3.0.0-alpha.4 #

  • Version bump only, to match the other packages.

3.0.0-alpha.3 #

  • Version bump only, to match the other packages.

3.0.0-alpha.2 #

  • Needs Dart 3.13 or newer.
  • All dependencies updated to their latest versions.
  • OpenAPI annotations, all optional: @Summary, @Description, @Tags, @Request, @Body, @Query, @Response, @ApiDeprecated, @ApiIgnore, @DoxController. Lower case names work too (@summary(...)), except @Response.
  • The DTO annotations (@Dto, @Length, @Email, ...) live in dox_validation. dox_core exports them.
  • IDoxRequest has no validate() and no processInputMapper() any more. Use a DTO.
  • Breaking (small): these names are exported by dox_core too. If a file also imports a package with a Request or Response class (like package:http) without a prefix, add a prefix to that import.
  • New @DoxEnv() and @EnvKey('X') for the typed env class.

3.0.0-alpha.1 #

  • Version 3 of Dox. All Dox packages now share one version.
  • Needs Dart 3.6 or newer.
  • See the release notes for all main changes.

1.0.5 #

  • Add IDoxMiddleware interface

1.0.5-alpha1.9 #

  • Remove auth annotation

1.0.4 #

  • Initial version.