From 2946b4b4ae287287325bc87437338302397cdcbe Mon Sep 17 00:00:00 2001 From: Don Olmstead Date: Tue, 30 Sep 2025 14:21:05 -0700 Subject: [PATCH] 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. --- openapi/openapi.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 8e49ea6..def849e 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -4681,6 +4681,16 @@ components: - $ref: "#/components/schemas/GradientPaint" - $ref: "#/components/schemas/ImagePaint" - $ref: "#/components/schemas/PatternPaint" + discriminator: + propertyName: type + mapping: + SOLID: "#/components/schemas/SolidPaint" + GRADIENT_LINEAR: "#/components/schemas/GradientPaint" + GRADIENT_RADIAL: "#/components/schemas/GradientPaint" + GRADIENT_ANGULAR: "#/components/schemas/GradientPaint" + GRADIENT_DIAMOND: "#/components/schemas/GradientPaint" + IMAGE: "#/components/schemas/ImagePaint" + PATTERN: "#/components/schemas/PatternPaint" LayoutConstraint: type: object description: Layout constraint relative to containing Frame