nebula_api_studio 0.1.1 copy "nebula_api_studio: ^0.1.1" to clipboard
nebula_api_studio: ^0.1.1 copied to clipboard

A professional Dart/Flutter package combining a Compiler + Runtime SDK. Convert OpenAPI 3.x / Swagger 2.0 specs into fully type-safe Dart SDKs with smart caching, retry policies, a plugin system, offl [...]

Changelog #

All notable changes to Nebula API Studio are documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


Unreleased #

Planned #

  • WebSocket endpoint support in the compiler and runtime
  • File-upload helpers (multipart/form-data) in NebulaClient
  • nebula_offline companion package with persistent SQLite queue
  • GraphQL spec parser
  • Freezed integration option for generated models
  • dart pub publish CI workflow

0.1.1 β€” 2026-04-29 #

Fixed #

  • Removed unnecessary casts across OpenApiParser and SwaggerParser to improve type safety and comply with Dart analyzer rules.
  • Fixed unused local variable globalProduces in SwaggerParser.
  • Removed unused import optimizer/name_normalizer.dart from NebulaCompiler.
  • Improved type inference in parser layer to reduce dynamic leakage.
  • Cleaned up runtime client warnings related to constructor ordering and lint compliance.

Improved #

  • Enhanced parser robustness when handling malformed or partially defined OpenAPI schemas.
  • Improved AST generation consistency for edge-case array and map schema definitions.
  • Reduced analyzer warnings across compiler and runtime modules (significant lint reduction before pub.dev release).

Internal #

  • Refactored parsing pipeline to reduce redundant casting in swagger_parser.dart.
  • Minor cleanup in runtime client initialization flow for better maintainability.

πŸ”— Update links section (VERY IMPORTANT) #

Replace your bottom links with this updated version:

[Unreleased]: https://github.com/example/nebula_api_studio/compare/v1.0.1...HEAD
[1.0.1]: https://github.com/example/nebula_api_studio/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/example/nebula_api_studio/compare/v0.9.0-beta...v1.0.0
[0.9.0-beta]: https://github.com/example/nebula_api_studio/releases/tag/v0.9.0-beta

0.1.0 β€” 2024-01-15 #

Added #

Compiler

  • OpenApiParser β€” full OpenAPI 3.0 / 3.1 spec parser producing a typed AST
  • SwaggerParser β€” Swagger 2.0 / 2.x spec parser
  • ParserInterface β€” extensible base for custom spec formats
  • ApiAst β€” root intermediate representation node
  • ApiEndpoint β€” endpoint node with method, path, parameters, request body and response type
  • ApiModel β€” model/schema node with typed fields
  • ApiType β€” primitive, object, array and enum type nodes with nullable flag
  • NameNormalizer β€” snake_case / kebab-case / PascalCase / camelCase conversions with Dart reserved-keyword escaping
  • NullSafetyInferrer β€” promotes required fields to non-nullable, optional fields to nullable
  • SchemaDeduplicator β€” removes exact duplicate schemas; renames structural conflicts
  • CodeEmitter β€” low-level string buffer with indentation helpers
  • ModelGenerator β€” emits null-safe Dart model classes with fromJson / toJson, copyWith, == and hashCode
  • EnumGenerator β€” emits Dart enums with fromJson / toJson helpers
  • ServiceGenerator β€” emits typed service classes backed by NebulaClient
  • NebulaCompiler faΓ§ade β€” orchestrates parse β†’ optimize β†’ generate pipeline

