diff --git a/src/api/komant/content-types/komant/lifecycle.js b/src/api/commentaire/content-types/commentaire/lifecycle.js similarity index 76% rename from src/api/komant/content-types/komant/lifecycle.js rename to src/api/commentaire/content-types/commentaire/lifecycle.js index ac2faa1..b5dd87a 100644 --- a/src/api/komant/content-types/komant/lifecycle.js +++ b/src/api/commentaire/content-types/commentaire/lifecycle.js @@ -1,8 +1,8 @@ 'use strict'; const jwennTeksEpiId = async teksId => { - const teks = await strapi.query('teks').findOne({id: teksId}) - return teks + const paroles = await strapi.query('paroles').findOne({id: teksId}) + return paroles } const jwennUserEpiId = async userId => { @@ -14,11 +14,11 @@ module.exports = { beforeCreate: async event => { let {data} = event - if (data.kontni && data.teks && data.user) { - const teks = await jwennTeksEpiId(data.teks) + if (data.kontni && data.paroles && data.user) { + const parole = await jwennTeksEpiId(data.parole) const user = await jwennUserEpiId(data.user) - if(!teks || !user) { + if(!parole || !user) { throw strapi.errors.badRequest('Not found') } diff --git a/src/api/komant/content-types/komant/schema.json b/src/api/commentaire/content-types/commentaire/schema.json similarity index 72% rename from src/api/komant/content-types/komant/schema.json rename to src/api/commentaire/content-types/commentaire/schema.json index fb4aecd..e0d2cbd 100644 --- a/src/api/komant/content-types/komant/schema.json +++ b/src/api/commentaire/content-types/commentaire/schema.json @@ -1,10 +1,10 @@ { "kind": "collectionType", - "collectionName": "komante", + "collectionName": "commentaires", "info": { - "singularName": "komant", - "pluralName": "komante", - "displayName": "Komante", + "singularName": "commentaire", + "pluralName": "commentaires", + "displayName": "Commentaire", "description": "" }, "options": { @@ -25,10 +25,10 @@ "relation": "oneToOne", "target": "plugin::users-permissions.user" }, - "tek": { + "parole": { "type": "relation", "relation": "oneToOne", - "target": "api::tek.tek" + "target": "api::parole.parole" } } } diff --git a/src/api/komant/controllers/komant.js b/src/api/commentaire/controllers/commentaire.js similarity index 55% rename from src/api/komant/controllers/komant.js rename to src/api/commentaire/controllers/commentaire.js index 4ee3759..76bc735 100644 --- a/src/api/komant/controllers/komant.js +++ b/src/api/commentaire/controllers/commentaire.js @@ -2,4 +2,4 @@ const { createCoreController } = require('@strapi/strapi').factories; -module.exports = createCoreController('api::komant.komant') +module.exports = createCoreController('api::commentaire.commentaire') diff --git a/src/api/komant/routes/komant.js b/src/api/commentaire/routes/commentaire.js similarity index 55% rename from src/api/komant/routes/komant.js rename to src/api/commentaire/routes/commentaire.js index 842fed6..1d1afba 100644 --- a/src/api/komant/routes/komant.js +++ b/src/api/commentaire/routes/commentaire.js @@ -2,4 +2,4 @@ const { createCoreRouter } = require('@strapi/strapi').factories; -module.exports = createCoreRouter('api::komant.komant') +module.exports = createCoreRouter('api::commentaire.commentaire') diff --git a/src/api/komant/services/komant.js b/src/api/commentaire/services/commentaire.js similarity index 54% rename from src/api/komant/services/komant.js rename to src/api/commentaire/services/commentaire.js index 19cccdd..837fc94 100644 --- a/src/api/komant/services/komant.js +++ b/src/api/commentaire/services/commentaire.js @@ -2,4 +2,4 @@ const { createCoreService } = require('@strapi/strapi').factories; -module.exports = createCoreService('api::komant.komant'); +module.exports = createCoreService('api::commentaire.commentaire'); diff --git a/src/api/komant/documentation/1.0.0/komant.json b/src/api/komant/documentation/1.0.0/komant.json deleted file mode 100644 index d111f31..0000000 --- a/src/api/komant/documentation/1.0.0/komant.json +++ /dev/null @@ -1,2323 +0,0 @@ -{ - "paths": { - "/komante": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "kontni": { - "type": "string" - }, - "sentAt": { - "type": "string", - "format": "date-time" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "publishedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "username": { - "type": "string" - }, - "email": { - "type": "string", - "format": "email" - }, - "resetPasswordToken": { - "type": "string" - }, - "registrationToken": { - "type": "string" - }, - "isActive": { - "type": "boolean" - }, - "roles": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "description": { - "type": "string" - }, - "users": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - }, - "permissions": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "properties": {}, - "conditions": {}, - "role": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - } - }, - "blocked": { - "type": "boolean" - }, - "preferedLanguage": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - }, - "meta": { - "type": "object", - "properties": { - "pagination": { - "properties": { - "page": { - "type": "integer" - }, - "pageSize": { - "type": "integer", - "minimum": 25 - }, - "pageCount": { - "type": "integer", - "maximum": 1 - }, - "total": { - "type": "integer" - } - } - } - } - } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "tags": [ - "Komant" - ], - "parameters": [ - { - "name": "sort", - "in": "query", - "description": "Sort by attributes ascending (asc) or descending (desc)", - "deprecated": false, - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "pagination[withCount]", - "in": "query", - "description": "Retun page/pageSize (default: true)", - "deprecated": false, - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pagination[page]", - "in": "query", - "description": "Page number (default: 0)", - "deprecated": false, - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "pagination[pageSize]", - "in": "query", - "description": "Page size (default: 25)", - "deprecated": false, - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "pagination[start]", - "in": "query", - "description": "Offset value (default: 0)", - "deprecated": false, - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "pagination[limit]", - "in": "query", - "description": "Number of entities to return (default: 25)", - "deprecated": false, - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "fields", - "in": "query", - "description": "Fields to return (ex: title,author)", - "deprecated": false, - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "populate", - "in": "query", - "description": "Relations to return", - "deprecated": false, - "required": false, - "schema": { - "type": "string" - } - } - ], - "requestBody": {} - }, - "post": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "kontni": { - "type": "string" - }, - "sentAt": { - "type": "string", - "format": "date-time" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "publishedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "username": { - "type": "string" - }, - "email": { - "type": "string", - "format": "email" - }, - "resetPasswordToken": { - "type": "string" - }, - "registrationToken": { - "type": "string" - }, - "isActive": { - "type": "boolean" - }, - "roles": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "description": { - "type": "string" - }, - "users": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - }, - "permissions": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "properties": {}, - "conditions": {}, - "role": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - } - }, - "blocked": { - "type": "boolean" - }, - "preferedLanguage": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - }, - "meta": { - "type": "object" - } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "tags": [ - "Komant" - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "object", - "properties": { - "kontni": { - "type": "string" - }, - "sentAt": { - "type": "string", - "format": "date-time" - } - } - } - } - } - } - } - } - } - }, - "/komante/{id}": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "kontni": { - "type": "string" - }, - "sentAt": { - "type": "string", - "format": "date-time" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "publishedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "username": { - "type": "string" - }, - "email": { - "type": "string", - "format": "email" - }, - "resetPasswordToken": { - "type": "string" - }, - "registrationToken": { - "type": "string" - }, - "isActive": { - "type": "boolean" - }, - "roles": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "description": { - "type": "string" - }, - "users": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - }, - "permissions": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "properties": {}, - "conditions": {}, - "role": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - } - }, - "blocked": { - "type": "boolean" - }, - "preferedLanguage": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - }, - "meta": { - "type": "object" - } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "tags": [ - "Komant" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": {} - }, - "put": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "kontni": { - "type": "string" - }, - "sentAt": { - "type": "string", - "format": "date-time" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "publishedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "username": { - "type": "string" - }, - "email": { - "type": "string", - "format": "email" - }, - "resetPasswordToken": { - "type": "string" - }, - "registrationToken": { - "type": "string" - }, - "isActive": { - "type": "boolean" - }, - "roles": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "description": { - "type": "string" - }, - "users": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - }, - "permissions": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "properties": {}, - "conditions": {}, - "role": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - } - }, - "blocked": { - "type": "boolean" - }, - "preferedLanguage": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - } - } - }, - "meta": { - "type": "object" - } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "tags": [ - "Komant" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "object", - "properties": { - "kontni": { - "type": "string" - }, - "sentAt": { - "type": "string", - "format": "date-time" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "publishedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "oneOf": [ - { - "type": "integer" - }, - { - "type": "string" - } - ], - "example": "string or id" - }, - "updatedBy": { - "oneOf": [ - { - "type": "integer" - }, - { - "type": "string" - } - ], - "example": "string or id" - } - } - } - } - } - } - } - } - }, - "delete": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int64" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "type": "object", - "properties": { - "status": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "tags": [ - "Komant" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": {} - } - } - } -}