In strapi what are api templates for? -


i've started playing strapi see can do.

when generating api through strapi studio, generates set of base files handle model , api calls.

in entity folder (e.g. article), there's templates/default folder created default template. article entity, articledefault.template.json file this:

{   "default": {     "attributes": {       "title": {},       "content": {}     },     "displayedattribute": "title"   } } 

in strapi studio add additional templates each entity, given multiple templates.

the command line api generator not create templates folder.

i couldn't find in documentation read.

what generated templates for? when use them, , how choose particular template if have multiple?

i'm 1 of authors of strapi.

a template schema of data. let’s take simple example. have api called post, post have title , content attribute, other times, post have title, subtitle, cover , content attribute. in both cases, we’re talking same api post schema of data different. that’s why implemented templates! needs different same content.

then, said cli doesn't generate template folder in project. studio doesn't use same generator cli behavior of api same.


Comments