How to add description to array items? #4248
Answered
by
timotheeguerin
risabhds
asked this question in
Json Schema
-
I want to generate the following json schema: {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "Demo.json",
"type": "object",
"properties": {
"example": {
"type": "array",
"items": {
"type": "string",
"description": "some description of string"
}
}
},
"required": [
"example"
]
} Notice the But unable to get this using typespec. The description is added on How to add description on the nested items |
Beta Was this translation helpful? Give feedback.
Answered by
timotheeguerin
Aug 29, 2024
Replies: 1 comment 1 reply
-
It is not possible as it is, if you do need that the solution is to create an array model with the description
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
risabhds
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is not possible as it is, if you do need that the solution is to create an array model with the description
Playground