me_slack
4 years agoNew Contributor
Referencing Examples
Hi Guys,
I am trying to understand how to reference examples, I have two example endpoints:
GET /badge -> {Badge}
GET /badges -> [Badges]
So I would like to use the same example but in the /badges render this inside an array object.
I have the following:
BadgeExample:
value: {
"badge_id": 1,
"app_id": 1,
"name": "Most Villains Captured",
"app_json": null,
"created_at": "2000-01-01 00:00:00",
"updated_at": "2000-01-01 00:00:00"
}
BadgesExample:
value: [
$ref: '#/components/examples/BadgeExample'
]
However when i render the reporting it is not picking up the reference
Any help would be appriciated