Skip to content

Commit 7b6d843

Browse files
committed
fix: enable inline import flags when generate openapi
1 parent 06e8aa6 commit 7b6d843

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/encoding/encoder.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ func NewEncoder(ctx *cue.Context, f *build.File, cfg *Config) (*Encoder, error)
8080
case "":
8181
case build.OpenAPI:
8282
// TODO: get encoding options
83-
cfg := &openapi.Config{}
83+
cfg := &openapi.Config{
84+
ExpandReferences: cfg.InlineImports,
85+
}
8486
e.interpret = func(v cue.Value) (*ast.File, error) {
8587
return openapi.Generate(v, cfg)
8688
}

0 commit comments

Comments
 (0)