aws-cloudformation / aws-cloudformation/cloudformation-cli
JSON pointer to elements in arrays of non-fixed length
- Dominant language
- Python
- Stars
- 336
- Forks
- 172
- Avg merge
- 3d 5m
- Merged PRs (30d)
- 3
Description
Kindly let me know if this is the wrong place to ask this question.
Given the following sample schema, property `Services` is an array of non-fixed length.
```
{
"definitions": {
"Service": {
"properties": {
"Id": {
"description": "The ID of the service instance.",
"type": "string"
},
"Type": {
"description": "The type of the service instance.",
"type": "string"
}
},
"additionalProperties": false
}
},
"properties": {
"Id": {
"description": "Unique identifier.",
"type": "string"
},
"Services": {
"description": "The list of services.",
"type": "array",
"items": {
"$ref": "#/definitions/Service"
}
}
},
"additionalProperties": false,
"readOnlyProperties": [
"/properties/Id"
],
"primaryIdentifier": [
"/properties/Id"
],
"writeOnlyProperties": [
"/properties/Services/0/Id"
]
}
```
How could I express in the schema that the `Id` property in the `Service` data is write-only?
I mean what json pointers should I put in `writeOnlyProperties`.
If the `Services` array is of fixed length, I could list all `/properties/Services/0/Id`, `/properties/Services/1/Id`, ..., there, but it's of non-fixed length.
If it's not possible, is there any other way to express this?
Thanks,
Contributor guide
Assessment
This issue has not been assessed yet.