Runtime

  • Result<T> β€” typed success/failure monad with map, flatMap, when, getOrElse
  • ApiError β€” structured error with code, message, statusCode, details, isClientError, isServerError
  • ApiRequest β€” immutable request value object with copyWith and fullUrl helpers
  • ApiResponse β€” immutable response with isSuccess and typed body
  • NebulaClient β€” single HTTP execution entry point with plugin chain, cache and retry
  • HttpAdapter β€” interface for swapping HTTP implementations
  • DefaultAdapter β€” production dart:io HTTP adapter
  • MemoryCache β€” in-memory LRU cache with per-entry TTL
  • CacheProvider β€” abstract cache interface
  • CachePolicy β€” per-client cache configuration with configurable cacheable methods
  • InvalidationGraph β€” tag-based dependency graph with cascading invalidation
  • RetryPolicy β€” declarative retry configuration with per-status-code control
  • ExponentialBackoff β€” exponential delay calculator with optional Β±25 % jitter
  • RetryEngine β€” transparent retry orchestration wrapping any Future<ApiResponse>
  • ApiPlugin β€” interceptor interface (beforeRequest, afterResponse, onError)
  • PluginChain β€” ordered plugin pipeline with correct request/response ordering
  • AuthPlugin β€” Bearer / API-key / custom-scheme authentication header injector
  • LoggingPlugin β€” structured request/response logger with debug / info / warn / error levels
  • AnalyticsPlugin β€” fires analytics events on every request/response cycle
  • RequestQueue β€” offline request queue with priority and persistence hooks
  • SyncEngine β€” connectivity-aware queue flusher

CLI

  • bin/nebula.dart β€” CLI entry point powered by package:args
  • generate command β€” one-shot code generation from spec file
  • watch command β€” incremental regeneration using package:watcher
  • init command β€” project scaffolding with nebula.config.json template
  • doctor command β€” environment health check (Dart SDK, wrangler, config validity)
  • ConfigLoader β€” JSON config reader with CLI override merging and schema validation
  • Watcher β€” file-system watcher abstraction over package:watcher

Public API

  • lib/nebula_api_studio.dart β€” single barrel export for all public symbols

Example

  • example/swagger.yaml β€” complete Pet Store OpenAPI 3.0 spec (pets, owners, orders, enums, nested models)
  • example/nebula.config.json β€” annotated configuration example
  • example/main.dart β€” end-to-end demo: mock adapter, plugin chain, CRUD operations, Result chaining, cache stats

Tests

  • test/compiler/ast_test.dart β€” AST construction and ApiType primitives
  • test/compiler/parser_test.dart β€” OpenAPI 3.x and Swagger 2.0 parsing (12 test cases)
  • test/compiler/optimizer_test.dart β€” NameNormalizer, NullSafetyInferrer, SchemaDeduplicator
  • test/runtime/result_test.dart β€” Result<T>, ApiError, ApiRequest, ApiResponse
  • test/runtime/client_test.dart β€” NebulaClient execution, plugins, retry and cache
  • test/runtime/cache_test.dart β€” MemoryCache, CachePolicy, InvalidationGraph
  • test/runtime/retry_plugin_test.dart β€” RetryPolicy, ExponentialBackoff, RetryEngine, PluginChain, AuthPlugin
  • test/cli/config_loader_test.dart β€” ConfigLoader, NebulaConfig, all exception types

Documentation

  • README.md β€” full documentation with architecture diagram, quick-start, API reference and contribution guide
  • CHANGELOG.md β€” this file
  • LICENSE β€” MIT license
  • analysis_options.yaml β€” strict lint rules

0.9.0-beta β€” 2024-01-01 #

Added #

  • Initial beta release with compiler skeleton and basic runtime
  • Proof-of-concept OpenAPI parser
  • Result<T> monad prototype

Changed #

  • Restructured package layout to compiler / runtime / shared / cli

Removed #

  • Legacy api_client.dart monolithic file replaced by NebulaClient

2
likes
130
points
137
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A professional Dart/Flutter package combining a Compiler + Runtime SDK. Convert OpenAPI 3.x / Swagger 2.0 specs into fully type-safe Dart SDKs with smart caching, retry policies, a plugin system, offline queue, and a powerful CLI with watch mode. Ready for pub.dev.

Topics

#networking #code-generation #openapi #swagger #http

License

MIT (license)

Dependencies

collection, http, meta, path, yaml

More

Packages that depend on nebula_api_studio