Skip to content

Commit eaa716c

Browse files
committed
fix
1 parent b66a4a7 commit eaa716c

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"github.com/spf13/cobra"
55
)
66

7-
const version = "1.0.2"
7+
const version = "1.0.3"
88

99
var rootCmd = &cobra.Command{
1010
Use: "openapi",

internal/writer.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,9 @@ type stdWriter struct {
3535
func (w *stdWriter) write(output *tmpl.Output, apis []*tmpl.Api, models []*tmpl.Ref, engine *template.Template) error {
3636
buf := &bytes.Buffer{}
3737

38-
if w.name == "model" {
39-
40-
models = lo.Filter(models, func(item *tmpl.Ref, index int) bool {
41-
return !item.Ignore
42-
})
43-
44-
if len(models) == 0 {
45-
return nil
46-
}
47-
}
38+
models = lo.Filter(models, func(item *tmpl.Ref, index int) bool {
39+
return !item.Ignore
40+
})
4841

4942
data := struct {
5043
Output *tmpl.Output

0 commit comments

Comments
 (0)