Skip to content

Empty schema in response #1328

Description

@ShouheiNishi

When schema in content for response is empty, generated strict server codes are broken.

$
$ cat issue.yaml
openapi: "3.0.1"
paths:
  /test:
    get:
      operationId: test
      responses:
        200:
          description: good
          content:
            application/json:
              schema:
$ go run cmd/oapi-codegen/oapi-codegen.go -generate types,server,strict-server -package issue -o issue.go issue.yaml && go test issue.go
# command-line-arguments
./issue.go:78:7: invalid receiver type Test200JSONResponse (pointer or interface type)
FAIL
$

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions