add content, add swagger
This commit is contained in:
47
src/api/category/content-types/category/schema.json
Normal file
47
src/api/category/content-types/category/schema.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "categories",
|
||||
"info": {
|
||||
"singularName": "category",
|
||||
"pluralName": "categories",
|
||||
"displayName": "Category"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"slug": {
|
||||
"type": "uid",
|
||||
"required": true
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"group": {
|
||||
"type": "enumeration",
|
||||
"required": true,
|
||||
"enum": [
|
||||
"service",
|
||||
"solution"
|
||||
]
|
||||
},
|
||||
"sortOrder": {
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"default": 0
|
||||
},
|
||||
"vendors": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
"target": "api::vendor.vendor",
|
||||
"inversedBy": "categories"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/category/controllers/category.ts
Normal file
7
src/api/category/controllers/category.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* category controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreController('api::category.category');
|
||||
7
src/api/category/routes/category.ts
Normal file
7
src/api/category/routes/category.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* category router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::category.category');
|
||||
7
src/api/category/services/category.ts
Normal file
7
src/api/category/services/category.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* category service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::category.category');
|
||||
21
src/api/home-page/content-types/home-page/schema.json
Normal file
21
src/api/home-page/content-types/home-page/schema.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"kind": "singleType",
|
||||
"collectionName": "home_pages",
|
||||
"info": {
|
||||
"singularName": "home-page",
|
||||
"pluralName": "home-pages",
|
||||
"displayName": "Home Page"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"sections": {
|
||||
"type": "dynamiczone",
|
||||
"components": [
|
||||
"sections.home-hero"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/home-page/controllers/home-page.ts
Normal file
7
src/api/home-page/controllers/home-page.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* home-page controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreController('api::home-page.home-page');
|
||||
7
src/api/home-page/routes/home-page.ts
Normal file
7
src/api/home-page/routes/home-page.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* home-page router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::home-page.home-page');
|
||||
7
src/api/home-page/services/home-page.ts
Normal file
7
src/api/home-page/services/home-page.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* home-page service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::home-page.home-page');
|
||||
22
src/api/site-config/content-types/site-config/schema.json
Normal file
22
src/api/site-config/content-types/site-config/schema.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"kind": "singleType",
|
||||
"collectionName": "site_configs",
|
||||
"info": {
|
||||
"singularName": "site-config",
|
||||
"pluralName": "site-configs",
|
||||
"displayName": "Site config"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/site-config/controllers/site-config.ts
Normal file
7
src/api/site-config/controllers/site-config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* site-config controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreController('api::site-config.site-config');
|
||||
7
src/api/site-config/routes/site-config.ts
Normal file
7
src/api/site-config/routes/site-config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* site-config router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::site-config.site-config');
|
||||
7
src/api/site-config/services/site-config.ts
Normal file
7
src/api/site-config/services/site-config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* site-config service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::site-config.site-config');
|
||||
36
src/api/vendor/content-types/vendor/schema.json
vendored
Normal file
36
src/api/vendor/content-types/vendor/schema.json
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "vendors",
|
||||
"info": {
|
||||
"singularName": "vendor",
|
||||
"pluralName": "vendors",
|
||||
"displayName": "Vendor"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"slug": {
|
||||
"type": "uid",
|
||||
"required": true
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"products": {
|
||||
"type": "component",
|
||||
"component": "shared.product",
|
||||
"repeatable": true
|
||||
},
|
||||
"categories": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
"target": "api::category.category",
|
||||
"mappedBy": "vendors"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/vendor/controllers/vendor.ts
vendored
Normal file
7
src/api/vendor/controllers/vendor.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* vendor controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreController('api::vendor.vendor');
|
||||
7
src/api/vendor/routes/vendor.ts
vendored
Normal file
7
src/api/vendor/routes/vendor.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* vendor router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::vendor.vendor');
|
||||
7
src/api/vendor/services/vendor.ts
vendored
Normal file
7
src/api/vendor/services/vendor.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* vendor service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::vendor.vendor');
|
||||
24
src/components/sections/home-hero.json
Normal file
24
src/components/sections/home-hero.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"collectionName": "components_sections_home_heroes",
|
||||
"info": {
|
||||
"displayName": "HomeHero"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"badge": {
|
||||
"type": "string"
|
||||
},
|
||||
"stats": {
|
||||
"type": "component",
|
||||
"component": "shared.attribute",
|
||||
"repeatable": true
|
||||
}
|
||||
},
|
||||
"config": {}
|
||||
}
|
||||
18
src/components/shared/attribute.json
Normal file
18
src/components/shared/attribute.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"collectionName": "components_shared_attributes",
|
||||
"info": {
|
||||
"displayName": "Attribute"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"required": false
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"config": {}
|
||||
}
|
||||
14
src/components/shared/product.json
Normal file
14
src/components/shared/product.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"collectionName": "components_shared_products",
|
||||
"info": {
|
||||
"displayName": "Product"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"config": {}
|
||||
}
|
||||
Reference in New Issue
Block a user