diff --git a/docs/swagger/swagger.yaml b/docs/swagger/swagger.yaml index 23d733e9..7bbea625 100644 --- a/docs/swagger/swagger.yaml +++ b/docs/swagger/swagger.yaml @@ -674,6 +674,8 @@ components: example: 1 question_id: type: integer + description: | + 質問を追加する場合はnull。 example: 1 created_at: type: string @@ -681,22 +683,18 @@ components: example: 2020-01-01T00:00:00+09:00 required: - questionnaire_id - - question_id - created_at QuestionBase: type: object properties: - title: - type: string - description: + body: type: string is_required: type: boolean description: | 回答必須かどうか required: - - title - - description + - body - is_required QuestionSettingsByType: oneOf: diff --git a/openapi/spec.go b/openapi/spec.go index 7351397d..88e3e723 100644 --- a/openapi/spec.go +++ b/openapi/spec.go @@ -17,75 +17,74 @@ import ( // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+xcb3PTSJP/Ki7dvYA6BZvAU/Wc3wWy9VSqlueAhLsXJOVS7EmifWzJSDLgo1KVkfkT", - "iIFUgGRD2ISwWQhkSdiF47L8/S43kWO/uq9wNaN/I2lkSY4Nu1tXRVGxND3T0/2b7p6eHl3h8nKpLEtA", - "0lQue4UrC4pQAhpQyC9ZKlYHCiVRElVNETRQOFE9BYakMxWgVPH7AlDziljWRFnislzzxgtj9jqC9f3t", - "9f35682ZawhuIfgCwR8RfIrgVfL3VaTrCG6Tf5+Nu4vGp6XUIU2pgMN8KpRQn7OodN2Y30I6JM+XEfwN", - "wad2JxNCUQWH0YyOajdQ7QHSn6PaFqrNIrhDXqEZfVTieE7EzF4gc+A5SSgBLsueKcdzan4KlAQ8V61a", - "xg3HZbkIBImbnuYJ0anqWaCWZUmNlsu2sbK6//I+c+a+NnvvfzI2Fns6W5fxONMcEZRJoInSZBz9I/0z", - "qn1A+q+oViMchSiTJYi4tL0UDTXZKNmUhclwgex9fIBqD8l0dvdXthGcSx1qPHphbD/c//Qc6/rxG2Me", - "c3WUbnY4hDM8FIsdUdLAJFAIOxcqQMWDS4KogKHBIem0oE0FGUP6E1R7j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GivupubL43th7221J2jLmDHo01tD2HXY8PLRNxBLHDv", - "7O2Xh2WP7adHqjEjVePaplWhZhZhsayk92aCW9R61inWwPJ9/q6xeMN4uWTMLlkV3faWK46hdc8PugT2", - "6PwQ6/tbMdNKwW/q9dSmU3WWfwoD7mCtSxa7fYbHGS2Y2AnOwrlXtP/yvnF3p1n7SLjw3M9owTvGnffU", - "5xLr9rbSzGbEzhpR3zf8PRt4T8HRl01AeccNA75fwRHJJqd9L3NMB1o1x/v7Iy4mwLp7EwGuIR16LyPE", - "jvIdCB8wx+UggETxUX7I+Ziop0ba+fho4iOPU9XO/QfTDRzUmic6ng455Q4WGyW3/Y5M2x0dMBHC+CYs", - "Qy0x0OJUU/uBcsX9dGbbFKgbmXgznyFpz46NauBboAmTnQE+PcqIa1wccdtWhm1cjsWQE96kNDafm+bC", - "vn5IZXxiWykXA471Ibdt6wHrE2bPmMmNOPaMIc22hs1VYscoDcnytgmQWSap9zD8gg42aWRJaYEVT7YD", - "b2vx1+bTZ52DNwKJ3Y9HPcgJSR642ImXDOg2eLofEyYLCOOZTdZO/0uaTSptGoa8P4TN/HKmkq5rIvD0", - "VDSdN0uN7HqiMYxFFSgXbSx72SkrcqGSt76M6S35sap16OIiRpVuUc4LRQ9tNp0mD6dkVcv+NfPXjEk5", - "5szlCvMz4qRv3+e9uemx6f8LAAD//68dSQSLYAAA", + "H4sIAAAAAAAC/+xc628TyZb/V6ze/QDaDjaBK931t0BGV5GGu0Bg9wOJrI5dSXqu3W2624AXRUq1eQRi", + "SMQjTAhDCJOBAEPCDCyb4fm/bKUd+9P+C6uqflV3V78cG2ZGKyEUd9epOnXOr845depUX+SKcqUqS0DS", + "VC5/kasKilABGlDIL1kq14dKFVESVU0RNFA6Uj8GRqQTNaDU8fsSUIuKWNVEWeLyXPvqc2PuCoLN3c21", + "3cUr7dnLCL5A8DmCPyL4BMFL5O9LSNcR3CT/PhsLS8ane5l9mlID+/lMKKE+b1HpurH4AumQPF9G8DcE", + "n9idTA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B6Bvxne7yqy", + "F3231WdMXspAA0m4Mq5d7yyvR8JzmHTmB2g6N8C+oh9mNhPjwebej4dQ/Qat4Mgw1uqlNVJ98zSNSuGm", + "PXyzK2XybB8fHMZCYVceu8+a+ip2IczF7VXrh3OHExWluUejlr774eiivZCgFafTQWf9WmvlTSR0vimJ", + "fcRO791ZKGziPFpKG2NJ7ovYmDR89NZtZCt1s9JxVBO0WvgWpMtixq6M1zEvS380U+avHf2T2DSvutsb", + "L43N+/22bN2jrgu710fY9dkKMhG3F3PYL+P3NWDZZ/vpkWrCyM64vGFVdJlFSywr6a3kd4tATzrFDVi+", + "z961lq4aL+/hHb1ZAW1vUZIYWjff3iOwx+dTWF+qSpiGCX59rq82napL/FMYcAdrPbLY0RkRZ7RgIiQ4", + "C+cezu7LO8bCVrvxkXDhuc/QgTeNm++pDws27W2YuftPnGWhvgT4ezbwngKdL5uw8Y4bBny/gmOSM077", + "fuZk9rRqDg8OxhTyw6ZbuQ9XkQ69xftxK9AvO9jcY07IQQCJ4uP8kPPZTU9NsfOZztRHBMfq3fsPphvY", + "qzVPdZwbciocLM5Jb/sdmUal2pkIYXw9laGWBGhxqo/9QLnofmQyMmXoRibeTGFImrBroxr4ambK5GCA", + "T48ykhoXR9y2lWEbl0MJ5IQ3Ka2NZ6a5sK/r2bqyzd3hRFGiw5Rtfcjt1GbA+oTZs9xfurRnDGlGGjZX", + "iV2jNCQrGhEgs0xS/2H4BR1s2siS0gIrnowCb2fp1/aTp92DNwaJvY9HPcgJSR642EmWDOg1eHofE6YL", + "CJOZTdZO/0uaTWv8KOT9IWzmlzOVdB0QgaenAuiMWZpj19+MYyyqQDlnY9nLTlWRS7Ui+eEvkbGqW+hi", + "HEZVa1kuCmUPbT6bJQ+nZVXL/zX315xJOe7M5SLzg9ukb9+HsLmZ8Zn/CwAA///nbjGLtV8AAA==", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/openapi/types.go b/openapi/types.go index ab4f9a46..f033c075 100644 --- a/openapi/types.go +++ b/openapi/types.go @@ -137,11 +137,10 @@ type Groups = []string // NewQuestion defines model for NewQuestion. type NewQuestion struct { - Description string `json:"description"` + Body string `json:"body"` // IsRequired 回答必須かどうか - IsRequired bool `json:"is_required"` - Title string `json:"title"` + IsRequired bool `json:"is_required"` union json.RawMessage } @@ -177,24 +176,24 @@ type NewResponse struct { // Question defines model for Question. type Question struct { - CreatedAt time.Time `json:"created_at"` - Description string `json:"description"` + Body string `json:"body"` + CreatedAt time.Time `json:"created_at"` // IsRequired 回答必須かどうか - IsRequired bool `json:"is_required"` - QuestionId int `json:"question_id"` - QuestionnaireId int `json:"questionnaire_id"` - Title string `json:"title"` + IsRequired bool `json:"is_required"` + + // QuestionId 質問を追加する場合はnull。 + QuestionId *int `json:"question_id,omitempty"` + QuestionnaireId int `json:"questionnaire_id"` union json.RawMessage } // QuestionBase defines model for QuestionBase. type QuestionBase struct { - Description string `json:"description"` + Body string `json:"body"` // IsRequired 回答必須かどうか - IsRequired bool `json:"is_required"` - Title string `json:"title"` + IsRequired bool `json:"is_required"` } // QuestionSettingsByType defines model for QuestionSettingsByType. @@ -862,9 +861,9 @@ func (t NewQuestion) MarshalJSON() ([]byte, error) { } } - object["description"], err = json.Marshal(t.Description) + object["body"], err = json.Marshal(t.Body) if err != nil { - return nil, fmt.Errorf("error marshaling 'description': %w", err) + return nil, fmt.Errorf("error marshaling 'body': %w", err) } object["is_required"], err = json.Marshal(t.IsRequired) @@ -872,11 +871,6 @@ func (t NewQuestion) MarshalJSON() ([]byte, error) { return nil, fmt.Errorf("error marshaling 'is_required': %w", err) } - object["title"], err = json.Marshal(t.Title) - if err != nil { - return nil, fmt.Errorf("error marshaling 'title': %w", err) - } - b, err = json.Marshal(object) return b, err } @@ -892,10 +886,10 @@ func (t *NewQuestion) UnmarshalJSON(b []byte) error { return err } - if raw, found := object["description"]; found { - err = json.Unmarshal(raw, &t.Description) + if raw, found := object["body"]; found { + err = json.Unmarshal(raw, &t.Body) if err != nil { - return fmt.Errorf("error reading 'description': %w", err) + return fmt.Errorf("error reading 'body': %w", err) } } @@ -906,13 +900,6 @@ func (t *NewQuestion) UnmarshalJSON(b []byte) error { } } - if raw, found := object["title"]; found { - err = json.Unmarshal(raw, &t.Title) - if err != nil { - return fmt.Errorf("error reading 'title': %w", err) - } - } - return err } @@ -1085,14 +1072,14 @@ func (t Question) MarshalJSON() ([]byte, error) { } } - object["created_at"], err = json.Marshal(t.CreatedAt) + object["body"], err = json.Marshal(t.Body) if err != nil { - return nil, fmt.Errorf("error marshaling 'created_at': %w", err) + return nil, fmt.Errorf("error marshaling 'body': %w", err) } - object["description"], err = json.Marshal(t.Description) + object["created_at"], err = json.Marshal(t.CreatedAt) if err != nil { - return nil, fmt.Errorf("error marshaling 'description': %w", err) + return nil, fmt.Errorf("error marshaling 'created_at': %w", err) } object["is_required"], err = json.Marshal(t.IsRequired) @@ -1100,9 +1087,11 @@ func (t Question) MarshalJSON() ([]byte, error) { return nil, fmt.Errorf("error marshaling 'is_required': %w", err) } - object["question_id"], err = json.Marshal(t.QuestionId) - if err != nil { - return nil, fmt.Errorf("error marshaling 'question_id': %w", err) + if t.QuestionId != nil { + object["question_id"], err = json.Marshal(t.QuestionId) + if err != nil { + return nil, fmt.Errorf("error marshaling 'question_id': %w", err) + } } object["questionnaire_id"], err = json.Marshal(t.QuestionnaireId) @@ -1110,11 +1099,6 @@ func (t Question) MarshalJSON() ([]byte, error) { return nil, fmt.Errorf("error marshaling 'questionnaire_id': %w", err) } - object["title"], err = json.Marshal(t.Title) - if err != nil { - return nil, fmt.Errorf("error marshaling 'title': %w", err) - } - b, err = json.Marshal(object) return b, err } @@ -1130,17 +1114,17 @@ func (t *Question) UnmarshalJSON(b []byte) error { return err } - if raw, found := object["created_at"]; found { - err = json.Unmarshal(raw, &t.CreatedAt) + if raw, found := object["body"]; found { + err = json.Unmarshal(raw, &t.Body) if err != nil { - return fmt.Errorf("error reading 'created_at': %w", err) + return fmt.Errorf("error reading 'body': %w", err) } } - if raw, found := object["description"]; found { - err = json.Unmarshal(raw, &t.Description) + if raw, found := object["created_at"]; found { + err = json.Unmarshal(raw, &t.CreatedAt) if err != nil { - return fmt.Errorf("error reading 'description': %w", err) + return fmt.Errorf("error reading 'created_at': %w", err) } } @@ -1165,13 +1149,6 @@ func (t *Question) UnmarshalJSON(b []byte) error { } } - if raw, found := object["title"]; found { - err = json.Unmarshal(raw, &t.Title) - if err != nil { - return fmt.Errorf("error reading 'title': %w", err) - } - } - return err }