{ "swagger": "2.0", "info": { "contact": {} }, "paths": { "/healthz": { "get": { "summary": "Returns health of the service" } }, "/note/{id}": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Note" ], "summary": "Get note list", "parameters": [ { "type": "string", "description": "ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.Note" } } }, "404": { "description": "Not Found", "schema": { "type": "string" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Note" ], "summary": "Create a new note", "parameters": [ { "type": "string", "description": "ID", "name": "id", "in": "path", "required": true }, { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Note" } } ], "responses": { "200": { "description": "successfully note created", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/note/{id}/{id}": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Note" ], "summary": "Get note", "parameters": [ { "type": "string", "description": "ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.Note" } }, "404": { "description": "Not Found", "schema": { "type": "string" } } } }, "put": { "description": "Update note", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Note" ], "summary": "Update note", "parameters": [ { "type": "string", "description": "ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "successfully updated", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "404": { "description": "Not Found", "schema": { "type": "string" } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Note" ], "summary": "Delete note", "parameters": [ { "type": "string", "description": "ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "nil" } }, "404": { "description": "Not Found", "schema": { "type": "string" } } } } }, "/user/reset/{userEmail}": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Re-set the user password", "parameters": [ { "type": "string", "description": "email", "name": "userEmail", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "404": { "description": "Not Found", "schema": { "type": "string" } } } } }, "/user/signin": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Sign in user", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.User" } } ], "responses": { "200": { "description": "successfully note created", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/user/signup": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Create a new user", "parameters": [ { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.User" } } ], "responses": { "200": { "description": "successfully note created", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/user/verification/{userEmail}": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "verify the user email", "parameters": [ { "type": "string", "description": "email", "name": "userEmail", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "404": { "description": "Not Found", "schema": { "type": "string" } } } } }, "/user/welcome": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Check the token", "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "404": { "description": "Not Found", "schema": { "type": "string" } } } } }, "/user/{id}": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Update the user", "parameters": [ { "type": "string", "description": "ID", "name": "id", "in": "path", "required": true }, { "description": "data", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.User" } } ], "responses": { "200": { "description": "successfully note created", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } } }, "definitions": { "models.Note": { "type": "object", "properties": { "complete": { "type": "boolean" }, "createdAt": { "type": "string", "example": "2021-05-13T05:19:18.789332489Z" }, "id": { "type": "string", "example": "2e36a7c2-46dc-4107-8499-49ccc85adb25" }, "note": { "type": "string" }, "public": { "type": "boolean" }, "updatedAt": { "type": "string", "example": "2021-05-13T05:19:18.789332489Z" }, "userId": { "type": "string" } } }, "models.User": { "type": "object", "properties": { "createdAt": { "type": "string", "example": "2021-05-13T05:19:18.789332489Z" }, "email": { "type": "string" }, "id": { "type": "string", "example": "2e36a7c2-46dc-4107-8499-49ccc85adb25" }, "name": { "type": "string" }, "password": { "type": "string" }, "updatedAt": { "type": "string", "example": "2021-05-13T05:19:18.789332489Z" }, "verification": { "type": "boolean" } } } } }