schematyper
schematyper copied to clipboard
RFE: Don't create new types with non-$ref definitions in allOf
Right now using allOf
results in embedding any $ref
s and creating new structs for those that are defined in a new block. For those not using $ref
would it be possible (and correct?) to generate those as members of the struct that currently embeds the generated one? I.e. instead of generating:
type Bar struct { ... }
type FooEmbedded1 struct {
A int
B string
}
type Foo struct {
Bar
FooEmbedded1
}
for an allOf block including
$ref: "path/to/barand an object block with
Aand
B` generate:
type Bar struct { ... }
type Foo struct {
Bar
A int
B string
}