@@ -34,37 +34,29 @@ var Template = templateapi.Config{
3434 Type : templateapi .TypeAPIOnce ,
3535 Kind : templateapi .KindAPI ,
3636 },
37- // core - api
3837 {
39- SourceTemplate : "api_main_default .gohtml" ,
38+ SourceTemplate : "api_client_base .gohtml" ,
4039 Snippets : templateapi .DefaultSnippets ,
4140 TargetDirectory : "core/src/main/java/{{ .Common.Packages.Client | toFilePath }}" ,
42- TargetFileName : "{{ .Metadata.Name }}Api .java" ,
41+ TargetFileName : "Abstract {{ .Metadata.Name }}ApiClient .java" ,
4342 Type : templateapi .TypeAPIOnce ,
4443 Kind : templateapi .KindAPI ,
4544 },
45+ // core - api
4646 {
4747 SourceTemplate : "api_main_consumer.gohtml" ,
4848 Snippets : templateapi .DefaultSnippets ,
4949 TargetDirectory : "core/src/main/java/{{ .Common.Packages.Client | toFilePath }}" ,
50- TargetFileName : "{{ .Metadata.Name }}ConsumerApi .java" ,
50+ TargetFileName : "{{ .Metadata.Name }}Api .java" ,
5151 Type : templateapi .TypeAPIOnce ,
5252 Kind : templateapi .KindAPI ,
5353 },
5454 // core - services
55- {
56- SourceTemplate : "api_service_default.gohtml" ,
57- Snippets : templateapi .DefaultSnippets ,
58- TargetDirectory : "core/src/main/java/{{ .Common.Packages.Client | toFilePath }}" ,
59- TargetFileName : "{{ .Service.Type }}Api.java" ,
60- Type : templateapi .TypeAPIEach ,
61- Kind : templateapi .KindAPI ,
62- },
6355 {
6456 SourceTemplate : "api_service_consumer.gohtml" ,
6557 Snippets : templateapi .DefaultSnippets ,
6658 TargetDirectory : "core/src/main/java/{{ .Common.Packages.Client | toFilePath }}" ,
67- TargetFileName : "{{ .Service.Type }}ConsumerApi .java" ,
59+ TargetFileName : "{{ .Service.Type }}Api .java" ,
6860 Type : templateapi .TypeAPIEach ,
6961 Kind : templateapi .KindAPI ,
7062 },
@@ -77,6 +69,14 @@ var Template = templateapi.Config{
7769 Type : templateapi .TypeOperationEach ,
7870 Kind : templateapi .KindAPI ,
7971 },
72+ {
73+ SourceTemplate : "response.gohtml" ,
74+ Snippets : templateapi .DefaultSnippets ,
75+ TargetDirectory : "core/src/main/java/{{ .Common.Packages.Responses | toFilePath }}" ,
76+ TargetFileName : "{{ .Operation.Name }}Response.java" ,
77+ Type : templateapi .TypeOperationEach ,
78+ Kind : templateapi .KindAPI ,
79+ },
8080 // core - model
8181 {
8282 SourceTemplate : "model.gohtml" ,
@@ -94,6 +94,55 @@ var Template = templateapi.Config{
9494 Type : templateapi .TypeEnumEach ,
9595 Kind : templateapi .KindModel ,
9696 },
97+ // core - auth
98+ {
99+ SourceTemplate : "auth_api.gohtml" ,
100+ Snippets : templateapi .DefaultSnippets ,
101+ TargetDirectory : "core/src/main/java/{{ .Common.Packages.Auth | toFilePath }}" ,
102+ TargetFileName : "AuthMethod.java" ,
103+ Type : templateapi .TypeAPIOnce ,
104+ Kind : templateapi .KindAPI ,
105+ },
106+ {
107+ SourceTemplate : "auth_apikey.gohtml" ,
108+ Snippets : templateapi .DefaultSnippets ,
109+ TargetDirectory : "core/src/main/java/{{ .Common.Packages.Auth | toFilePath }}" ,
110+ TargetFileName : "ApiKeyAuthMethod.java" ,
111+ Type : templateapi .TypeAPIOnce ,
112+ Kind : templateapi .KindAPI ,
113+ },
114+ {
115+ SourceTemplate : "auth_basic.gohtml" ,
116+ Snippets : templateapi .DefaultSnippets ,
117+ TargetDirectory : "core/src/main/java/{{ .Common.Packages.Auth | toFilePath }}" ,
118+ TargetFileName : "BasicAuthMethod.java" ,
119+ Type : templateapi .TypeAPIOnce ,
120+ Kind : templateapi .KindAPI ,
121+ },
122+ {
123+ SourceTemplate : "auth_bearer.gohtml" ,
124+ Snippets : templateapi .DefaultSnippets ,
125+ TargetDirectory : "core/src/main/java/{{ .Common.Packages.Auth | toFilePath }}" ,
126+ TargetFileName : "BearerAuthMethod.java" ,
127+ Type : templateapi .TypeAPIOnce ,
128+ Kind : templateapi .KindAPI ,
129+ },
130+ {
131+ SourceTemplate : "auth_oauth2client.gohtml" ,
132+ Snippets : templateapi .DefaultSnippets ,
133+ TargetDirectory : "core/src/main/java/{{ .Common.Packages.Auth | toFilePath }}" ,
134+ TargetFileName : "OAuth2ClientCredentialAuthMethod.java" ,
135+ Type : templateapi .TypeAPIOnce ,
136+ Kind : templateapi .KindAPI ,
137+ },
138+ {
139+ SourceTemplate : "auth_oauth2user.gohtml" ,
140+ Snippets : templateapi .DefaultSnippets ,
141+ TargetDirectory : "core/src/main/java/{{ .Common.Packages.Auth | toFilePath }}" ,
142+ TargetFileName : "OAuth2UserCredentialAuthMethod.java" ,
143+ Type : templateapi .TypeAPIOnce ,
144+ Kind : templateapi .KindAPI ,
145+ },
97146 // spring - main
98147 {
99148 SourceTemplate : "build.gradle.kts.spring.gohtml" ,
0 commit comments