Skip to content

Commit 1bb452f

Browse files
authored
Detect unsupported union shapes in the code generator (#2012)
Union shapes of RdsDataService that have already been generated as normal structure shapes are patched to keep support for them. Once proper support for union shapes is implemented, they will be migrated to union shapes in a major version of the package.
1 parent a02c6b4 commit 1bb452f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Definition/Shape.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ public static function create(string $name, array $data, \Closure $shapeLocator,
4545
$shape = new ExceptionShape();
4646
} elseif ($data['document'] ?? false) {
4747
$shape = new DocumentShape();
48+
} elseif ($data['union'] ?? false) {
49+
throw new \UnexpectedValueException(\sprintf('Union shapes are not supported yet by the code generator. The shape "%s" is a union shape.', $name));
4850
} else {
4951
$shape = new StructureShape();
5052
}

0 commit comments

Comments
 (0)