feat: add mock generation for DTOs, models, and repositories with corresponding templates
This commit is contained in:
20
templates/repository.provider.mock.mustache
Normal file
20
templates/repository.provider.mock.mustache
Normal file
@@ -0,0 +1,20 @@
|
||||
{{#apiInfo}}
|
||||
{{#apis}}
|
||||
{{#operations}}
|
||||
import { Provider } from '@angular/core';
|
||||
|
||||
import { {{constantName}}_REPOSITORY } from '@/domain/repositories/{{classFilename}}.repository.contract';
|
||||
import { mock{{classname}}RepositoryImpl } from '@/data/repositories/{{classFilename}}.repository.impl.mock';
|
||||
|
||||
export function mock{{classname}}Repository(): Provider[] {
|
||||
return [
|
||||
{
|
||||
provide: {{constantName}}_REPOSITORY,
|
||||
useFactory: () => mock{{classname}}RepositoryImpl()
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
{{/operations}}
|
||||
{{/apis}}
|
||||
{{/apiInfo}}
|
||||
Reference in New Issue
Block a user