Skip to content

Commit d96802b

Browse files
author
Dwyer
committed
Update merge_schemas.go
1 parent 9bdb268 commit d96802b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

pkg/codegen/merge_schemas.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ import (
99

1010
// MergeSchemas merges all the fields in the schemas supplied into one giant schema.
1111
// The idea is that we merge all fields together into one schema.
12-
func MergeSchemas(sc *openapi3.Schema, path []string) (Schema, error) {
12+
func MergeSchemas(schema *openapi3.Schema, path []string) (Schema, error) {
1313
// If someone asked for the old way, for backward compatibility, return the
1414
// old style result.
1515
if globalState.options.Compatibility.OldMergeSchemas {
16-
return mergeSchemas_V1(sc.AllOf, path)
16+
return mergeSchemas_V1(schema.AllOf, path)
1717
}
18-
return mergeSchemas(sc, path)
18+
return mergeSchemas(schema, path)
1919
}
2020

21-
func mergeSchemas(sc *openapi3.Schema, path []string) (Schema, error) {
22-
allOf := sc.AllOf
21+
func mergeSchemas(baseSchema *openapi3.Schema, path []string) (Schema, error) {
22+
allOf := baseSchema.AllOf
2323
n := len(allOf)
2424

25-
schema := *sc
25+
schema := *baseSchema
2626
schema.AllOf = nil
2727

2828
for i := 0; i < n; i++ {

0 commit comments

Comments
 (0)