From d906450f05f5c6465a3dc2a911af62c4d43c4645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Thu, 12 May 2022 18:38:19 +0400 Subject: [PATCH] Rename awtis to artistes --- .../content-types/artiste}/lifecycle.js | 20 +- .../content-types/artiste}/schema.json | 14 +- .../controllers/artiste.js} | 2 +- .../awti.js => artiste/routes/artiste.js} | 2 +- .../awti.js => artiste/services/artiste.js} | 2 +- src/api/awti/documentation/1.0.0/awti.json | 2429 ----------------- 6 files changed, 20 insertions(+), 2449 deletions(-) rename src/api/{awti/content-types/awti => artiste/content-types/artiste}/lifecycle.js (65%) rename src/api/{awti/content-types/awti => artiste/content-types/artiste}/schema.json (80%) rename src/api/{awti/controllers/awti.js => artiste/controllers/artiste.js} (58%) rename src/api/{awti/routes/awti.js => artiste/routes/artiste.js} (58%) rename src/api/{awti/services/awti.js => artiste/services/artiste.js} (58%) delete mode 100644 src/api/awti/documentation/1.0.0/awti.json diff --git a/src/api/awti/content-types/awti/lifecycle.js b/src/api/artiste/content-types/artiste/lifecycle.js similarity index 65% rename from src/api/awti/content-types/awti/lifecycle.js rename to src/api/artiste/content-types/artiste/lifecycle.js index edf9d78..cc00f87 100644 --- a/src/api/awti/content-types/awti/lifecycle.js +++ b/src/api/artiste/content-types/artiste/lifecycle.js @@ -8,13 +8,13 @@ const slugify = require('slugify') const jwennTeksEpiId = async data => { - const teks = await strapi.query('teks').find({id_in: data}) + const teks = await strapi.query('paroles').find({id_in: data}) return teks } const jwennAwtisEpiId = async id => { - const awtis = await strapi.query('awtis').find({id}) - return awtis + const artiste = await strapi.query('artiste').find({id}) + return artiste } module.exports = { @@ -33,16 +33,16 @@ module.exports = { afterUpdate: async event => { let {data} = event const {id} = data - const awtis = await jwennAwtisEpiId(id) + const artiste = await jwennAwtisEpiId(id) - if (awtis.teks && awtis.teks.length >= 1) { - const teks = await jwennTeksEpiId(awtis.teks) - Promise.all(teks.map(async t => { - const {id, tit, slug, awtis} = t - const alias = awtis.map(a => a.alias).join('-') + if (artiste.teks && artiste.paroles.length >= 1) { + const paroles = await jwennTeksEpiId(artiste.paroles) + Promise.all(paroles.map(async t => { + const {id, tit, slug, artiste} = t + const alias = artiste.map(a => a.alias).join('-') const slugUpdated = slugify(`${alias}-${tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g}) if (slug !== slugUpdated) { - await strapi.query('teks').update( + await strapi.query('paroles').update( {id}, {slug: slugUpdated} ) diff --git a/src/api/awti/content-types/awti/schema.json b/src/api/artiste/content-types/artiste/schema.json similarity index 80% rename from src/api/awti/content-types/awti/schema.json rename to src/api/artiste/content-types/artiste/schema.json index 33ffdfb..4bb7cf9 100644 --- a/src/api/awti/content-types/awti/schema.json +++ b/src/api/artiste/content-types/artiste/schema.json @@ -1,10 +1,10 @@ { "kind": "collectionType", - "collectionName": "awtis", + "collectionName": "artistes", "info": { - "singularName": "awti", - "pluralName": "awtis", - "displayName": "Awtis", + "singularName": "artiste", + "pluralName": "artistes", + "displayName": "Artistes", "description": "" }, "options": { @@ -30,11 +30,11 @@ "slug": { "type": "string" }, - "teks": { + "paroles": { "type": "relation", "relation": "manyToMany", - "target": "api::tek.tek", - "inversedBy": "awtis" + "target": "api::parole.parole", + "inversedBy": "artistes" }, "admin_user": { "type": "relation", diff --git a/src/api/awti/controllers/awti.js b/src/api/artiste/controllers/artiste.js similarity index 58% rename from src/api/awti/controllers/awti.js rename to src/api/artiste/controllers/artiste.js index 3cf8272..b91287b 100644 --- a/src/api/awti/controllers/awti.js +++ b/src/api/artiste/controllers/artiste.js @@ -2,4 +2,4 @@ const { createCoreController } = require('@strapi/strapi').factories; -module.exports = createCoreController('api::awti.awti') +module.exports = createCoreController('api::artiste.artiste') diff --git a/src/api/awti/routes/awti.js b/src/api/artiste/routes/artiste.js similarity index 58% rename from src/api/awti/routes/awti.js rename to src/api/artiste/routes/artiste.js index 6c6c467..27ff441 100644 --- a/src/api/awti/routes/awti.js +++ b/src/api/artiste/routes/artiste.js @@ -2,4 +2,4 @@ const { createCoreRouter } = require('@strapi/strapi').factories; -module.exports = createCoreRouter('api::awti.awti') +module.exports = createCoreRouter('api::artiste.artiste') diff --git a/src/api/awti/services/awti.js b/src/api/artiste/services/artiste.js similarity index 58% rename from src/api/awti/services/awti.js rename to src/api/artiste/services/artiste.js index e0398c7..dc95ffe 100644 --- a/src/api/awti/services/awti.js +++ b/src/api/artiste/services/artiste.js @@ -2,4 +2,4 @@ const { createCoreService } = require('@strapi/strapi').factories; -module.exports = createCoreService('api::awti.awti'); +module.exports = createCoreService('api::artiste.artiste'); diff --git a/src/api/awti/documentation/1.0.0/awti.json b/src/api/awti/documentation/1.0.0/awti.json deleted file mode 100644 index 589b73b..0000000 --- a/src/api/awti/documentation/1.0.0/awti.json +++ /dev/null @@ -1,2429 +0,0 @@ -{ - "paths": { - "/awtis": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "alias": { - "type": "string" - }, - "prenon": { - "type": "string" - }, - "non": { - "type": "string" - }, - "biyografi": { - "type": "string" - }, - "nesans": { - "type": "string", - "format": "date" - }, - "slug": { - "type": "string" - }, - "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": [ - "Awti" - ], - "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": { - "alias": { - "type": "string" - }, - "prenon": { - "type": "string" - }, - "non": { - "type": "string" - }, - "biyografi": { - "type": "string" - }, - "nesans": { - "type": "string", - "format": "date" - }, - "slug": { - "type": "string" - }, - "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": [ - "Awti" - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "object", - "properties": { - "alias": { - "type": "string" - }, - "prenon": { - "type": "string" - }, - "non": { - "type": "string" - }, - "biyografi": { - "type": "string" - }, - "nesans": { - "type": "string", - "format": "date" - }, - "slug": { - "type": "string" - }, - "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" - } - } - } - } - } - } - } - } - } - }, - "/awtis/{id}": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "attributes": { - "type": "object", - "properties": { - "alias": { - "type": "string" - }, - "prenon": { - "type": "string" - }, - "non": { - "type": "string" - }, - "biyografi": { - "type": "string" - }, - "nesans": { - "type": "string", - "format": "date" - }, - "slug": { - "type": "string" - }, - "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": [ - "Awti" - ], - "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": { - "alias": { - "type": "string" - }, - "prenon": { - "type": "string" - }, - "non": { - "type": "string" - }, - "biyografi": { - "type": "string" - }, - "nesans": { - "type": "string", - "format": "date" - }, - "slug": { - "type": "string" - }, - "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": [ - "Awti" - ], - "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": { - "alias": { - "type": "string" - }, - "prenon": { - "type": "string" - }, - "non": { - "type": "string" - }, - "biyografi": { - "type": "string" - }, - "nesans": { - "type": "string", - "format": "date" - }, - "slug": { - "type": "string" - }, - "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": [ - "Awti" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": {} - } - } - } -}