-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
When "x-go-type-name" is set for an object type within the responses-section of an operation definition (not in the components-section), the type definition is not included in the generated file.
Example:
info:
version: '0.0.1'
title: example
description: |
Make sure that recursive types are handled properly
paths:
/example:
get:
operationId: exampleGet
responses:
'200':
description: "OK"
content:
'application/json':
schema:
type: object
x-go-type-name: SomeObject
properties:
name:
type: string
Executing oapi-codegen -package openapi_test -generate types -o openapi.gen.go openapi.yaml results in an empty file:
//
// Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT.
package openapi_test
What I would expect instead, is:
//
// Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT.
package openapi_test
// SomeType defines parameters for ExampleGet.
type SomeType struct {
Name *string `json:"name,omitempty"`
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels