// Code generated by go-swagger; DO NOT EDIT. package restapi // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "encoding/json" ) var ( // SwaggerJSON embedded version of the swagger document used at generation time SwaggerJSON json.RawMessage // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time FlatSwaggerJSON json.RawMessage ) func init() { SwaggerJSON = json.RawMessage([]byte(`{ "consumes": [ "application/json" ], "produces": [ "application/json" ], "swagger": "2.0", "info": { "description": "gerald - feedback application server", "title": "gerald", "version": "0.0.1" }, "basePath": "/", "paths": { "/feedback": { "post": { "description": "Create a feedback", "tags": [ "feedback" ], "summary": "Create a feedback", "operationId": "createFeedback", "parameters": [ { "description": "Feedback object that needs to be created", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/Feedback" } }, { "type": "string", "description": "Session UUID", "name": "session_uuid", "in": "query", "required": true } ], "responses": { "200": { "description": "successful operation" }, "403": { "description": "Forbidden" } } } }, "/feedback/{feedback_uuid}/vote": { "post": { "description": "Upvote a feedback", "tags": [ "feedback" ], "summary": "Upvote a feedback", "operationId": "upvoteFeedback", "parameters": [ { "type": "string", "description": "Feedback UUID", "name": "feedback_uuid", "in": "path", "required": true }, { "type": "string", "description": "Session UUID", "name": "session_uuid", "in": "query", "required": true }, { "enum": [ "upvote", "downvote" ], "type": "string", "name": "action", "in": "query", "required": true } ], "responses": { "200": { "description": "successful operation" }, "403": { "description": "Forbidden" } } } }, "/feedbacks": { "get": { "description": "Get all feedbacks", "tags": [ "feedback" ], "summary": "Get all feedbacks", "operationId": "getFeedbacks", "parameters": [ { "type": "string", "description": "Session UUID", "name": "session_uuid", "in": "query", "required": true } ], "responses": { "200": { "description": "successful operation", "schema": { "type": "array", "items": { "$ref": "#/definitions/Feedback" } } }, "403": { "description": "Forbidden" } } } }, "/feedbacks/{project_id}": { "get": { "description": "Get all feedbacks for a project", "tags": [ "feedback" ], "summary": "Get all feedbacks for a project", "operationId": "getFeedbacksForProject", "parameters": [ { "type": "string", "description": "Project id", "name": "project_id", "in": "path", "required": true } ], "responses": { "200": { "description": "successful operation", "schema": { "type": "array", "items": { "$ref": "#/definitions/Feedback" } } }, "403": { "description": "Forbidden" } } } } }, "definitions": { "Feedback": { "type": "object", "properties": { "created_at": { "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", "feedback", "support" ] }, "upvoted": { "type": "boolean" }, "upvotes": { "type": "integer" }, "user_id": { "description": "to have more context about the user", "type": "string" } } } } }`)) FlatSwaggerJSON = json.RawMessage([]byte(`{ "consumes": [ "application/json" ], "produces": [ "application/json" ], "swagger": "2.0", "info": { "description": "gerald - feedback application server", "title": "gerald", "version": "0.0.1" }, "basePath": "/", "paths": { "/feedback": { "post": { "description": "Create a feedback", "tags": [ "feedback" ], "summary": "Create a feedback", "operationId": "createFeedback", "parameters": [ { "description": "Feedback object that needs to be created", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/Feedback" } }, { "type": "string", "description": "Session UUID", "name": "session_uuid", "in": "query", "required": true } ], "responses": { "200": { "description": "successful operation" }, "403": { "description": "Forbidden" } } } }, "/feedback/{feedback_uuid}/vote": { "post": { "description": "Upvote a feedback", "tags": [ "feedback" ], "summary": "Upvote a feedback", "operationId": "upvoteFeedback", "parameters": [ { "type": "string", "description": "Feedback UUID", "name": "feedback_uuid", "in": "path", "required": true }, { "type": "string", "description": "Session UUID", "name": "session_uuid", "in": "query", "required": true }, { "enum": [ "upvote", "downvote" ], "type": "string", "name": "action", "in": "query", "required": true } ], "responses": { "200": { "description": "successful operation" }, "403": { "description": "Forbidden" } } } }, "/feedbacks": { "get": { "description": "Get all feedbacks", "tags": [ "feedback" ], "summary": "Get all feedbacks", "operationId": "getFeedbacks", "parameters": [ { "type": "string", "description": "Session UUID", "name": "session_uuid", "in": "query", "required": true } ], "responses": { "200": { "description": "successful operation", "schema": { "type": "array", "items": { "$ref": "#/definitions/Feedback" } } }, "403": { "description": "Forbidden" } } } }, "/feedbacks/{project_id}": { "get": { "description": "Get all feedbacks for a project", "tags": [ "feedback" ], "summary": "Get all feedbacks for a project", "operationId": "getFeedbacksForProject", "parameters": [ { "type": "string", "description": "Project id", "name": "project_id", "in": "path", "required": true } ], "responses": { "200": { "description": "successful operation", "schema": { "type": "array", "items": { "$ref": "#/definitions/Feedback" } } }, "403": { "description": "Forbidden" } } } } }, "definitions": { "Feedback": { "type": "object", "properties": { "created_at": { "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", "feedback", "support" ] }, "upvoted": { "type": "boolean" }, "upvotes": { "type": "integer" }, "user_id": { "description": "to have more context about the user", "type": "string" } } } } }`)) }