File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1- import { camel } from 'case' ;
1+ import { camel , capital } from 'case' ;
22import { ModelStore } from '../stores/model.store' ;
33import { ApiURLModel } from './api-url.model' ;
44import { PhysycalFile } from './entities' ;
55import { ModelAttributessModel } from './model-attributes.model' ;
66
77export class ApiModel implements PhysycalFile {
88 url : string ;
9- verb : string ;
9+ _verb : string ;
1010 childrens : ApiURLModel [ ] ;
1111 description ?: string ;
1212 example ?: string ;
@@ -57,6 +57,13 @@ export class ApiModel implements PhysycalFile {
5757 return this . response ?. type || 'void' ;
5858 }
5959
60+ get verb ( ) : string {
61+ return this . _verb ;
62+ }
63+ set verb ( verb : string ) {
64+ this . _verb = capital ( verb ) ;
65+ }
66+
6067 constructor ( url : string , verb : string ) {
6168 this . url = url ;
6269 this . verb = verb ;
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export class {{groupName}}Service {
5050 requestBody : { { . } } , { { / requestBodyType
5151 } }
5252 ) : Observable < { { responseType } } > {
53- return this . apiService . do { { action } } (
53+ return this . apiService . do { { verb } } (
5454 '{{{ url }}}' ,
5555 { { #queryParamsType} } uriOptions { { / queryParamsType} } { { ^ queryParamsType} } null { { / queryParamsType} } ,
5656 { { #requestBodyType} } requestBody { { / requestBodyType} } { { ^ requestBodyType} } null { { / requestBodyType} }
You can’t perform that action at this time.
0 commit comments