Skip to content

Commit 0f2f02a

Browse files
committed
hack
1 parent a46bd1a commit 0f2f02a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/codegen/codegen.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func Generate(spec *openapi3.T, opts Configuration) (string, error) {
184184

185185
// Multi-pass name resolution: gather all schemas, then resolve names globally.
186186
// Only enabled when resolve-type-name-collisions is set.
187-
if opts.OutputOptions.ResolveTypeNameCollisions {
187+
if true { // HACK
188188
gathered := GatherSchemas(spec, opts)
189189
globalState.resolvedNames = ResolveNames(gathered)
190190
// Build a separate operationID -> wrapper name lookup for genResponseTypeName.
@@ -737,7 +737,7 @@ func GenerateTypesForResponses(t *template.Template, responses openapi3.Response
737737
// TODO: revisit this at the next major version change —
738738
// always include the media type in the schema path.
739739
schemaPath := []string{responseName}
740-
if jsonCount > 1 && globalState.options.OutputOptions.ResolveTypeNameCollisions {
740+
if jsonCount > 1 && true { // HACK
741741
schemaPath = append(schemaPath, mediaTypeToCamelCase(mediaType))
742742
}
743743
goType, err := GenerateGoSchema(response.Schema, schemaPath)

pkg/codegen/operations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ func (o *OperationDefinition) GetResponseTypeDefinitions() ([]ResponseTypeDefini
361361
// TODO: revisit this at the next major version change —
362362
// always include the media type in the schema path.
363363
schemaPath := []string{o.OperationId, responseName}
364-
if jsonCount > 1 && util.IsMediaTypeJson(contentTypeName) && globalState.options.OutputOptions.ResolveTypeNameCollisions {
364+
if jsonCount > 1 && util.IsMediaTypeJson(contentTypeName) && true { // HACK
365365
schemaPath = append(schemaPath, mediaTypeToCamelCase(contentTypeName))
366366
}
367367
responseSchema, err := GenerateGoSchema(contentType.Schema, schemaPath)

0 commit comments

Comments
 (0)