Swagger is not creating example with expected format: How to use swagger with json-api golang
Input struct:
type example struct {
ID string `jsonapi:"primary,examples"`
value string `jsonapi:"attr,value"`
}
Expected format:
{
"data":[
{
"type": "examples",
"id": "01FDG693F2MS0ZCEW925MZ7BAA",
"attributes": {
"value": "xxx.xxx.xxx.xxx",
}
}
],
}