diff --git a/controller/questionnaire.go b/controller/questionnaire.go index f1d4c2bd..3c583503 100644 --- a/controller/questionnaire.go +++ b/controller/questionnaire.go @@ -427,14 +427,7 @@ func (q Questionnaire) GetQuestionnaireResult(ctx echo.Context, questionnaireID } for _, response := range responses { - tmp := struct { - Body []openapi.ResponseBody `json:"body"` - IsDraft bool `json:"is_draft"` - ModifiedAt time.Time `json:"modified_at"` - QuestionnaireId int `json:"questionnaire_id"` - ResponseId int `json:"response_id"` - SubmittedAt time.Time `json:"submitted_at"` - }{ + tmp := openapi.ResultItem{ Body: response.Body, IsDraft: response.IsDraft, ModifiedAt: response.ModifiedAt, diff --git a/controller/response.go b/controller/response.go index a7bd6927..4d21be47 100644 --- a/controller/response.go +++ b/controller/response.go @@ -53,13 +53,7 @@ func (r Response) GetMyResponses(ctx echo.Context, params openapi.GetMyResponses return openapi.ResponsesWithQuestionnaireInfo{}, echo.NewHTTPError(http.StatusInternalServerError, fmt.Errorf("failed to get target info: %w", err)) } - questionnaireInfo := struct { - CreatedAt time.Time `json:"created_at"` - IsTargetingMe bool `json:"is_targeting_me"` - ModifiedAt time.Time `json:"modified_at"` - ResponseDueDateTime *time.Time `json:"response_due_date_time,omitempty"` - Title string `json:"title"` - }{ + questionnaireInfo := openapi.QuestionnaireInfo{ CreatedAt: questionnaire.CreatedAt, IsTargetingMe: isTargetingMe, ModifiedAt: questionnaire.ModifiedAt, @@ -73,22 +67,7 @@ func (r Response) GetMyResponses(ctx echo.Context, params openapi.GetMyResponses return openapi.ResponsesWithQuestionnaireInfo{}, echo.NewHTTPError(http.StatusInternalServerError, fmt.Errorf("failed to convert respondent detail into response: %w", err)) } - tmp := struct { - Body []openapi.ResponseBody `json:"body"` - IsDraft bool `json:"is_draft"` - ModifiedAt time.Time `json:"modified_at"` - QuestionnaireId int `json:"questionnaire_id"` - QuestionnaireInfo *struct { - CreatedAt time.Time `json:"created_at"` - IsTargetingMe bool `json:"is_targeting_me"` - ModifiedAt time.Time `json:"modified_at"` - ResponseDueDateTime *time.Time `json:"response_due_date_time,omitempty"` - Title string `json:"title"` - } `json:"questionnaire_info,omitempty"` - Respondent openapi.TraqId `json:"respondent"` - ResponseId int `json:"response_id"` - SubmittedAt time.Time `json:"submitted_at"` - }{ + tmp := openapi.ResponseWithQuestionnaireInfoItem{ Body: response.Body, IsDraft: response.IsDraft, ModifiedAt: response.ModifiedAt, diff --git a/docs/swagger/swagger.yaml b/docs/swagger/swagger.yaml index 443cccb1..fe99b014 100644 --- a/docs/swagger/swagger.yaml +++ b/docs/swagger/swagger.yaml @@ -883,6 +883,14 @@ components: type: array items: $ref: "#/components/schemas/ResponseWithQuestionnaireInfoItem" + QuestionnaireInfo: + type: object + allOf: + - $ref: "#/components/schemas/QuestionnaireTitle" + - $ref: "#/components/schemas/QuestionnaireResponseDueDateTime" + - $ref: "#/components/schemas/QuestionnaireCreatedAt" + - $ref: "#/components/schemas/QuestionnaireModifiedAt" + - $ref: "#/components/schemas/QuestionnaireIsTargetingMe" ResponseWithQuestionnaireInfoItem: type: object allOf: @@ -890,12 +898,7 @@ components: - type: object properties: questionnaire_info: - allOf: - - $ref: "#/components/schemas/QuestionnaireTitle" - - $ref: "#/components/schemas/QuestionnaireResponseDueDateTime" - - $ref: "#/components/schemas/QuestionnaireCreatedAt" - - $ref: "#/components/schemas/QuestionnaireModifiedAt" - - $ref: "#/components/schemas/QuestionnaireIsTargetingMe" + $ref: "#/components/schemas/QuestionnaireInfo" ResponseBody: oneOf: - $ref: "#/components/schemas/ResponseBodyText" diff --git a/go.mod b/go.mod index ee1468c6..1ff36d4d 100644 --- a/go.mod +++ b/go.mod @@ -10,14 +10,14 @@ require ( github.com/labstack/echo/v4 v4.12.0 github.com/mattn/go-isatty v0.0.20 // indirect github.com/stretchr/testify v1.9.0 - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/oauth2 v0.10.0 - golang.org/x/sync v0.3.0 - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.12.0 // indirect + golang.org/x/sync v0.7.0 + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + golang.org/x/tools v0.21.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -72,20 +72,21 @@ require ( require ( github.com/deckarep/golang-set/v2 v2.6.0 // indirect + github.com/oapi-codegen/oapi-codegen/v2 v2.3.0 // indirect github.com/traPtitech/go-traq v0.0.0-20240420012203-0152d96098b0 // indirect ) require ( - github.com/getkin/kin-openapi v0.118.0 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/gorilla/mux v1.8.0 // indirect + github.com/getkin/kin-openapi v0.124.0 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/swag v0.22.8 // indirect + github.com/gorilla/mux v1.8.1 // indirect github.com/invopop/yaml v0.2.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/oapi-codegen/echo-middleware v1.0.1 - github.com/perimeterx/marshmallow v1.1.4 // indirect + github.com/perimeterx/marshmallow v1.1.5 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index 26e92dc0..2c369dc4 100644 --- a/go.sum +++ b/go.sum @@ -93,6 +93,8 @@ github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= +github.com/getkin/kin-openapi v0.124.0 h1:VSFNMB9C9rTKBnQ/fpyDU8ytMTr4dWI9QovSKj9kz/M= +github.com/getkin/kin-openapi v0.124.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -109,11 +111,15 @@ github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUe github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.8 h1:/9RjDSQ0vbFR+NyjGMkFTsA1IA0fmhKSThmfGZjicbw= +github.com/go-openapi/swag v0.22.8/go.mod h1:6QT22icPLEqAM/z/TChgb4WAveCHF92+2gF0CNjHpPI= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= @@ -211,6 +217,8 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -316,6 +324,8 @@ github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oapi-codegen/echo-middleware v1.0.1 h1:edYGScq1phCcuDoz9AqA9eHX+tEI1LNL5PL1lkkQh1k= github.com/oapi-codegen/echo-middleware v1.0.1/go.mod h1:DBQKRn+D/vfXOFbaX5GRwFttoJY64JH6yu+pdt7wU3o= +github.com/oapi-codegen/oapi-codegen/v2 v2.3.0 h1:rICjNsHbPP1LttefanBPnwsSwl09SqhCO7Ee623qR84= +github.com/oapi-codegen/oapi-codegen/v2 v2.3.0/go.mod h1:4k+cJeSq5ntkwlcpQSxLxICCxQzCL772o30PxdibRt4= github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -329,6 +339,8 @@ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYr github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= github.com/perimeterx/marshmallow v1.1.4 h1:pZLDH9RjlLGGorbXhcaQLhfuV0pFMNfPO55FuFkxqLw= github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= +github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -439,6 +451,8 @@ golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -479,6 +493,8 @@ golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -530,6 +546,8 @@ golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -556,6 +574,7 @@ golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -625,6 +644,8 @@ golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -646,6 +667,8 @@ golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -704,6 +727,8 @@ golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/openapi/server.go b/openapi/server.go index 5bc86917..177c413d 100644 --- a/openapi/server.go +++ b/openapi/server.go @@ -1,6 +1,6 @@ // Package openapi provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package openapi import ( @@ -127,7 +127,7 @@ func (w *ServerInterfaceWrapper) DeleteQuestionnaire(ctx echo.Context) error { // ------------- Path parameter "questionnaireID" ------------- var questionnaireID QuestionnaireIDInPath - err = runtime.BindStyledParameterWithLocation("simple", false, "questionnaireID", runtime.ParamLocationPath, ctx.Param("questionnaireID"), &questionnaireID) + err = runtime.BindStyledParameterWithOptions("simple", "questionnaireID", ctx.Param("questionnaireID"), &questionnaireID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter questionnaireID: %s", err)) } @@ -145,7 +145,7 @@ func (w *ServerInterfaceWrapper) GetQuestionnaire(ctx echo.Context) error { // ------------- Path parameter "questionnaireID" ------------- var questionnaireID QuestionnaireIDInPath - err = runtime.BindStyledParameterWithLocation("simple", false, "questionnaireID", runtime.ParamLocationPath, ctx.Param("questionnaireID"), &questionnaireID) + err = runtime.BindStyledParameterWithOptions("simple", "questionnaireID", ctx.Param("questionnaireID"), &questionnaireID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter questionnaireID: %s", err)) } @@ -163,7 +163,7 @@ func (w *ServerInterfaceWrapper) EditQuestionnaire(ctx echo.Context) error { // ------------- Path parameter "questionnaireID" ------------- var questionnaireID QuestionnaireIDInPath - err = runtime.BindStyledParameterWithLocation("simple", false, "questionnaireID", runtime.ParamLocationPath, ctx.Param("questionnaireID"), &questionnaireID) + err = runtime.BindStyledParameterWithOptions("simple", "questionnaireID", ctx.Param("questionnaireID"), &questionnaireID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter questionnaireID: %s", err)) } @@ -181,7 +181,7 @@ func (w *ServerInterfaceWrapper) GetQuestionnaireMyRemindStatus(ctx echo.Context // ------------- Path parameter "questionnaireID" ------------- var questionnaireID QuestionnaireIDInPath - err = runtime.BindStyledParameterWithLocation("simple", false, "questionnaireID", runtime.ParamLocationPath, ctx.Param("questionnaireID"), &questionnaireID) + err = runtime.BindStyledParameterWithOptions("simple", "questionnaireID", ctx.Param("questionnaireID"), &questionnaireID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter questionnaireID: %s", err)) } @@ -199,7 +199,7 @@ func (w *ServerInterfaceWrapper) EditQuestionnaireMyRemindStatus(ctx echo.Contex // ------------- Path parameter "questionnaireID" ------------- var questionnaireID QuestionnaireIDInPath - err = runtime.BindStyledParameterWithLocation("simple", false, "questionnaireID", runtime.ParamLocationPath, ctx.Param("questionnaireID"), &questionnaireID) + err = runtime.BindStyledParameterWithOptions("simple", "questionnaireID", ctx.Param("questionnaireID"), &questionnaireID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter questionnaireID: %s", err)) } @@ -217,7 +217,7 @@ func (w *ServerInterfaceWrapper) GetQuestionnaireResponses(ctx echo.Context) err // ------------- Path parameter "questionnaireID" ------------- var questionnaireID QuestionnaireIDInPath - err = runtime.BindStyledParameterWithLocation("simple", false, "questionnaireID", runtime.ParamLocationPath, ctx.Param("questionnaireID"), &questionnaireID) + err = runtime.BindStyledParameterWithOptions("simple", "questionnaireID", ctx.Param("questionnaireID"), &questionnaireID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter questionnaireID: %s", err)) } @@ -251,7 +251,7 @@ func (w *ServerInterfaceWrapper) PostQuestionnaireResponse(ctx echo.Context) err // ------------- Path parameter "questionnaireID" ------------- var questionnaireID QuestionnaireIDInPath - err = runtime.BindStyledParameterWithLocation("simple", false, "questionnaireID", runtime.ParamLocationPath, ctx.Param("questionnaireID"), &questionnaireID) + err = runtime.BindStyledParameterWithOptions("simple", "questionnaireID", ctx.Param("questionnaireID"), &questionnaireID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter questionnaireID: %s", err)) } @@ -269,7 +269,7 @@ func (w *ServerInterfaceWrapper) GetQuestionnaireResult(ctx echo.Context) error // ------------- Path parameter "questionnaireID" ------------- var questionnaireID QuestionnaireIDInPath - err = runtime.BindStyledParameterWithLocation("simple", false, "questionnaireID", runtime.ParamLocationPath, ctx.Param("questionnaireID"), &questionnaireID) + err = runtime.BindStyledParameterWithOptions("simple", "questionnaireID", ctx.Param("questionnaireID"), &questionnaireID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter questionnaireID: %s", err)) } @@ -307,7 +307,7 @@ func (w *ServerInterfaceWrapper) DeleteResponse(ctx echo.Context) error { // ------------- Path parameter "responseID" ------------- var responseID ResponseIDInPath - err = runtime.BindStyledParameterWithLocation("simple", false, "responseID", runtime.ParamLocationPath, ctx.Param("responseID"), &responseID) + err = runtime.BindStyledParameterWithOptions("simple", "responseID", ctx.Param("responseID"), &responseID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter responseID: %s", err)) } @@ -325,7 +325,7 @@ func (w *ServerInterfaceWrapper) GetResponse(ctx echo.Context) error { // ------------- Path parameter "responseID" ------------- var responseID ResponseIDInPath - err = runtime.BindStyledParameterWithLocation("simple", false, "responseID", runtime.ParamLocationPath, ctx.Param("responseID"), &responseID) + err = runtime.BindStyledParameterWithOptions("simple", "responseID", ctx.Param("responseID"), &responseID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter responseID: %s", err)) } @@ -343,7 +343,7 @@ func (w *ServerInterfaceWrapper) EditResponse(ctx echo.Context) error { // ------------- Path parameter "responseID" ------------- var responseID ResponseIDInPath - err = runtime.BindStyledParameterWithLocation("simple", false, "responseID", runtime.ParamLocationPath, ctx.Param("responseID"), &responseID) + err = runtime.BindStyledParameterWithOptions("simple", "responseID", ctx.Param("responseID"), &responseID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter responseID: %s", err)) } diff --git a/openapi/spec.go b/openapi/spec.go index 482a476c..6b165df9 100644 --- a/openapi/spec.go +++ b/openapi/spec.go @@ -1,6 +1,6 @@ // Package openapi provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package openapi import ( @@ -18,75 +18,76 @@ import ( // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+w8a28TyZZ/xerdD6DtYBPmSnf9LUxGV5GGuzAJux9IZHXsStJz7W7T3Qa8KFKqDSEQ", - "AxGPMCFcQpgMBDI4zIVlMzz/y1basT/tX7iq6ldVP9zdjh3g6koIxd11qs77VJ1zqi9yeblUliUgaSqX", - "vciVBUUoAQ0o5JcsFatDhZIoiaqmCBooHK+eACPSqQpQqvh9Aah5RSxroixxWa515bmxMI9gfa+xvrc0", - "35q7jOAWgs8R/BnBJwheIn9fQrqOYIP8+2TcXDY+3ksd0pQKOMynQgH1RQtK142lLaRD8nwFwd8RfGJP", - "MiUUVXAYzemodgXV7iL9GaptodoCgtvkFZrTxyWO50SM7FlCA89JQglw2WBKOZ5T8zOgJGBatWoZD5yU", - "5SIQJG52lidAJ6o/ALUsS2o0XxrG6sO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3jw49Wjdyc7seCuau1U/gUCmZ57huT/87o", + "q102Hv2GYMP48Nh4fxPB+t7dl+Ss8prZF+7oD0EdeXnRb4Wzv4r02+QrnofZ4zF/j6OnvseMNNZa6/Xm", + "it5evo1g/ZiKJ/fmMmYartmFEPruzjsEt5ovfm49udla39y7+RHBunFjzVh9RGZPsuTTqq/qiwStsqwG", + "2KVzkdU/M/NybUcrOymrrJlZd76BqtkJup4AyXfnc5aNPJpSAbM+IB/tD5CtgspOUA4Xphfc9nOzPmjN", + "T/glQdw3CQ/EO+BvlveGivRFz7sKZk1eikADcbgyrl5rr2x0hOcw6cwL0GRhIPgFDWFuMzYebO69eAjV", + "r98LjgxjrV5aJ1VXT5OoFDbs4etdKZMPjvH+YSwUdhWx+6ypz+IXwkLcfrX+TeabWMWI7pG4pe9+BLrO", + "UUjQ8jPJoLNxtbn6uiN0viuIfcRO78NZKGyiIlpCH2NJ7kB8TBI+ehs20qWqWeE6qglaJXwL0mURa1fO", + "6wTL0tfmyrw1w/8gPo1Vd2vzhdG432/P1j3quvB7fYRdn71gIOL24w775fw+Byz77D8ZqcZc2RmXN61K", + "PrNYLchLBkiFudPRcCr8gw0vhp91j2J6hPXodErQa8piZmH8rx7sq0unylE/i/8+FstQWEiQPTD0gYoB", + "Rn/M0BmzR+Ggc7rFGc2fZfHPwrnctffijnFzu1X7QLhgLsm04Q3jxjvqnZV1e49nphZip3Col0x+ydGD", + "Ob862GwQO26YWXkVHJH5cdr3M+GzL6v5ZnAw4nYIrLvXQWg79ptv5y2EA+E+J5ywL7fOv+OGPVtL7dV5", + "cuUJ8+HU1vpDoNmeFKTbO1q4bSxtWde94X00B6N8IrnsZt4G03WfT1qJGSbxPL+CbYjF6RcTsBzdtpf/", + "1nry1FzBNzefmXC37zBSK5YDycZQ9dy9iFbYVhyNku101ILQefsxc6nDCeKJz+pOVLtfyQUuyPaL0UQ1", + "NyGlO/4KyuSgdmTa6cwrEDMBL7EOUEsMtDjXP7xAuei+67dj7t5dzbEp+5B8fdcLEN/LixNm6X18MsqI", + "G4gdcdv+PjgQH4shp575GhcDTqQmrweo+yJ1WOzP/KHL2B8gzY6uzlVi1ygNOZ7osFMNckn9h+EBLkaT", + "hkxKCzEDpbsy2megjEBi7/duDHJCsnguduJl5XoNnt7vn5JtnuK5zaCU20G6TWv8Tsj7KnzmwblKuiCP", + "wJMpxTtj1sjZhXATGIsqUM7ZWGbZKStyoZK3XuXL1qpZZWZ0VVzA1YOinBeKDG02nSYPZ2RVy/4x88eM", + "STnhzOVi4P97QPr2/H8E3OzE7N8DAAD//wbUgE48ZQAA", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/openapi/types.go b/openapi/types.go index 4905ca5b..b0ca79bc 100644 --- a/openapi/types.go +++ b/openapi/types.go @@ -1,6 +1,6 @@ // Package openapi provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package openapi import ( @@ -376,6 +376,19 @@ type QuestionnaireID struct { QuestionnaireId int `json:"questionnaire_id"` } +// QuestionnaireInfo defines model for QuestionnaireInfo. +type QuestionnaireInfo struct { + CreatedAt time.Time `json:"created_at"` + + // IsTargetingMe 自分がターゲットになっているかどうか + IsTargetingMe bool `json:"is_targeting_me"` + ModifiedAt time.Time `json:"modified_at"` + + // ResponseDueDateTime 回答期限。この日時を過ぎたら回答できなくなる。nullの場合は回答期限なし。 + ResponseDueDateTime *time.Time `json:"response_due_date_time,omitempty"` + Title string `json:"title"` +} + // QuestionnaireIsAllowingMultipleResponses defines model for QuestionnaireIsAllowingMultipleResponses. type QuestionnaireIsAllowingMultipleResponses struct { // IsAllowingMultipleResponses 一人が複数回回答できるかどうか @@ -570,26 +583,13 @@ type ResponseBodyTextLongQuestionType string // ResponseSortType response用のsortの種類 type ResponseSortType string -// Responses defines model for Responses. -type Responses = []Response - -// ResponsesWithQuestionnaireInfo defines model for ResponsesWithQuestionnaireInfo. -type ResponsesWithQuestionnaireInfo = []struct { - Body []ResponseBody `json:"body"` - IsDraft bool `json:"is_draft"` - ModifiedAt time.Time `json:"modified_at"` - QuestionnaireId int `json:"questionnaire_id"` - QuestionnaireInfo *struct { - CreatedAt time.Time `json:"created_at"` - - // IsTargetingMe 自分がターゲットになっているかどうか - IsTargetingMe bool `json:"is_targeting_me"` - ModifiedAt time.Time `json:"modified_at"` - - // ResponseDueDateTime 回答期限。この日時を過ぎたら回答できなくなる。nullの場合は回答期限なし。 - ResponseDueDateTime *time.Time `json:"response_due_date_time,omitempty"` - Title string `json:"title"` - } `json:"questionnaire_info,omitempty"` +// ResponseWithQuestionnaireInfoItem defines model for ResponseWithQuestionnaireInfoItem. +type ResponseWithQuestionnaireInfoItem struct { + Body []ResponseBody `json:"body"` + IsDraft bool `json:"is_draft"` + ModifiedAt time.Time `json:"modified_at"` + QuestionnaireId int `json:"questionnaire_id"` + QuestionnaireInfo *QuestionnaireInfo `json:"questionnaire_info,omitempty"` // Respondent traQ ID Respondent TraqId `json:"respondent"` @@ -597,8 +597,17 @@ type ResponsesWithQuestionnaireInfo = []struct { SubmittedAt time.Time `json:"submitted_at"` } +// Responses defines model for Responses. +type Responses = []Response + +// ResponsesWithQuestionnaireInfo defines model for ResponsesWithQuestionnaireInfo. +type ResponsesWithQuestionnaireInfo = []ResponseWithQuestionnaireInfoItem + // Result defines model for Result. -type Result = []struct { +type Result = []ResultItem + +// ResultItem defines model for ResultItem. +type ResultItem struct { Body []ResponseBody `json:"body"` IsDraft bool `json:"is_draft"` ModifiedAt time.Time `json:"modified_at"` @@ -718,7 +727,7 @@ func (t *NewQuestion) MergeQuestionSettingsText(v QuestionSettingsText) error { return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -744,7 +753,7 @@ func (t *NewQuestion) MergeQuestionSettingsTextLong(v QuestionSettingsTextLong) return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -770,7 +779,7 @@ func (t *NewQuestion) MergeQuestionSettingsNumber(v QuestionSettingsNumber) erro return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -796,7 +805,7 @@ func (t *NewQuestion) MergeQuestionSettingsSingleChoice(v QuestionSettingsSingle return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -822,7 +831,7 @@ func (t *NewQuestion) MergeQuestionSettingsMultipleChoice(v QuestionSettingsMult return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -848,7 +857,7 @@ func (t *NewQuestion) MergeQuestionSettingsScale(v QuestionSettingsScale) error return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -953,7 +962,7 @@ func (t *Question) MergeQuestionSettingsText(v QuestionSettingsText) error { return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -979,7 +988,7 @@ func (t *Question) MergeQuestionSettingsTextLong(v QuestionSettingsTextLong) err return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1005,7 +1014,7 @@ func (t *Question) MergeQuestionSettingsNumber(v QuestionSettingsNumber) error { return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1031,7 +1040,7 @@ func (t *Question) MergeQuestionSettingsSingleChoice(v QuestionSettingsSingleCho return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1057,7 +1066,7 @@ func (t *Question) MergeQuestionSettingsMultipleChoice(v QuestionSettingsMultipl return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1083,7 +1092,7 @@ func (t *Question) MergeQuestionSettingsScale(v QuestionSettingsScale) error { return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1212,7 +1221,7 @@ func (t *QuestionSettingsByType) MergeQuestionSettingsText(v QuestionSettingsTex return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1238,7 +1247,7 @@ func (t *QuestionSettingsByType) MergeQuestionSettingsTextLong(v QuestionSetting return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1264,7 +1273,7 @@ func (t *QuestionSettingsByType) MergeQuestionSettingsNumber(v QuestionSettingsN return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1290,7 +1299,7 @@ func (t *QuestionSettingsByType) MergeQuestionSettingsSingleChoice(v QuestionSet return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1316,7 +1325,7 @@ func (t *QuestionSettingsByType) MergeQuestionSettingsMultipleChoice(v QuestionS return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1342,7 +1351,7 @@ func (t *QuestionSettingsByType) MergeQuestionSettingsScale(v QuestionSettingsSc return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1378,7 +1387,7 @@ func (t *ResponseBody) MergeResponseBodyText(v ResponseBodyText) error { return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1404,7 +1413,7 @@ func (t *ResponseBody) MergeResponseBodyTextLong(v ResponseBodyTextLong) error { return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1430,7 +1439,7 @@ func (t *ResponseBody) MergeResponseBodyNumber(v ResponseBodyNumber) error { return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1456,7 +1465,7 @@ func (t *ResponseBody) MergeResponseBodySingleChoice(v ResponseBodySingleChoice) return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1482,7 +1491,7 @@ func (t *ResponseBody) MergeResponseBodyMultipleChoice(v ResponseBodyMultipleCho return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } @@ -1508,7 +1517,7 @@ func (t *ResponseBody) MergeResponseBodyScale(v ResponseBodyScale) error { return err } - merged, err := runtime.JsonMerge(t.union, b) + merged, err := runtime.JSONMerge(t.union, b) t.union = merged return err } diff --git a/tools.go b/tools.go index a73f8352..005b37f2 100644 --- a/tools.go +++ b/tools.go @@ -6,4 +6,5 @@ package main import ( _ "github.com/golang/mock/mockgen" _ "github.com/google/wire/cmd/wire" + _ "github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen" )