Skip to content

Commit 48c87ef

Browse files
authored
chore: reformat typed link template file (#289)
1 parent db43fd2 commit 48c87ef

File tree

1 file changed

+41
-38
lines changed
  • customizations/generator/openapi/src/main/resources/templates/expediagroup-sdk/domains/rapid

1 file changed

+41
-38
lines changed
Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,45 @@
1-
{{#operations}}{{#operation}}{{#isLinkable}}
2-
package com.expediagroup.sdk.{{namespace}}.operations
1+
{{#operations}}
2+
{{#operation}}
3+
{{#isLinkable}}
4+
package com.expediagroup.sdk.{{namespace}}.operations
35

4-
import com.expediagroup.sdk.{{namespace}}.models.Link
5-
import com.fasterxml.jackson.annotation.JsonProperty
6-
import javax.validation.Valid
6+
import com.expediagroup.sdk.{{namespace}}.models.Link
7+
import com.fasterxml.jackson.annotation.JsonProperty
8+
import javax.validation.Valid
79

8-
data class {{classname}}Link(
9-
// The request method used to access the link.
10-
@JsonProperty("method")
11-
@field:Valid
12-
override val method: kotlin.String? = null,
13-
// The URL for the link. This can be absolute or relative.
14-
@JsonProperty("href")
15-
@field:Valid
16-
override val href: kotlin.String? = null,
17-
// If the link expires, this will be the UTC date the link will expire, in ISO 8601 format.
18-
@JsonProperty("expires")
19-
@field:Valid
20-
override val expires: kotlin.String? = null
21-
) : Link(method, href, expires) {
22-
companion object {
23-
@JvmStatic
24-
fun builder() = Builder()
25-
}
10+
data class {{classname}}Link(
11+
// The request method used to access the link.
12+
@JsonProperty("method")
13+
@field:Valid
14+
override val method: kotlin.String? = null,
15+
// The URL for the link. This can be absolute or relative.
16+
@JsonProperty("href")
17+
@field:Valid
18+
override val href: kotlin.String? = null,
19+
// If the link expires, this will be the UTC date the link will expire, in ISO 8601 format.
20+
@JsonProperty("expires")
21+
@field:Valid
22+
override val expires: kotlin.String? = null
23+
) : Link(method, href, expires) {
24+
companion object {
25+
@JvmStatic
26+
fun builder() = Builder()
27+
}
2628

27-
class Builder(
28-
private var method: kotlin.String? = null,
29-
private var href: kotlin.String? = null,
30-
private var expires: kotlin.String? = null
31-
) {
32-
fun build(): {{classname}}Link {
33-
return {{classname}}Link(
34-
method = method,
35-
href = href,
36-
expires = expires
37-
)
29+
class Builder(
30+
private var method: kotlin.String? = null,
31+
private var href: kotlin.String? = null,
32+
private var expires: kotlin.String? = null
33+
) {
34+
fun build(): {{classname}}Link {
35+
return {{classname}}Link(
36+
method = method,
37+
href = href,
38+
expires = expires
39+
)
40+
}
41+
}
3842
}
39-
}
40-
}
41-
42-
{{/isLinkable}}{{/operation}}{{/operations}}
43+
{{/isLinkable}}
44+
{{/operation}}
45+
{{/operations}}

0 commit comments

Comments
 (0)