From efa89313fa4152252b477aafd88f7cf4a66747d8 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 5 Feb 2026 10:19:56 +0000 Subject: Initial Strapi plugin project --- .../src/api/about/content-types/about/schema.json | 23 ++++++++++++++++++++++ playground/src/api/about/controllers/about.ts | 7 +++++++ playground/src/api/about/routes/about.ts | 7 +++++++ playground/src/api/about/services/about.ts | 7 +++++++ 4 files changed, 44 insertions(+) create mode 100644 playground/src/api/about/content-types/about/schema.json create mode 100644 playground/src/api/about/controllers/about.ts create mode 100644 playground/src/api/about/routes/about.ts create mode 100644 playground/src/api/about/services/about.ts (limited to 'playground/src/api/about') diff --git a/playground/src/api/about/content-types/about/schema.json b/playground/src/api/about/content-types/about/schema.json new file mode 100644 index 0000000..581336f --- /dev/null +++ b/playground/src/api/about/content-types/about/schema.json @@ -0,0 +1,23 @@ +{ + "kind": "singleType", + "collectionName": "abouts", + "info": { + "singularName": "about", + "pluralName": "abouts", + "displayName": "About", + "description": "Write about yourself and the content you create" + }, + "options": { + "draftAndPublish": false + }, + "pluginOptions": {}, + "attributes": { + "title": { + "type": "string" + }, + "blocks": { + "type": "dynamiczone", + "components": ["shared.media", "shared.quote", "shared.rich-text", "shared.slider"] + } + } +} diff --git a/playground/src/api/about/controllers/about.ts b/playground/src/api/about/controllers/about.ts new file mode 100644 index 0000000..b8971a2 --- /dev/null +++ b/playground/src/api/about/controllers/about.ts @@ -0,0 +1,7 @@ +/** + * about controller + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreController('api::about.about'); diff --git a/playground/src/api/about/routes/about.ts b/playground/src/api/about/routes/about.ts new file mode 100644 index 0000000..872ab53 --- /dev/null +++ b/playground/src/api/about/routes/about.ts @@ -0,0 +1,7 @@ +/** + * about router. + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::about.about'); diff --git a/playground/src/api/about/services/about.ts b/playground/src/api/about/services/about.ts new file mode 100644 index 0000000..654db23 --- /dev/null +++ b/playground/src/api/about/services/about.ts @@ -0,0 +1,7 @@ +/** + * about service. + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::about.about'); -- cgit v1.2.3