Skip to content

Commit d636db0

Browse files
committed
oxide: bump API to 48c0c1b
1 parent a9bbb37 commit d636db0

File tree

4 files changed

+572
-253
lines changed

4 files changed

+572
-253
lines changed

VERSION_OMICRON

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4a0cb6b
1+
48c0c1b

internal/generate/utils.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,11 @@ func convertToValidGoType(property, typeName string, r *openapi3.SchemaRef) stri
110110
return getReferenceSchema(r)
111111
}
112112

113-
if r.Value.AdditionalProperties.Schema != nil {
114-
if r.Value.AdditionalProperties.Schema.Ref != "" {
115-
return getReferenceSchema(r.Value.AdditionalProperties.Schema)
116-
} else if r.Value.AdditionalProperties.Schema.Value.Items.Ref != "" {
117-
ref := getReferenceSchema(r.Value.AdditionalProperties.Schema.Value.Items)
118-
if r.Value.AdditionalProperties.Schema.Value.Items.Value.Type.Is("array") {
119-
return "[]" + ref
120-
}
121-
return ref
113+
if schema := r.Value.AdditionalProperties.Schema; schema != nil {
114+
if schema.Ref != "" {
115+
return getReferenceSchema(schema)
116+
} else {
117+
return schemaValueToGoType(schema.Value, property)
122118
}
123119
}
124120

0 commit comments

Comments
 (0)