Skip to content

Request and response structs getting redeclared in the Go code #1450

@clintberry

Description

@clintberry

When I generate this manifest all the request and response structs are getting declared twice for some reason. When I check the schema I only see them defined once.

Here is an example:
on line 1604 of the output, there is this struct:

// DeleteBusinessResponse defines model for DeleteBusinessResponse.
type DeleteBusinessResponse struct {
	// Success Success value
	Success bool `json:"success"`
}

But then it is re-declared on line 13872

type DeleteBusinessResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DeleteBusinessResponse
	JSON400      *BadRequestDto
	JSON401      *UnauthorizedDto
	JSON422      *UnprocessableEntityDto
}

Version: v1.16.2
OpenAPI Spec: https://raw.githubusercontent.com/cbnsndwch/ghl-app-template/develop/docs/openapi/ghl-api-v2.merged.yml
Config Yaml:

package: highlevel
generate:
  echo-server: false
  client: true
  models: true
  embedded-spec: false
output: client.go
output-options:
  skip-prune: false
  client-type-name: HLClient

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