| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Kusari Analysis Results:
No pinned version dependency changes, code issues or exposed secrets detected!
Found this helpful? Give it a 👍 or 👎 reaction! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Hi,
There's a fix for this case:
components: schemas: response.Placeholder: x-go-embedding: true type: object allOf: - $ref: "#/components/schemas/Response" - type: object properties: hello: type: string past_7_days_histogram: type: array x-go-type-skip-optional-pointer: true nullable: true items: allOf: - $ref: '#/components/schemas/DateHistogram' DateHistogram: type: object properties: key: type: string key_as_string: type: string nullable: true doc_count: type: integerI would expect it will produce in Go code like that:
type ResponsePlaceholder struct { Hello *string `json:"hello,omitempty"` Past7DaysHistogram []*DateHistogram `json:"past_7_days_histogram"` }The key is - []*DateHistogram.
Currently, it's not possible to declare type: array with an external $ref and a pointer(*). I tried multiple ways and still get []DateHistogram.
This PR should fix that.
Best,