Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add seed data and schemas to CLI e2e app template #19226

Merged
merged 6 commits into from Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,34 @@
{
"kind": "collectionType",
"collectionName": "categories",
"info": {
"singularName": "category",
"pluralName": "categories",
"displayName": "Category",
"description": ""
},
"options": {
"reviewWorkflows": false
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"shorttext": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"complexes": {
"type": "relation",
"relation": "manyToMany",
"target": "api::complex.complex",
"mappedBy": "categories_m2m"
}
}
}
@@ -0,0 +1,7 @@
/**
* category controller
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreController('api::category.category');
@@ -0,0 +1,7 @@
/**
* category router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::category.category');
@@ -0,0 +1,7 @@
/**
* category service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::category.category');
@@ -0,0 +1,264 @@
{
"kind": "collectionType",
"collectionName": "complex",
"info": {
"singularName": "complex",
"pluralName": "complexes",
"displayName": "Complex Content",
"description": "Complex content type for testing"
},
"options": {
"reviewWorkflows": false
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"morph2many": {
"type": "relation",
"relation": "morphToMany",
"configurable": false
},
"shorttext": {
"type": "string",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"longtext": {
"type": "text",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"boolean": {
"type": "boolean",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"blocks": {
"type": "blocks",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"json": {
"type": "json",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"numberinteger": {
"type": "integer",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"numberbiginteger": {
"type": "biginteger",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"numberdecimal": {
"type": "decimal",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"numberfloat": {
"type": "float",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"email": {
"type": "email",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"date": {
"type": "date",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"datetime": {
"type": "datetime",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"time": {
"type": "time",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"password": {
"type": "password",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"mediamultiple": {
"type": "media",
"multiple": true,
"required": false,
"allowedTypes": ["images", "files", "videos", "audios"],
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"mediasingle": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": ["images", "files", "videos", "audios"],
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"enum": {
"type": "enumeration",
"enum": ["first value", "second value", "third value", "fourth value"],
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"uidunattached": {
"type": "uid"
},
"uidshorttext": {
"type": "uid",
"targetField": "shorttext"
},
"uidlongtext": {
"type": "uid"
},
"component_single": {
"displayName": "component",
"type": "component",
"repeatable": false,
"component": "component-category.component",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"up_user_o2o": {
"type": "relation",
"relation": "oneToOne",
"target": "plugin::users-permissions.user"
},
"admin_users_o2m": {
"type": "relation",
"relation": "oneToMany",
"target": "admin::user"
},
"categories_m2m": {
"type": "relation",
"relation": "manyToMany",
"target": "api::category.category",
"inversedBy": "complexes"
},
"morph_to_many": {
"type": "relation",
"relation": "morphToMany"
},
"component_two": {
"displayName": "component_two",
"type": "component",
"repeatable": true,
"component": "component-category.component-two",
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"dynamic_zone": {
"type": "dynamiczone",
"components": ["component-category.component", "component-category.component-two"],
"pluginOptions": {
"i18n": {
"localized": true
}
}
},
"private": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "string",
"private": true
},
"nonlocal_text": {
"pluginOptions": {
"i18n": {
"localized": false
}
},
"type": "string"
},
"required": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "string",
"required": true
},
"unique": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "string",
"unique": true
}
}
}
@@ -0,0 +1,7 @@
/**
* complex controller
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreController('api::complex.complex');
@@ -0,0 +1,7 @@
/**
* complex router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::complex.complex');
@@ -0,0 +1,7 @@
/**
* complex service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::complex.complex');

This file was deleted.

12 changes: 0 additions & 12 deletions cli-tests/app-template/template/src/api/config/routes/config.js

This file was deleted.

This file was deleted.

This file was deleted.