@@ -38,9 +38,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
38
38
|final case class Person(name: String, age: Int)
39
39
|
40
40
|object Person {
41
- | implicit val customConfig = Configuration.default.withDefaults
42
- | implicit val circeDecoder: Decoder[Person] = deriveDecoder[Person](renaming.snakeCase, true, None)
43
- | implicit val circeEncoder: Encoder[Person] = deriveEncoder[Person](renaming.snakeCase, None)
41
+ | implicit val customConfig = Configuration.default.withDefaults.withSnakeCaseMemberNames.withSnakeCaseConstructorNames
42
+ | implicit val circeDecoder: Decoder[Person] = deriveDecoder[Person]
43
+ | implicit val circeEncoder: Encoder[Person] = deriveEncoder[Person]
44
44
|}
45
45
""" .stripMargin.trim.parse[Source ]
46
46
val tree : Parsed [Source ] = ScalaGenerator .codeGenerator.generateScala(person).parse[Source ]
@@ -69,9 +69,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
69
69
|final case class Person()
70
70
|
71
71
|object Person {
72
- | implicit val customConfig = Configuration.default.withDefaults
73
- | implicit val circeDecoder: Decoder[Person] = deriveDecoder[Person](renaming.snakeCase, true, None)
74
- | implicit val circeEncoder: Encoder[Person] = deriveEncoder[Person](renaming.snakeCase, None)
72
+ | implicit val customConfig = Configuration.default.withDefaults.withSnakeCaseMemberNames.withSnakeCaseConstructorNames
73
+ | implicit val circeDecoder: Decoder[Person] = deriveDecoder[Person]
74
+ | implicit val circeEncoder: Encoder[Person] = deriveEncoder[Person]
75
75
|}
76
76
""" .stripMargin.trim.parse[Source ]
77
77
val tree : Parsed [Source ] = ScalaGenerator .codeGenerator.generateScala(person).parse[Source ]
@@ -103,9 +103,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
103
103
|final case class Person(name: com.enfore.apis.Name, age: Int)
104
104
|
105
105
|object Person {
106
- | implicit val customConfig = Configuration.default.withDefaults
107
- | implicit val circeDecoder: Decoder[Person] = deriveDecoder[Person](renaming.snakeCase, true, None)
108
- | implicit val circeEncoder: Encoder[Person] = deriveEncoder[Person](renaming.snakeCase, None)
106
+ | implicit val customConfig = Configuration.default.withDefaults.withSnakeCaseMemberNames.withSnakeCaseConstructorNames
107
+ | implicit val circeDecoder: Decoder[Person] = deriveDecoder[Person]
108
+ | implicit val circeEncoder: Encoder[Person] = deriveEncoder[Person]
109
109
|}
110
110
""" .stripMargin.trim.parse[Source ]
111
111
val tree : Parsed [Source ] = ScalaGenerator .codeGenerator.generateScala(person).parse[Source ]
@@ -160,9 +160,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
160
160
|final case class Person(name: com.enfore.apis.Name = com.enfore.apis.Name.MAGIC, age: Int)
161
161
|
162
162
|object Person {
163
- | implicit val customConfig = Configuration.default.withDefaults
164
- | implicit val circeDecoder: Decoder[Person] = deriveDecoder[Person](renaming.snakeCase, true, None)
165
- | implicit val circeEncoder: Encoder[Person] = deriveEncoder[Person](renaming.snakeCase, None)
163
+ | implicit val customConfig = Configuration.default.withDefaults.withSnakeCaseMemberNames.withSnakeCaseConstructorNames
164
+ | implicit val circeDecoder: Decoder[Person] = deriveDecoder[Person]
165
+ | implicit val circeEncoder: Encoder[Person] = deriveEncoder[Person]
166
166
|}
167
167
""" .stripMargin.trim.parse[Source ]
168
168
val tree : Parsed [Source ] = ScalaGenerator .codeGenerator.generateScala(person).parse[Source ]
@@ -202,9 +202,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
202
202
| listOpVal: List[Option[Double]])
203
203
|
204
204
| object ParamedType {
205
- | implicit val customConfig = Configuration.default.withDefaults
206
- | implicit val circeDecoder: Decoder[ParamedType] = deriveDecoder[ParamedType](renaming.snakeCase, true, None)
207
- | implicit val circeEncoder: Encoder[ParamedType] = deriveEncoder[ParamedType](renaming.snakeCase, None)
205
+ | implicit val customConfig = Configuration.default.withDefaults.withSnakeCaseMemberNames.withSnakeCaseConstructorNames
206
+ | implicit val circeDecoder: Decoder[ParamedType] = deriveDecoder[ParamedType]
207
+ | implicit val circeEncoder: Encoder[ParamedType] = deriveEncoder[ParamedType]
208
208
| }
209
209
""" .stripMargin.trim.parse[Source ]
210
210
val tree : Parsed [Source ] = ScalaGenerator .codeGenerator.generateScala(paramedType).parse[Source ]
@@ -244,9 +244,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
244
244
|final case class RefinedType(stringVal : String Refined AllOf[MinSize[W.`3`.T] :: MaxSize[W.`3`.T] :: HNil])
245
245
|
246
246
|object RefinedType {
247
- | implicit val customConfig = Configuration.default.withDefaults
248
- | implicit val circeDecoder: Decoder[RefinedType] = deriveDecoder[RefinedType](renaming.snakeCase, true, None)
249
- | implicit val circeEncoder: Encoder[RefinedType] = deriveEncoder[RefinedType](renaming.snakeCase, None)
247
+ | implicit val customConfig = Configuration.default.withDefaults.withSnakeCaseMemberNames.withSnakeCaseConstructorNames
248
+ | implicit val circeDecoder: Decoder[RefinedType] = deriveDecoder[RefinedType]
249
+ | implicit val circeEncoder: Encoder[RefinedType] = deriveEncoder[RefinedType]
250
250
| object RefinementConstructors {
251
251
| val stringVal = new RefinedTypeOps[String Refined AllOf[MinSize[W.`3`.T] :: MaxSize[W.`3`.T] :: HNil], String]
252
252
| }
@@ -292,8 +292,8 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
292
292
|)
293
293
|
294
294
|object RefinedType {
295
- | implicit val circeDecoder: Decoder[RefinedType] = deriveDecoder[RefinedType](renaming.snakeCase, true, None)
296
- | implicit val circeEncoder: Encoder[RefinedType] = deriveEncoder[RefinedType](renaming.snakeCase, None)
295
+ | implicit val circeDecoder: Decoder[RefinedType] = deriveDecoder[RefinedType]
296
+ | implicit val circeEncoder: Encoder[RefinedType] = deriveEncoder[RefinedType]
297
297
|
298
298
|object RefinementConstructors {
299
299
| val intVal = new RefinedTypeOps[Int Refined AllOf[GreaterEqual[10] :: LessEqual[15] :: HNil], Int]
@@ -342,9 +342,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
342
342
|final case class RefinedType(listString : List[String] Refined AllOf[MinSize[W.`3`.T] :: MaxSize[W.`3`.T] :: HNil])
343
343
|
344
344
|object RefinedType {
345
- | implicit val customConfig = Configuration.default.withDefaults
346
- | implicit val circeDecoder: Decoder[RefinedType] = deriveDecoder[RefinedType](renaming.snakeCase, true, None)
347
- | implicit val circeEncoder: Encoder[RefinedType] = deriveEncoder[RefinedType](renaming.snakeCase, None)
345
+ | implicit val customConfig = Configuration.default.withDefaults.withSnakeCaseMemberNames.withSnakeCaseConstructorNames
346
+ | implicit val circeDecoder: Decoder[RefinedType] = deriveDecoder[RefinedType]
347
+ | implicit val circeEncoder: Encoder[RefinedType] = deriveEncoder[RefinedType]
348
348
| object RefinementConstructors {
349
349
| val listString = new RefinedTypeOps[List[String] Refined AllOf[MinSize[W.`3`.T] :: MaxSize[W.`3`.T] :: HNil], List[String]]
350
350
| }
@@ -392,9 +392,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
392
392
|final case class RefinedType(nested : Option[String Refined AllOf[MinSize[W.`2`.T] :: MaxSize[W.`2`.T] :: HNil]])
393
393
|
394
394
| object RefinedType {
395
- | implicit val customConfig = Configuration.default.withDefaults
396
- | implicit val circeDecoder: Decoder[RefinedType] = deriveDecoder[RefinedType](renaming.snakeCase, true, None)
397
- | implicit val circeEncoder: Encoder[RefinedType] = deriveEncoder[RefinedType](renaming.snakeCase, None)
395
+ | implicit val customConfig = Configuration.default.withDefaults.withSnakeCaseMemberNames.withSnakeCaseConstructorNames
396
+ | implicit val circeDecoder: Decoder[RefinedType] = deriveDecoder[RefinedType]
397
+ | implicit val circeEncoder: Encoder[RefinedType] = deriveEncoder[RefinedType]
398
398
|
399
399
|
400
400
| object RefinementConstructors {
0 commit comments