Skip to content

oneOf response struct #1122

@tandem97

Description

@tandem97
 responses:
        '200':
          description: Order result
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/orderResponseAck'
                  - $ref: '#/components/schemas/orderResponseResult'
                  - $ref: '#/components/schemas/orderResponseFull'

genrating into

type PostFapiV1Order200JSONResponse struct {
	union json.RawMessage
}

How should I fill and return this struct in strict server handler? Field union unexported.

Metadata

Metadata

Assignees

No one assigned

    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