FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Generation of anonymous object schemas doesn't seem to work · Issue #626 · oapi-codegen/oapi-codegen · GitHub

Generation of anonymous object schemas doesn't seem to work #626

Description

Given the following OpenAPI:

openapi: '3.1.0'
info:
  title: ''
  version: ''
servers: []
paths:
  "/healthcheck":
    get:
      summary: "Healthcheck endpoint"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  health:
                    type: string
                    enum:
                      - "ok"

We'll get generated the following struct:

type GetHealthcheckResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Health *N200Health `json:"health,omitempty"`
	}
}

However, N200Health isn't defined anywhere 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL