diene_api_engine 1.0.0 copy "diene_api_engine: ^1.0.0" to clipboard
diene_api_engine: ^1.0.0 copied to clipboard

Typed OA3 backend-client engine: wraps generated OpenAPI SDKs into Result/Problem outcomes, registers N backends, retries once on network failure, ships a dormant rescue router.

diene_api_engine #

pub package CI unit coverage meta coverage

The generic, pure-Dart library template for the Diene family. It ships a small, replaceable sample domain — a Note value type with a JSON wire codec and a pure summariser — inside the reusable template machinery (strict analysis, targeted coverage, a dependency-light TestHelper, a C0 fixture harness, package hygiene, and a shipped usage skill).

import 'package:diene_api_engine/diene_api_engine.dart';

const Note note = Note(title: 'Release', body: 'Ship the template.');

final String summary = summarizeNote(note);        // 'Release — Ship the template.'
final Note decoded = Note.fromJson(note.toJson());  // round-trips through JSON

Public surface #

  • Note — immutable title/body value type with value equality and a JSON wire codec (Note.fromJson / toJson).
  • summarizeNote(note, {maxLength}) — a pure single-line summariser.
  • defaultSummaryLength — the default summary cap.

TestHelper #

Consumer tests may import package:diene_api_engine/test_helper.dart for assertNoteSummary, a dependency-light assertion that throws NoteAssertionFailure on mismatch and pulls in no test framework.

Read the package doc for the full API, wire contract, C0 harness, and guidance on replacing the sample.

Using this template #

This is a template: a materialized child retokenizes the package identity to diene_<name> / AtomiCloud/diene.dart_<name>, replaces lib/src/** with its own domain, and re-points the barrel exports. See skills/diene-api-engine-usage/patterns.md.

Development #

  • pls setup resolves the workspace dependencies.
  • pls test runs the unit, C0 conformance, and TestHelper meta suites.
  • pls test:coverage enforces the separate unit and meta ledgers.
  • pls deadcode runs the repository and production-only dead-code passes.
  • pls package:validate runs the release guard, publish dry-run, and pana.
0
likes
160
points
37
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Typed OA3 backend-client engine: wraps generated OpenAPI SDKs into Result/Problem outcomes, registers N backends, retries once on network failure, ships a dormant rescue router.

Repository (GitHub)
View/report issues

Topics

#api #openapi #http #result #resilience

License

MIT (license)

Dependencies

collection, diene_auth_engine, diene_problems, diene_result, dio, flutter, json_annotation, meta, retrofit

More

Packages that depend on diene_api_engine