Skip to content

Commit

Permalink
Add support for optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
botder committed Oct 9, 2024
1 parent 48f7814 commit 37ca3a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions functions/Cursor/showCursor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ shared: &shared
type: 'bool'
description: |
A boolean value determining whether to disable controls whilst the cursor is showing. *true* implies controls are disabled, *false* implies controls remain enabled.
default: 'true'
returns:
description: |
Returns *true* if the player's cursor was shown or hidden successfully, *false* otherwise.
Expand Down
9 changes: 9 additions & 0 deletions schemas/function.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ $defs:
description:
type: string
description: Describe the usage, contraints and other useful information about the parameter.
default:
type: string
description: |
The default value for this parameter, if none was given in the call to the function.
This property automatically implicitly marks this parameter as optional.
optional:
type: boolean
default: false
description: If set to true, this parameter will be marked as optional.

returns:
type: object
Expand Down

0 comments on commit 37ca3a8

Please sign in to comment.