Closed RaviVaranasi closed 10 months ago
Hi @RaviVaranasi
The parser will automatically pick it up in this case, no need to document the property as a custom schema.
There's an example of this in the examples
folder, specifically the Reference1
class has a property of type list here: https://github.com/cesarParra/apexdocs/blob/master/examples/force-app/main/default/restapi/references/Reference1.cls#L7
This gets converted to:
...
"Reference1": {
"type": "object",
"properties": {
"reference2Member": {
"$ref": "#/components/schemas/Reference2",
"description": "This is a reference 2 member. Lorem."
},
"reference3Member": {
"$ref": "#/components/schemas/Reference3"
},
"reference4Collection": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Reference4"
}
},
"reference5Member": {
"$ref": "#/components/schemas/Reference5"
}
}
},
...
Is there an example to show the array reference for a custom class? The documentation reference shows custom schemas or is the parser automatically generates the array type?