@@ -46,41 +46,18 @@ object SmithyTraitCodegen {
46
46
47
47
object Args {
48
48
49
- // format: off
50
- private type ArgsDeconstructed = String :*: String :*: os.Path :*: PathRef :*: List [PathRef ] :*: List [String ] :*: LNil
51
- // format: on
52
-
53
49
private implicit val pathFormat : JsonFormat [os.Path ] = BasicJsonProtocol
54
50
.projectFormat[os.Path , File ](p => p.toIO, file => os.Path (file))
55
51
56
- implicit val argsIso = LList .iso[Args , ArgsDeconstructed ](
57
- {
58
- args : Args => (" javaPackage" , args.javaPackage) :*:
59
- (" smithyNamespace" , args.smithyNamespace) :*:
60
- (" targetDir" , args.targetDir) :*:
61
- (" smithySourcesDir" , args.smithySourcesDir) :*:
62
- (" dependencies" , args.dependencies) :*:
63
- (" externalProviders" , args.externalProviders) :*:
64
- LNil
65
- },
66
- {
67
- case (_, javaPackage) :*:
68
- (_, smithyNamespace) :*:
69
- (_, targetDir) :*:
70
- (_, smithySourcesDir) :*:
71
- (_, dependencies) :*:
72
- (_, externalProviders) :*:
73
- LNil =>
74
- Args (
75
- javaPackage = javaPackage,
76
- smithyNamespace = smithyNamespace,
77
- targetDir = targetDir,
78
- smithySourcesDir = smithySourcesDir,
79
- dependencies = dependencies,
80
- externalProviders = externalProviders,
81
- )
82
- },
83
- )
52
+ implicit val argsFmt : JsonFormat [Args ] =
53
+ caseClass(Args .apply _, Args .unapply _)(
54
+ " javaPackage" ,
55
+ " smithyNamespace" ,
56
+ " targetDir" ,
57
+ " smithySourcesDir" ,
58
+ " dependencies" ,
59
+ " externalProviders" ,
60
+ )
84
61
85
62
}
86
63
0 commit comments