Object with same value format for all keys in swagger
I want to document an API in swagger with nodejs + fastify which has a request body like this.
body: {
type: "object",
properties: {
body_param_1: {
type: "object",
properties: {
1: {
type: "object",
properties: {
title: {
type: "string"
},
link: {
type: "string",
},
status: {
type: "boolean"
}
}
},
2: {
type: "object",
properties: {
title: {
type: "string"
},
link: {
type: "string",
},
status: {
type: "boolean"
}
}
},
.
.
.
.
"n": {
type: "object",
properties: {
title: {
type: "string"
},
link: {
type: "string",
},
status: {
type: "boolean"
}
}
}
}
}
}
}
In this case I don't want to define the value for all keys [1,2,3...n]. I'm just wondering whether swagger allows to define the default format for all key value pairs in the object.
Since the keys in body_param_1 object is dynamic, is there a way to define the value format in swagger ?
Thanks in advance.