Make config values into a map
This commit is contained in:
parent
57088238c4
commit
2558a52b42
8 changed files with 24 additions and 27 deletions
|
@ -1,4 +1,4 @@
|
|||
package se.senashdev.projekt.api
|
||||
package ${config.package}
|
||||
|
||||
object Codecs:
|
||||
<#list typeDefinitions as type>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package se.senashdev.projekt.api
|
||||
package ${config.package}
|
||||
|
||||
import se.rutdev.projekt.api.HttpProtocol.VersionedResponse
|
||||
import se.rutdev.framework.json.circe.RutUtilsCodec
|
||||
|
@ -13,7 +13,7 @@ class Endpoints(override val config: OAuthUtils.OAuthConfig) extends framework.s
|
|||
type ApiEndpoint[I, O] = OAuthEndpoint[RequestMeta.OAuthRequestMeta, I, ProblemDetail, O]
|
||||
|
||||
<#list endpoints as endpoint>
|
||||
val ${endpoint.inputType}Endpoint = ApiEndpoint[${endpoint.inputType?cap_first}, VersionedResponse] =
|
||||
val ${endpoint.inputType?uncap_first}Endpoint = ApiEndpoint[${endpoint.inputType?cap_first}, VersionedResponse] =
|
||||
<#list endpoint.paths.paths>
|
||||
apiV1Endpoint
|
||||
.post
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package se.senashdev.projekt.api
|
||||
package ${config.package}
|
||||
|
||||
object Protocol:
|
||||
<#list typeDefinitions as type>
|
||||
<#list typeDefinitions?sort as type>
|
||||
case class ${type.name?cap_first}(
|
||||
<#list type.fields as field>
|
||||
${field.name} : ${field.type},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue