@@ -38,9 +38,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
3838 |final case class Person(name: String, age: Int)
3939 |
4040 |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]
4444 |}
4545 """ .stripMargin.trim.parse[Source ]
4646 val tree : Parsed [Source ] = ScalaGenerator .codeGenerator.generateScala(person).parse[Source ]
@@ -69,9 +69,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
6969 |final case class Person()
7070 |
7171 |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]
7575 |}
7676 """ .stripMargin.trim.parse[Source ]
7777 val tree : Parsed [Source ] = ScalaGenerator .codeGenerator.generateScala(person).parse[Source ]
@@ -103,9 +103,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
103103 |final case class Person(name: com.enfore.apis.Name, age: Int)
104104 |
105105 |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]
109109 |}
110110 """ .stripMargin.trim.parse[Source ]
111111 val tree : Parsed [Source ] = ScalaGenerator .codeGenerator.generateScala(person).parse[Source ]
@@ -160,9 +160,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
160160 |final case class Person(name: com.enfore.apis.Name = com.enfore.apis.Name.MAGIC, age: Int)
161161 |
162162 |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]
166166 |}
167167 """ .stripMargin.trim.parse[Source ]
168168 val tree : Parsed [Source ] = ScalaGenerator .codeGenerator.generateScala(person).parse[Source ]
@@ -202,9 +202,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
202202 | listOpVal: List[Option[Double]])
203203 |
204204 | 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]
208208 | }
209209 """ .stripMargin.trim.parse[Source ]
210210 val tree : Parsed [Source ] = ScalaGenerator .codeGenerator.generateScala(paramedType).parse[Source ]
@@ -244,9 +244,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
244244 |final case class RefinedType(stringVal : String Refined AllOf[MinSize[W.`3`.T] :: MaxSize[W.`3`.T] :: HNil])
245245 |
246246 |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]
250250 | object RefinementConstructors {
251251 | val stringVal = new RefinedTypeOps[String Refined AllOf[MinSize[W.`3`.T] :: MaxSize[W.`3`.T] :: HNil], String]
252252 | }
@@ -292,8 +292,8 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
292292 |)
293293 |
294294 |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]
297297 |
298298 |object RefinementConstructors {
299299 | val intVal = new RefinedTypeOps[Int Refined AllOf[GreaterEqual[10] :: LessEqual[15] :: HNil], Int]
@@ -342,9 +342,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
342342 |final case class RefinedType(listString : List[String] Refined AllOf[MinSize[W.`3`.T] :: MaxSize[W.`3`.T] :: HNil])
343343 |
344344 |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]
348348 | object RefinementConstructors {
349349 | val listString = new RefinedTypeOps[List[String] Refined AllOf[MinSize[W.`3`.T] :: MaxSize[W.`3`.T] :: HNil], List[String]]
350350 | }
@@ -392,9 +392,9 @@ class ComponentsTypeReprSpec extends AnyFlatSpec with Matchers {
392392 |final case class RefinedType(nested : Option[String Refined AllOf[MinSize[W.`2`.T] :: MaxSize[W.`2`.T] :: HNil]])
393393 |
394394 | 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]
398398 |
399399 |
400400 | object RefinementConstructors {
0 commit comments