Skip to content

System to create Models #38

Description

@Androlax2

Add a system to create Models directly from an API for example :

export class TypedFoo extends ContentItem<FooModel> {
  static modelName = 'foo';
  
  definition(): FooModel {
    return {
      title: 'Typed Foo Content',
      content: 'This is type-safe!',
      featured: true
    };
  }
}

We could generate typescript interface for FooModel from the DatoCMS and so it'll be typesafe to use and generate models programmatically.
Would be nice to include faker to be able to randomize text, images

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions