@@ -4,36 +4,49 @@ cdd-web-ng
44[ ![ License] ( https://img.shields.io/badge/license-MIT-blue )] ( https://opensource.org/licenses/MIT )
55[ ![ Tests and coverage] ( https://github.com/offscale/cdd-web-ng/actions/workflows/tests_and_coverage.yml/badge.svg )] ( https://github.com/offscale/cdd-web-ng/actions/workflows/tests_and_coverage.yml )
66[ ![ codecov] ( https://codecov.io/github/offscale/cdd-web-ng/graph/badge.svg?token=EtThJkGRA1 )] ( https://codecov.io/github/offscale/cdd-web-ng )
7+ [ ![ OpenAPI] ( https://img.shields.io/badge/OpenAPI-3.2.0-green )] ( https://spec.openapis.org/oas/v3.2.0 )
8+ [ ![ Swagger] ( https://img.shields.io/badge/Swagger-2.0-orange )] ( https://swagger.io/specification/v2/ )
79
810** OpenAPI ↔ Angular**
911
10- ` cdd-web-ng ` is an advanced, spec-compliant code generator that transforms OpenAPI specifications into fully-featured
11- Angular client SDKs. It goes beyond simple client generation, creating services, models, and even a complete CRUD
12- administrative UI with deep respect for the nuances of the OpenAPI 3.2.0 specification .
12+ ` cdd-web-ng ` is an advanced, spec-compliant code generator that transforms OpenAPI (3.0, 3.1, 3.2) and Swagger (2.0)
13+ specifications into fully-featured Angular client SDKs. It goes beyond simple client generation, creating services,
14+ models, and even a complete CRUD administrative UI with deep respect for the nuances of the API contract .
1315
1416## Key Features
1517
1618This generator is built to handle real-world, complex API definitions with a focus on correctness, extensibility, and
1719reliability.
1820
19- ### 🚀 Deep OpenAPI 3.2.0 Spec Compliance
21+ ### 🚀 Exhaustive OpenAPI 3.2.0 Compliance
2022
2123While many generators only cover the basics, ` cdd-web-ng ` is designed to correctly implement even the most complex and
22- esoteric parts of the OpenAPI specification. If it's in the spec, we aim to support it.
23-
24- - ** Complex Schemas:** Full support for ` discriminator ` for robust polymorphism, ` allOf ` , ` oneOf ` , ` anyOf ` , ` readOnly ` /
25- ` writeOnly ` properties (generating separate request/response models), and advanced validation keywords (
26- ` exclusiveMinimum ` , ` multipleOf ` , ` uniqueItems ` , etc.).
27- - ** Advanced Parameter Serialization:** Correctly implements ` style ` and ` explode ` for all parameter types (` path ` ,
28- ` query ` , ` header ` , and ` cookie ` ).
29- - ** Diverse Request & Response Bodies:** Natively handles various content types, including ` application/json ` ,
30- ` application/xml ` (with full ` xml ` object support), ` multipart/form-data ` (with ` encoding ` map), and
31- ` application/x-www-form-urlencoded ` .
32- - ** Full OpenAPI 3.1/3.2 Feature Set:** Implements often-overlooked features
33- like [ Runtime Expressions] ( https://spec.openapis.org/oas/v3.2.0.html#runtime-expressions ) , [ Callbacks] ( https://spec.openapis.org/oas/v3.2.0.html#callback-object ) , [ Webhooks] ( https://spec.openapis.org/oas/v3.2.0.html#webhook-object ) ,
34- and [ Links] ( https://spec.openapis.org/oas/v3.2.0.html#link-object ) .
35- - ** Multi-File Spec Support:** Intelligently loads and resolves references (` $ref ` , ` $dynamicRef ` , ` $id ` , ` $anchor ` )
36- across multiple local or remote files.
24+ esoteric parts of the modern OpenAPI specification. If it's in the spec, we support it.
25+
26+ - ** Complex Schemas & Polymorphism:** Full support for ` discriminator ` mapping (explicit and implicit), ` allOf `
27+ compositions, ` oneOf ` /` anyOf ` unions, and ` readOnly ` /` writeOnly ` filtering (generating distinct request vs. response
28+ models).
29+ - ** JSON Schema 2020-12 Support:** Handles OAS 3.1 specific keywords like ` $dynamicRef ` , ` dependentSchemas ` ,
30+ ` unevaluatedProperties ` , and ` prefixItems ` (tuples).
31+ - ** Advanced Serialization:**
32+ - ** XML:** Full support for the ` xml ` object, including ` nodeType ` , namespaces, prefixes, and attribute wrapping.
33+ - ** Multipart:** Nested ` multipart/mixed ` and ` multipart/form-data ` with specific header encodings.
34+ - ** Streaming:** Native support for sequential media types like ` application/json-seq ` , ` application/x-ndjson ` , and
35+ ` text/event-stream ` (Server-Sent Events).
36+ - ** Runtime Features:** Implements
37+ dynamic [ Runtime Expressions] ( https://spec.openapis.org/oas/v3.2.0.html#runtime-expressions ) for resolving ** Links**
38+ and ** Callbacks** directly from HTTP responses.
39+ - ** Strict Parameter Serialization:** Correctly implements ` style ` and ` explode ` logic for all parameter locations (
40+ path, query, header, cookie), including "deepObject" and space/pipe delimited styles.
41+
42+ ### 📚 Legacy Swagger 2.0 Support
43+
44+ Don't leave your legacy APIs behind. ` cdd-web-ng ` includes a robust compatibility layer that works with Swagger 2:
45+
46+ - Maps legacy ` collectionFormat ` (csv, ssv, pipes) to modern ` style ` /` explode ` serialization.
47+ - Normalizes ` definitions ` and ` securityDefinitions ` to the OpenAPI 3.0 component model.
48+ - Ensures your legacy services utilize the same modern Angular features (Signals, Standalone Components) as your new
49+ ones.
3750
3851### 🔌 Highly Extensible Architecture
3952
@@ -62,10 +75,10 @@ This is achieved through a two-phase process:
6275}%%
6376graph TD
6477 %% --- Top of the Flow ---
65- OpenAPI_Spec(["`<b>OpenAPI 3.x Spec </b><br/>Source of Truth`"])
78+ OpenAPI_Spec(["`<b>OpenAPI 3.x / Swagger 2.0 </b><br/>Source of Truth`"])
6679
6780 subgraph Core_Forward [1. Core Layer]
68- Spec_Parser("`<b>Spec Parser</b><br/>Loads & validates `")
81+ Spec_Parser("`<b>Spec Parser</b><br/>Loads, validates & normalizes `")
6982 end
7083
7184 Parsed_Object(("-"))
@@ -195,6 +208,6 @@ cdd_web_ng from_openapi --input <path-or-url-to-spec> --output <output-directory
195208
196209## Acknowledgement
197210
198- This project extends upon foundational ideas for Angular client generation (` Services ` only; no tests; no auto-admin)
199- from the MIT-licensed [ ng-openapi-gen] ( https://github.com/ng-openapi/ng-openapi ) project. Thanks
200- to [ Tareq Jami (@Mr-Jami )] ( https://github.com/Mr-Jami ) .
211+ This project extends upon foundational ideas for Angular client generation (` Services ` only; no tests; no auto-admin;
212+ limited OpenAPI spec implementation) from the MIT-licensed [ ng-openapi-gen] ( https://github.com/ng-openapi/ng-openapi )
213+ project. Thanks to [ Tareq Jami (@Mr-Jami )] ( https://github.com/Mr-Jami ) .
0 commit comments