-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
model - discriminated unions with parent properties
apply parent properties first, so children can overwrite the discriminator with their Literal value
- Loading branch information
Showing
4 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
openapi: "3.1.0" | ||
info: | ||
version: 1.0.0 | ||
title: enum test | ||
|
||
components: | ||
schemas: | ||
CustomContextVariable: | ||
additionalProperties: false | ||
discriminator: | ||
mapping: | ||
user: '#/components/schemas/UserContextVariable' | ||
propertyName: type | ||
oneOf: | ||
- $ref: '#/components/schemas/UserContextVariable' | ||
properties: | ||
type: | ||
description: Type of custom context variable. | ||
type: string | ||
required: | ||
- type | ||
type: object | ||
UserContextVariable: | ||
description: A [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user) | ||
specified as an Atlassian account ID. | ||
properties: | ||
accountId: | ||
description: The account ID of the user. | ||
type: string | ||
type: | ||
description: Type of custom context variable. | ||
type: string | ||
required: | ||
- accountId | ||
- type | ||
type: object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters