@alexa/ask-expressions-spec
Version:
The JSON Schema specification for the Alexa Skills Kit Intermediate Representation (ASKIR).
133 lines (75 loc) • 5.26 kB
Markdown
# argument-declaration Schema
```txt
https://amazonalexa.com/ask/2020/12/ArgumentsDeclaration#/items
```
The representation of an argument declaration.
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :-------------------------------------------------------------------------------------------- |
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [ArgumentsDeclaration.json\*](../../schemas/ArgumentsDeclaration.json "open original schema") |
## items Type
`object` ([argument-declaration](argumentsdeclaration-argument-declaration.md))
# items Properties
| Property | Type | Required | Nullable | Defined by |
| :-------------------------------------- | :------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [name](#name) | `string` | Required | cannot be null | [ArgumentsDeclaration](genericargumentsdeclaration-items-properties-name.md "https://amazonalexa.com/ask/2020/12/Name#/items/properties/name") |
| [type](#type) | `object` | Required | cannot be null | [ArgumentsDeclaration](actiondeclaration-properties-typereference.md "https://amazonalexa.com/ask/2020/12/TypeReference#/items/properties/type") |
| [defaultExpression](#defaultexpression) | Merged | Optional | cannot be null | [ArgumentsDeclaration](argumentsdeclaration-argument-declaration-properties-defaultexpression.md "https://amazonalexa.com/ask/2020/12/ArgumentsDeclaration#/items/properties/defaultExpression") |
| [annotations](#annotations) | `array` | Optional | cannot be null | [ArgumentsDeclaration](argumentsdeclaration-argument-declaration-properties-annotations.md "https://amazonalexa.com/ask/2020/12/ArgumentsDeclaration#/items/properties/annotations") |
## name
A name.
`name`
* is required
* Type: `string` ([Name](genericargumentsdeclaration-items-properties-name.md))
* cannot be null
* defined in: [ArgumentsDeclaration](genericargumentsdeclaration-items-properties-name.md "https://amazonalexa.com/ask/2020/12/Name#/items/properties/name")
### name Type
`string` ([Name](genericargumentsdeclaration-items-properties-name.md))
### name Constraints
**pattern**: the string must match the following regular expression: 
```regexp
^[a-zA-Z_][a-zA-Z0-9_]*$
```
[try pattern](https://regexr.com/?expression=%5E%5Ba-zA-Z_%5D%5Ba-zA-Z0-9_%5D*%24 "try regular expression with regexr.com")
### name Examples
```json
"foo"
```
```json
"bar"
```
```json
"person"
```
```json
"foo1"
```
## type
The representation of a reference to a type declaration.
`type`
* is required
* Type: `object` ([TypeReference](actiondeclaration-properties-typereference.md))
* cannot be null
* defined in: [ArgumentsDeclaration](actiondeclaration-properties-typereference.md "https://amazonalexa.com/ask/2020/12/TypeReference#/items/properties/type")
### type Type
`object` ([TypeReference](actiondeclaration-properties-typereference.md))
## defaultExpression
Indicates whether the argument is required. If the argument is not provided in an 'Call' expression, this expression will be used instead.
`defaultExpression`
* is optional
* Type: merged type ([Details](argumentsdeclaration-argument-declaration-properties-defaultexpression.md))
* cannot be null
* defined in: [ArgumentsDeclaration](argumentsdeclaration-argument-declaration-properties-defaultexpression.md "https://amazonalexa.com/ask/2020/12/ArgumentsDeclaration#/items/properties/defaultExpression")
### defaultExpression Type
merged type ([Details](argumentsdeclaration-argument-declaration-properties-defaultexpression.md))
one (and only one) of
* [Call](actiondeclaration-properties-annotations-call.md "check type definition")
* [property reference](arguments-definitions-arg-expression-oneof-property-reference.md "check type definition")
* [name](arguments-definitions-arg-expression-oneof-name.md "check type definition")
## annotations
`annotations`
* is optional
* Type: `object[]` ([Call](actiondeclaration-properties-annotations-call.md))
* cannot be null
* defined in: [ArgumentsDeclaration](argumentsdeclaration-argument-declaration-properties-annotations.md "https://amazonalexa.com/ask/2020/12/ArgumentsDeclaration#/items/properties/annotations")
### annotations Type
`object[]` ([Call](actiondeclaration-properties-annotations-call.md))