Closed subeeshcbabu-zz closed 8 years ago
Why not just resolve $ref
for items?
I don't think there is much value in generating a model file
for an array
type.
Say for the petstore
example, a model file gets generated for Pet
.
Pet: {
required: [
"id",
"name"
],
properties: {
id: {
type: "integer",
format: "int64"
},
name: {
type: "string"
},
tag: {
type: "string"
}
}
}
For the array
type, Pets
, the model file, is just going to be an array list of the already generated model Pet
. Do we need to generate a file for this?
Pets: {
type: "array",
items: {
$ref: "#/definitions/Pet"
}
},
Oh yeah right, totally. I spoke too fast.
array
types and support$ref
in general - https://github.com/krakenjs/generator-swaggerize/issues/61 and