@@ -20,36 +20,38 @@ public protocol TemplateInputRepresentable: Encodable, Sendable {
2020}
2121
2222extension String : TemplateInputRepresentable {
23- public var templateInputRepresentation : TemplateInput { TemplateInput ( kind : . string( self ) ) }
23+ public var templateInputRepresentation : TemplateInput { TemplateInput ( value : . string( self ) ) }
2424}
2525
2626extension Int : TemplateInputRepresentable {
27- public var templateInputRepresentation : TemplateInput { TemplateInput ( kind: . int( self ) ) }
27+ public var templateInputRepresentation : TemplateInput {
28+ TemplateInput ( value: . number( Double ( self ) ) )
29+ }
2830}
2931
3032extension Double : TemplateInputRepresentable {
31- public var templateInputRepresentation : TemplateInput { TemplateInput ( kind : . double ( self ) ) }
33+ public var templateInputRepresentation : TemplateInput { TemplateInput ( value : . number ( self ) ) }
3234}
3335
3436extension Float : TemplateInputRepresentable {
3537 public var templateInputRepresentation : TemplateInput {
36- TemplateInput ( kind : . double ( Double ( self ) ) )
38+ TemplateInput ( value : . number ( Double ( self ) ) )
3739 }
3840}
3941
4042extension Bool : TemplateInputRepresentable {
41- public var templateInputRepresentation : TemplateInput { TemplateInput ( kind : . bool( self ) ) }
43+ public var templateInputRepresentation : TemplateInput { TemplateInput ( value : . bool( self ) ) }
4244}
4345
4446extension Array : TemplateInputRepresentable where Element: TemplateInputRepresentable {
4547 public var templateInputRepresentation : TemplateInput {
46- TemplateInput ( kind : . array( map { TemplateInput ( $0) . kind } ) )
48+ TemplateInput ( value : . array( map { TemplateInput ( $0) . value } ) )
4749 }
4850}
4951
5052extension Dictionary : TemplateInputRepresentable
5153 where Key == String , Value: TemplateInputRepresentable {
5254 public var templateInputRepresentation : TemplateInput {
53- TemplateInput ( kind : . dictionary ( mapValues { TemplateInput ( $0) . kind } ) )
55+ TemplateInput ( value : . object ( mapValues { TemplateInput ( $0) . value } ) )
5456 }
5557}
0 commit comments