Skip to content

Commit fad490f

Browse files
committed
fix(output-options): obey prefer-skip-optional-pointer in reference types
1 parent e93501d commit fad490f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pkg/codegen/schema.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,11 @@ func GenerateGoSchema(sref *openapi3.SchemaRef, path []string) (Schema, error) {
270270
sref.Ref, err)
271271
}
272272
return Schema{
273-
GoType: refType,
274-
Description: schema.Description,
275-
DefineViaAlias: true,
276-
OAPISchema: schema,
273+
GoType: refType,
274+
Description: schema.Description,
275+
DefineViaAlias: true,
276+
OAPISchema: schema,
277+
SkipOptionalPointer: globalState.options.OutputOptions.PreferSkipOptionalPointer,
277278
}, nil
278279
}
279280

0 commit comments

Comments
 (0)