Skip to content

Commit 03f33b0

Browse files
committed
Add test for $allOf expansion and update changelog
1 parent 14e2693 commit 03f33b0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
* [cbSwagger #35](https://github.com/coldbox-modules/cbSwagger/issues/35) Fixed an issue where inheritance `$ref` pointers on a Zoomed document could not be found
1313

14+
### Added
15+
16+
* [cbSwagger #35](https://github.com/coldbox-modules/cbSwagger/issues/35) Added support for [polymorphic inheritance expansion](https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism/) ( e.g. `$allOf` )
17+
1418
### Changed
1519

1620
* Removed assignment of `x-resourceId` keys used by Relax from Swagger SDK parsing. [cbSwagger #20](https://github.com/coldbox-modules/cbSwagger/issues/20), [cbSwagger #27](https://github.com/coldbox-modules/cbSwagger/issues/27)

test-harness/tests/specs/ParserSpec.cfc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ component extends="BaseOpenAPISpec"{
8282
expect( NormalizedDocument ).toHaveKey( "openapi" );
8383
expect( NormalizedDocument ).toHaveKey( "servers" );
8484
expect( NormalizedDocument ).toHaveKey( "info" );
85+
8586
if(Parser.getSchemaType() eq "YAML")
8687
expect( NormalizedDocument ).toHaveKey( "components" );
8788

@@ -100,6 +101,7 @@ component extends="BaseOpenAPISpec"{
100101
expect( NormalizedDocument.paths[ '/pet/{petId}' ] ).toHaveDeepKey( "responses" );
101102

102103
expect( arrayLen( structFindKey( NormalizedDocument, "$ref" ) ) ).toBe( 0 );
104+
expect( arrayLen( structFindKey( NormalizedDocument, "$allOf" ) ) ).toBe( 0 );
103105

104106
});
105107

0 commit comments

Comments
 (0)