Skip to content

Checking for the *[] vs []* #158

@ahamansh

Description

@ahamansh

when we try to nest a struct
e.g. :
response{
total,
orderby,
[]data
}

total:
    type: integer
    format: int32  
data:
    type: array
    items:
      $ref: searchcomponent.yml

code genererated is

type SearchResponse struct {
	Data *[]struct {
		// Embedded struct due to allOf(#/components/schemas/CommonParent)
		someparentstruct
		// Embedded fields due to inline allOf schema
		Uri *string `json:"uri,omitempty"`
	} `json:"data,omitempty"`
	Total *int32 `json:"total,omitempty"`
}

above *[]struct should be []*struct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions