nebula_api_studio 0.1.1
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) inNebulaClient nebula_offlinecompanion package with persistent SQLite queue- GraphQL spec parser
- Freezed integration option for generated models
dart pub publishCI workflow
0.1.1 β 2026-04-29 #
Fixed #
- Removed unnecessary casts across
OpenApiParserandSwaggerParserto improve type safety and comply with Dart analyzer rules. - Fixed unused local variable
globalProducesinSwaggerParser. - Removed unused import
optimizer/name_normalizer.dartfromNebulaCompiler. - Improved type inference in parser layer to reduce
dynamicleakage. - 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 ASTSwaggerParserβ Swagger 2.0 / 2.x spec parserParserInterfaceβ extensible base for custom spec formatsApiAstβ root intermediate representation nodeApiEndpointβ endpoint node with method, path, parameters, request body and response typeApiModelβ model/schema node with typed fieldsApiTypeβ primitive, object, array and enum type nodes with nullable flagNameNormalizerβ snake_case / kebab-case / PascalCase / camelCase conversions with Dart reserved-keyword escapingNullSafetyInferrerβ promotes required fields to non-nullable, optional fields to nullableSchemaDeduplicatorβ removes exact duplicate schemas; renames structural conflictsCodeEmitterβ low-level string buffer with indentation helpersModelGeneratorβ emits null-safe Dart model classes withfromJson/toJson,copyWith,==andhashCodeEnumGeneratorβ emits Dart enums withfromJson/toJsonhelpersServiceGeneratorβ emits typed service classes backed byNebulaClientNebulaCompilerfaΓ§ade β orchestrates parse β optimize β generate pipeline
Runtime
Result<T>β typed success/failure monad withmap,flatMap,when,getOrElseApiErrorβ structured error withcode,message,statusCode,details,isClientError,isServerErrorApiRequestβ immutable request value object withcopyWithandfullUrlhelpersApiResponseβ immutable response withisSuccessand typedbodyNebulaClientβ single HTTP execution entry point with plugin chain, cache and retryHttpAdapterβ interface for swapping HTTP implementationsDefaultAdapterβ productiondart:ioHTTP adapterMemoryCacheβ in-memory LRU cache with per-entry TTLCacheProviderβ abstract cache interfaceCachePolicyβ per-client cache configuration with configurable cacheable methodsInvalidationGraphβ tag-based dependency graph with cascading invalidationRetryPolicyβ declarative retry configuration with per-status-code controlExponentialBackoffβ exponential delay calculator with optional Β±25 % jitterRetryEngineβ transparent retry orchestration wrapping anyFuture<ApiResponse>ApiPluginβ interceptor interface (beforeRequest,afterResponse,onError)PluginChainβ ordered plugin pipeline with correct request/response orderingAuthPluginβ Bearer / API-key / custom-scheme authentication header injectorLoggingPluginβ structured request/response logger withdebug / info / warn / errorlevelsAnalyticsPluginβ fires analytics events on every request/response cycleRequestQueueβ offline request queue with priority and persistence hooksSyncEngineβ connectivity-aware queue flusher
CLI
bin/nebula.dartβ CLI entry point powered bypackage:argsgeneratecommand β one-shot code generation from spec filewatchcommand β incremental regeneration usingpackage:watcherinitcommand β project scaffolding withnebula.config.jsontemplatedoctorcommand β environment health check (Dart SDK, wrangler, config validity)ConfigLoaderβ JSON config reader with CLI override merging and schema validationWatcherβ file-system watcher abstraction overpackage: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 exampleexample/main.dartβ end-to-end demo: mock adapter, plugin chain, CRUD operations, Result chaining, cache stats
Tests
test/compiler/ast_test.dartβ AST construction andApiTypeprimitivestest/compiler/parser_test.dartβ OpenAPI 3.x and Swagger 2.0 parsing (12 test cases)test/compiler/optimizer_test.dartβNameNormalizer,NullSafetyInferrer,SchemaDeduplicatortest/runtime/result_test.dartβResult<T>,ApiError,ApiRequest,ApiResponsetest/runtime/client_test.dartβNebulaClientexecution, plugins, retry and cachetest/runtime/cache_test.dartβMemoryCache,CachePolicy,InvalidationGraphtest/runtime/retry_plugin_test.dartβRetryPolicy,ExponentialBackoff,RetryEngine,PluginChain,AuthPlugintest/cli/config_loader_test.dartβConfigLoader,NebulaConfig, all exception types
Documentation
README.mdβ full documentation with architecture diagram, quick-start, API reference and contribution guideCHANGELOG.mdβ this fileLICENSEβ MIT licenseanalysis_options.yamlβ strict lint rules