add sessionUUID and feedbackUUID to feedback card
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing

This commit is contained in:
2024-04-22 21:56:05 +03:00
parent a5466f6bff
commit 0649f91341
4 changed files with 36 additions and 12 deletions

View File

@@ -110,6 +110,10 @@ definitions:
Feedback:
type: object
properties:
feedback_uuid:
type: string
session_uuid:
type: string
user_id:
type: string
description: to have more context about the user
@@ -119,7 +123,7 @@ definitions:
type:
type: string
enum:
- feature_request
- feature
- feedback
- support
text:

View File

@@ -78,6 +78,8 @@ func feedbacksToAPI(feedbacks []*dmodels.Feedback) []*models.Feedback {
func feedbackToAPI(feedback *dmodels.Feedback) *models.Feedback {
return &models.Feedback{
FeedbackUUID: feedback.UUID,
SessionUUID: feedback.SessionUUID,
ProjectID: feedback.ProjectID,
Text: feedback.Text,
Type: string(feedback.Type),

View File

@@ -24,14 +24,20 @@ type Feedback struct {
// Format: date-time
CreatedAt strfmt.DateTime `json:"created_at,omitempty"`
// feedback uuid
FeedbackUUID string `json:"feedback_uuid,omitempty"`
// to have more context about the project
ProjectID string `json:"project_id,omitempty"`
// session uuid
SessionUUID string `json:"session_uuid,omitempty"`
// text
Text string `json:"text,omitempty"`
// type
// Enum: [feature_request feedback support]
// Enum: [feature feedback support]
Type string `json:"type,omitempty"`
// to have more context about the user
@@ -72,7 +78,7 @@ var feedbackTypeTypePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["feature_request","feedback","support"]`), &res); err != nil {
if err := json.Unmarshal([]byte(`["feature","feedback","support"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
@@ -82,8 +88,8 @@ func init() {
const (
// FeedbackTypeFeatureRequest captures enum value "feature_request"
FeedbackTypeFeatureRequest string = "feature_request"
// FeedbackTypeFeature captures enum value "feature"
FeedbackTypeFeature string = "feature"
// FeedbackTypeFeedback captures enum value "feedback"
FeedbackTypeFeedback string = "feedback"

View File

@@ -177,17 +177,23 @@ func init() {
"type": "string",
"format": "date-time"
},
"feedback_uuid": {
"type": "string"
},
"project_id": {
"description": "to have more context about the project",
"type": "string"
},
"session_uuid": {
"type": "string"
},
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"feature_request",
"feature",
"feedback",
"support"
]
@@ -360,17 +366,23 @@ func init() {
"type": "string",
"format": "date-time"
},
"feedback_uuid": {
"type": "string"
},
"project_id": {
"description": "to have more context about the project",
"type": "string"
},
"session_uuid": {
"type": "string"
},
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"feature_request",
"feature",
"feedback",
"support"
]