Skip to content

Commit 22ce8d4

Browse files
committed
add discriminator for Paint
The type of `Paint` is announced in the `type` property. Provide a mapping to the types based on `type`'s value.
1 parent 887d806 commit 22ce8d4

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

openapi/openapi.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4696,6 +4696,16 @@ components:
46964696
- $ref: "#/components/schemas/GradientPaint"
46974697
- $ref: "#/components/schemas/ImagePaint"
46984698
- $ref: "#/components/schemas/PatternPaint"
4699+
discriminator:
4700+
propertyName: type
4701+
mapping:
4702+
SOLID: "#/components/schemas/SolidPaint"
4703+
GRADIENT_LINEAR: "#/components/schemas/GradientPaint"
4704+
GRADIENT_RADIAL: "#/components/schemas/GradientPaint"
4705+
GRADIENT_ANGULAR: "#/components/schemas/GradientPaint"
4706+
GRADIENT_DIAMOND: "#/components/schemas/GradientPaint"
4707+
IMAGE: "#/components/schemas/ImagePaint"
4708+
PATTERN: "#/components/schemas/PatternPaint"
46994709
LayoutConstraint:
47004710
type: object
47014711
description: Layout constraint relative to containing Frame

0 commit comments

Comments
 (0)