You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexported fields with anyOf in request parameters #2560
// BugReproductionParamsAccept0 defines parameters for BugReproduction.
type BugReproductionParamsAccept0 = bool
// BugReproductionParamsAccept1 defines parameters for BugReproduction.
type BugReproductionParamsAccept1 = string
// The interface specification for the client above.
type ClientInterface interface {
// BugReproduction performs a POST /test/{accept} (the `BugReproduction` operationId) request.
BugReproduction(ctx context.Context, accept struct {
union json.RawMessage
}, reqEditors ...RequestEditorFn) (*http.Response, error)
}
// BugReproduction performs a POST /test/{accept} (the `BugReproduction` operationId) request.
func (c *Client) BugReproduction(ctx context.Context, accept struct {
union json.RawMessage
}, reqEditors ...RequestEditorFn,
) (*http.Response, error) {
req, err := NewBugReproductionRequest(c.Server, accept)
if err != nil {
return nil, err
}
req = req.WithContext(ctx)
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
return c.Client.Do(req)
}
Types BugReproductionParamsAccept0 and BugReproductionParamsAccept1 are defined but not used. BugReproduction has a second argument that is an anonymous struct with an unexported field. If the generated code is in its own package, and thus being imported elsewhere which I would think is a common use case, there is no way to construct it.
Activity
fix: allOf/anyOf/oneOf generation bugs, with an aggregate test matrix (…