diff --git a/src/api/tek/content-types/tek/lifecycle.js b/src/api/parole/content-types/parole/lifecycle.js similarity index 89% rename from src/api/tek/content-types/tek/lifecycle.js rename to src/api/parole/content-types/parole/lifecycle.js index 930cb04..da2e798 100644 --- a/src/api/tek/content-types/tek/lifecycle.js +++ b/src/api/parole/content-types/parole/lifecycle.js @@ -9,8 +9,8 @@ const TELEGRAM_API_TOKEN = process.env.TELEGRAM_API_TOKEN || null const MESSAGE_URL = `${TELEGRAM_API_URL}/bot${TELEGRAM_API_TOKEN}/sendMessage?chat_id=${TELEGRAM_CHAN_ID}&parse_mode=html` const jwennAwtisEpiId = async data => { - const awtis = await strapi.query('awtis').find({id: data}) - return awtis.map(a => a.alias).join('-') + const artiste = await strapi.query('artiste').find({id: data}) + return artiste.map(a => a.alias).join('-') } const jwennUserEpiId = async userId => { @@ -57,8 +57,8 @@ module.exports = { } if (data.tit && !data.forceSlug) { - const awtis = await jwennAwtisEpiId(data.awtis) - data.slug = slugify(`${awtis}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g}) + const artiste = await jwennAwtisEpiId(data.artiste) + data.slug = slugify(`${artiste}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g}) } if (user && user.canAutoTranslate && data.tradiksyonOtomatik && data.tradiksyon.francais && (!data.tradiksyon.english || !data.tradiksyon.espagnol || !data.tradiksyon.deutsch || !data.tradiksyon.italiano)) { @@ -71,12 +71,12 @@ module.exports = { let {data} = event if (data.tit && !data.forceSlug) { - const awtis = await jwennAwtisEpiId(data.awtis) - data.slug = slugify(`${awtis}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g}) + const artiste = await jwennAwtisEpiId(data.artiste) + data.slug = slugify(`${artiste}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g}) } if (data.published_at != null) { const {id} = params - const previousData = await strapi.query('teks').findOne({id}) + const previousData = await strapi.query('paroles').findOne({id}) const previousPublishedAt = previousData.published_at const currentPublished_at = data.published_at diff --git a/src/api/tek/content-types/tek/schema.json b/src/api/parole/content-types/parole/schema.json similarity index 87% rename from src/api/tek/content-types/tek/schema.json rename to src/api/parole/content-types/parole/schema.json index 2f786f9..f7227ca 100644 --- a/src/api/tek/content-types/tek/schema.json +++ b/src/api/parole/content-types/parole/schema.json @@ -1,10 +1,10 @@ { "kind": "collectionType", - "collectionName": "teks", + "collectionName": "paroles", "info": { - "singularName": "tek", - "pluralName": "teks", - "displayName": "Teks", + "singularName": "parole", + "pluralName": "paroles", + "displayName": "Paroles", "description": "" }, "options": { @@ -38,11 +38,11 @@ "tradiksyonOtomatik": { "type": "boolean" }, - "awtis": { + "artistes": { "type": "relation", "relation": "manyToMany", - "target": "api::awti.awti", - "mappedBy": "teks" + "target": "api::parole.parole", + "mappedBy": "paroles" }, "admin_user": { "type": "relation", diff --git a/src/api/tek/controllers/tek.js b/src/api/parole/controllers/parole.js similarity index 58% rename from src/api/tek/controllers/tek.js rename to src/api/parole/controllers/parole.js index bd25e0a..d258f7e 100644 --- a/src/api/tek/controllers/tek.js +++ b/src/api/parole/controllers/parole.js @@ -2,4 +2,4 @@ const { createCoreController } = require('@strapi/strapi').factories; -module.exports = createCoreController('api::tek.tek') +module.exports = createCoreController('api::parole.parole') diff --git a/src/api/tek/routes/tek.js b/src/api/parole/routes/parole.js similarity index 59% rename from src/api/tek/routes/tek.js rename to src/api/parole/routes/parole.js index f7609c2..3e80996 100644 --- a/src/api/tek/routes/tek.js +++ b/src/api/parole/routes/parole.js @@ -2,4 +2,4 @@ const { createCoreRouter } = require('@strapi/strapi').factories; -module.exports = createCoreRouter('api::tek.tek') +module.exports = createCoreRouter('api::parole.parole') diff --git a/src/api/tek/services/tek.js b/src/api/parole/services/parole.js similarity index 58% rename from src/api/tek/services/tek.js rename to src/api/parole/services/parole.js index 5bcbfa4..b9d16f4 100644 --- a/src/api/tek/services/tek.js +++ b/src/api/parole/services/parole.js @@ -2,4 +2,4 @@ const { createCoreService } = require('@strapi/strapi').factories; -module.exports = createCoreService('api::tek.tek'); +module.exports = createCoreService('api::parole.parole'); diff --git a/src/api/tek/documentation/1.0.0/tek.json b/src/api/tek/documentation/1.0.0/tek.json deleted file mode 100644 index d70e915..0000000 --- a/src/api/tek/documentation/1.0.0/tek.json +++ /dev/null @@ -1,2407 +0,0 @@ -{ - "paths": { - "/teks": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "tit": { - "type": "string" - }, - "transkripsyon": { - "type": "string" - }, - "lanne": { - "type": "integer" - }, - "slug": { - "type": "string" - }, - "okiMizikID": { - "type": "integer" - }, - "eksplisit": { - "type": "boolean" - }, - "forceSlug": { - "type": "boolean" - }, - "tradiksyonOtomatik": { - "type": "boolean" - }, - "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": [ - "Tek" - ], - "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": { - "tit": { - "type": "string" - }, - "transkripsyon": { - "type": "string" - }, - "lanne": { - "type": "integer" - }, - "slug": { - "type": "string" - }, - "okiMizikID": { - "type": "integer" - }, - "eksplisit": { - "type": "boolean" - }, - "forceSlug": { - "type": "boolean" - }, - "tradiksyonOtomatik": { - "type": "boolean" - }, - "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": [ - "Tek" - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "object", - "properties": { - "tit": { - "type": "string" - }, - "transkripsyon": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, - "/teks/{id}": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "tit": { - "type": "string" - }, - "transkripsyon": { - "type": "string" - }, - "lanne": { - "type": "integer" - }, - "slug": { - "type": "string" - }, - "okiMizikID": { - "type": "integer" - }, - "eksplisit": { - "type": "boolean" - }, - "forceSlug": { - "type": "boolean" - }, - "tradiksyonOtomatik": { - "type": "boolean" - }, - "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": [ - "Tek" - ], - "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": { - "tit": { - "type": "string" - }, - "transkripsyon": { - "type": "string" - }, - "lanne": { - "type": "integer" - }, - "slug": { - "type": "string" - }, - "okiMizikID": { - "type": "integer" - }, - "eksplisit": { - "type": "boolean" - }, - "forceSlug": { - "type": "boolean" - }, - "tradiksyonOtomatik": { - "type": "boolean" - }, - "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": [ - "Tek" - ], - "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": { - "tit": { - "type": "string" - }, - "transkripsyon": { - "type": "string" - }, - "lanne": { - "type": "integer" - }, - "slug": { - "type": "string" - }, - "okiMizikID": { - "type": "integer" - }, - "eksplisit": { - "type": "boolean" - }, - "forceSlug": { - "type": "boolean" - }, - "tradiksyonOtomatik": { - "type": "boolean" - }, - "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": [ - "Tek" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": {} - } - } - } -}