From 7137905d289a21271d8e746805361ba9ccf3d579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=A9lois?= Date: Fri, 1 Mar 2024 15:08:51 +0100 Subject: [PATCH 1/6] Retain the original ordering of fields in schemas --- .../internals/CollisionAvoidance.scala | 1 + .../src/smithy4s/codegen/internals/IR.scala | 4 ++- .../smithy4s/codegen/internals/Renderer.scala | 16 ++++++++--- .../codegen/internals/SmithyToIR.scala | 13 ++++----- .../internals/DefaultRenderModeSpec.scala | 27 ++++++++++++------- .../AwsStandardTypesTransformerSpec.scala | 15 ++++++++--- 6 files changed, 54 insertions(+), 22 deletions(-) diff --git a/modules/codegen/src/smithy4s/codegen/internals/CollisionAvoidance.scala b/modules/codegen/src/smithy4s/codegen/internals/CollisionAvoidance.scala index f3632b204..649641bda 100644 --- a/modules/codegen/src/smithy4s/codegen/internals/CollisionAvoidance.scala +++ b/modules/codegen/src/smithy4s/codegen/internals/CollisionAvoidance.scala @@ -147,6 +147,7 @@ private[internals] object CollisionAvoidance { field.name, modType(field.tpe), field.modifier, + field.originalIndex, field.hints.map(modHint) ) } diff --git a/modules/codegen/src/smithy4s/codegen/internals/IR.scala b/modules/codegen/src/smithy4s/codegen/internals/IR.scala index d1f9cf4a1..9b5e385c0 100644 --- a/modules/codegen/src/smithy4s/codegen/internals/IR.scala +++ b/modules/codegen/src/smithy4s/codegen/internals/IR.scala @@ -132,6 +132,7 @@ private[internals] case class Field( realName: String, tpe: Type, modifier: Field.Modifier, + originalIndex: Int, hints: List[Hint] ) @@ -193,9 +194,10 @@ private[internals] object Field { name: String, tpe: Type, modifier: Modifier, + originalIndex: Int, hints: List[Hint] = Nil ): Field = - Field(name, name, tpe, modifier, hints) + Field(name, name, tpe, modifier, originalIndex, hints) } diff --git a/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala b/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala index 29194cf8a..b840b5d00 100644 --- a/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala +++ b/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala @@ -698,9 +698,19 @@ private[internals] class Renderer(compilationUnit: CompilationUnit) { self => renderProtocol(product.nameRef, hints), newline, renderLenses(product, hints), + locally { + val params = + fields.sortBy(_.originalIndex).map(fieldToRenderLine(_, noDefault = true)).intercalate(Line.comma) + val args = fields.map(f => Line(f.name)).intercalate(Line.comma) + lines( + line"// constructor using the original order from the spec", + line"private def make($params): ${product.nameRef} = ${product.nameRef}($args)" + ).when(fields.nonEmpty) + }, + newline, if (fields.nonEmpty) { val renderedFields = - fields.map { case Field(fieldName, realName, tpe, modifier, hints) => + fields.sortBy(_.originalIndex).map { case Field(fieldName, realName, tpe, modifier, _, hints) => val fieldBuilder = modifier.typeMod match { case Field.TypeModification.None if modifier.required => "required" case Field.TypeModification.None => "field" @@ -727,7 +737,7 @@ private[internals] class Renderer(compilationUnit: CompilationUnit) { self => if (recursive) line"$recursive_($struct_" else line"$struct_" line"${schemaImplicit}val schema: $Schema_[${product.nameRef}] = $definition" .args(renderedFields) - .block(line"${product.nameRef}.apply") + .block(line"make") .appendToLast(".withId(id).addHints(hints)") .appendToLast(if (recursive) ")" else "") } else { @@ -737,7 +747,7 @@ private[internals] class Renderer(compilationUnit: CompilationUnit) { self => line"${schemaImplicit}val schema: $Schema_[${product.nameRef}] = $definition" .args(renderedFields) .block( - line"arr => new ${product.nameRef}".args( + line"arr => make".args( fields.zipWithIndex.map { case (field, idx) => line"arr($idx).asInstanceOf[${Line.fieldType(field)}]" } diff --git a/modules/codegen/src/smithy4s/codegen/internals/SmithyToIR.scala b/modules/codegen/src/smithy4s/codegen/internals/SmithyToIR.scala index f3954b136..08054d5b8 100644 --- a/modules/codegen/src/smithy4s/codegen/internals/SmithyToIR.scala +++ b/modules/codegen/src/smithy4s/codegen/internals/SmithyToIR.scala @@ -1035,12 +1035,13 @@ private[codegen] class SmithyToIR(model: Model, namespace: String) { hintsExtractor(member) ++ default ++ noDefault ) } + .zipWithIndex .collect { - case (name, Some(tpe: Type.ExternalType), modifier, hints) => + case ((name, Some(tpe: Type.ExternalType), modifier, hints), index) => val newHints = hints.filterNot(_ == tpe.refinementHint) - Field(name, tpe, modifier, newHints) - case (name, Some(tpe), modifier, hints) => - Field(name, tpe, modifier, hints) + Field(name, tpe, modifier, index, newHints) + case ((name, Some(tpe), modifier, hints), index) => + Field(name, tpe, modifier, index, hints) } .toList @@ -1234,13 +1235,13 @@ private[codegen] class SmithyToIR(model: Model, namespace: String) { val structFields = struct.getFieldsPlain val fieldNames = struct.getFieldsPlain.map(_.name) val fields: List[TypedNode.FieldTN[NodeAndType]] = structFields.map { - case Field(_, realName, tpe, mod, _) + case Field(_, realName, tpe, mod, _, _) if mod.typeMod == Field.TypeModification.None => val node = map.get(realName).getOrElse { mod.default.get.node } // value or default must be present if type is not wrapped TypedNode.FieldTN.RequiredTN(NodeAndType(node, tpe)) - case Field(_, realName, tpe, _, _) => + case Field(_, realName, tpe, _, _, _) => map.get(realName) match { case Some(node) => TypedNode.FieldTN.OptionalSomeTN(NodeAndType(node, tpe)) diff --git a/modules/codegen/test/src/smithy4s/codegen/internals/DefaultRenderModeSpec.scala b/modules/codegen/test/src/smithy4s/codegen/internals/DefaultRenderModeSpec.scala index 7c5de4302..75651982c 100644 --- a/modules/codegen/test/src/smithy4s/codegen/internals/DefaultRenderModeSpec.scala +++ b/modules/codegen/test/src/smithy4s/codegen/internals/DefaultRenderModeSpec.scala @@ -64,6 +64,9 @@ final class DefaultRenderModeSpec extends munit.FunSuite { | | val hints: Hints = Hints.empty | + | // constructor using the original order from the spec + | private def make(one: Option[String], two: String, three: String, four: String, five: Option[Nullable[String]], six: Nullable[String], seven: Nullable[String], eight: Nullable[String]): Test = Test(one, two, three, four, five, six, seven, eight) + | | implicit val schema: Schema[Test] = struct( | string.optional[Test]("one", _.one), | string.field[Test]("two", _.two).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), @@ -74,7 +77,7 @@ final class DefaultRenderModeSpec extends munit.FunSuite { | string.nullable.field[Test]("seven", _.seven).addHints(smithy.api.Default(smithy4s.Document.nullDoc)), | string.nullable.required[Test]("eight", _.eight), | ){ - | Test.apply + | make | }.withId(id).addHints(hints) |}""".stripMargin @@ -127,17 +130,20 @@ final class DefaultRenderModeSpec extends munit.FunSuite { | | val hints: Hints = Hints.empty | + | // constructor using the original order from the spec + | private def make(one: Option[String], two: String, three: String, four: String, five: Option[Nullable[String]], six: Nullable[String], seven: Nullable[String], eight: Nullable[String]): Test = Test(two, three, four, six, seven, eight, one, five) + | | implicit val schema: Schema[Test] = struct( + | string.optional[Test]("one", _.one), | string.field[Test]("two", _.two).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), | string.required[Test]("three", _.three), | string.required[Test]("four", _.four).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), + | string.nullable.optional[Test]("five", _.five), | string.nullable.field[Test]("six", _.six).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), | string.nullable.field[Test]("seven", _.seven).addHints(smithy.api.Default(smithy4s.Document.nullDoc)), | string.nullable.required[Test]("eight", _.eight), - | string.optional[Test]("one", _.one), - | string.nullable.optional[Test]("five", _.five), | ){ - | Test.apply + | make | }.withId(id).addHints(hints) |}""".stripMargin @@ -192,17 +198,20 @@ final class DefaultRenderModeSpec extends munit.FunSuite { | | val hints: Hints = Hints.empty | + | // constructor using the original order from the spec + | private def make(one: Option[String], two: String, three: String, four: String, five: Option[Nullable[String]], six: Nullable[String], seven: Nullable[String], eight: Nullable[String]): Test = Test(three, eight, two, four, six, seven, one, five) + | | implicit val schema: Schema[Test] = struct( - | string.required[Test]("three", _.three), - | string.nullable.required[Test]("eight", _.eight), + | string.optional[Test]("one", _.one), | string.field[Test]("two", _.two).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), + | string.required[Test]("three", _.three), | string.required[Test]("four", _.four).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), + | string.nullable.optional[Test]("five", _.five), | string.nullable.field[Test]("six", _.six).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), | string.nullable.field[Test]("seven", _.seven).addHints(smithy.api.Default(smithy4s.Document.nullDoc)), - | string.optional[Test]("one", _.one), - | string.nullable.optional[Test]("five", _.five), + | string.nullable.required[Test]("eight", _.eight), | ){ - | Test.apply + | make | }.withId(id).addHints(hints) |} |""".stripMargin diff --git a/modules/codegen/test/src/smithy4s/codegen/transformers/AwsStandardTypesTransformerSpec.scala b/modules/codegen/test/src/smithy4s/codegen/transformers/AwsStandardTypesTransformerSpec.scala index b88f25d17..ec5ee9db8 100644 --- a/modules/codegen/test/src/smithy4s/codegen/transformers/AwsStandardTypesTransformerSpec.scala +++ b/modules/codegen/test/src/smithy4s/codegen/transformers/AwsStandardTypesTransformerSpec.scala @@ -87,12 +87,15 @@ final class AwsStandardTypesTransformerSpec extends munit.FunSuite { | | val hints: Hints = Hints.empty | + | // constructor using the original order from the spec + | private def make(i: Int, d: Option[Date], l: Option[Long]): TestStructure = TestStructure(i, d, l) + | | implicit val schema: Schema[TestStructure] = struct( | int.required[TestStructure]("i", _.i), | Date.schema.optional[TestStructure]("d", _.d), | Long.schema.optional[TestStructure]("l", _.l), | ){ - | TestStructure.apply + | make | }.withId(id).addHints(hints) |}""".stripMargin ) @@ -149,10 +152,13 @@ final class AwsStandardTypesTransformerSpec extends munit.FunSuite { | | val hints: Hints = Hints.empty | + | // constructor using the original order from the spec + | private def make(s: Option[String]): TestStructure = TestStructure(s) + | | implicit val schema: Schema[TestStructure] = struct( | string.validated(smithy.api.Length(min = Some(5L), max = Some(10L))).optional[TestStructure]("s", _.s), | ){ - | TestStructure.apply + | make | }.withId(id).addHints(hints) |}""".stripMargin ) @@ -211,10 +217,13 @@ final class AwsStandardTypesTransformerSpec extends munit.FunSuite { | | val hints: Hints = Hints.empty | + | // constructor using the original order from the spec + | private def make(i: Int): TestStructure = TestStructure(i) + | | implicit val schema: Schema[TestStructure] = struct( | int.field[TestStructure]("i", _.i).addHints(smithy.api.Default(smithy4s.Document.fromDouble(5.0d))), | ){ - | TestStructure.apply + | make | }.withId(id).addHints(hints) |}""".stripMargin ) From e8bd02789af2f80e65fc8168d8aba4c94244d4c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=A9lois?= Date: Fri, 1 Mar 2024 15:25:40 +0100 Subject: [PATCH 2/6] Regenerated bootstrapped --- .../amazonaws/dynamodb/DescribeEndpointsRequest.scala | 1 + .../dynamodb/DescribeEndpointsResponse.scala | 5 ++++- .../generated/com/amazonaws/dynamodb/Endpoint.scala | 5 ++++- .../com/amazonaws/dynamodb/InternalServerError.scala | 5 ++++- .../amazonaws/dynamodb/InvalidEndpointException.scala | 5 ++++- .../com/amazonaws/dynamodb/ListTablesInput.scala | 5 ++++- .../com/amazonaws/dynamodb/ListTablesOutput.scala | 5 ++++- .../src/generated/smithy4s/benchmark/Attributes.scala | 5 ++++- .../smithy4s/benchmark/CreateObjectInput.scala | 5 ++++- .../src/generated/smithy4s/benchmark/Creds.scala | 5 ++++- .../src/generated/smithy4s/benchmark/Encryption.scala | 5 ++++- .../smithy4s/benchmark/EncryptionMetadata.scala | 5 ++++- .../src/generated/smithy4s/benchmark/Metadata.scala | 5 ++++- .../src/generated/smithy4s/benchmark/Permission.scala | 5 ++++- .../src/generated/smithy4s/benchmark/S3Object.scala | 5 ++++- .../smithy4s/benchmark/SendStringInput.scala | 5 ++++- .../src/generated/smithy4s/example/AStructure.scala | 5 ++++- .../generated/smithy4s/example/AddBrandsInput.scala | 5 ++++- .../smithy4s/example/AddMenuItemRequest.scala | 5 ++++- .../smithy4s/example/AddMenuItemResult.scala | 5 ++++- .../src/generated/smithy4s/example/AgeFormat.scala | 1 + .../smithy4s/example/ArbitraryDataTest.scala | 1 + .../src/generated/smithy4s/example/BigStruct.scala | 5 ++++- .../src/generated/smithy4s/example/Candy.scala | 5 ++++- .../generated/smithy4s/example/CityCoordinates.scala | 5 ++++- .../src/generated/smithy4s/example/CitySummary.scala | 5 ++++- .../src/generated/smithy4s/example/ClientError.scala | 5 ++++- .../generated/smithy4s/example/CustomCodeInput.scala | 5 ++++- .../generated/smithy4s/example/CustomCodeOutput.scala | 5 ++++- .../smithy4s/example/DefaultInMixinUsageTest.scala | 5 ++++- .../smithy4s/example/DefaultOrderingTest.scala | 7 +++++-- .../src/generated/smithy4s/example/DefaultTest.scala | 5 ++++- .../generated/smithy4s/example/DefaultVariants.scala | 7 +++++-- .../smithy4s/example/DeprecatedStructure.scala | 5 ++++- .../generated/smithy4s/example/DeprecatedUnion.scala | 2 ++ .../src/generated/smithy4s/example/DocTest.scala | 1 + .../smithy4s/example/DocumentationComment.scala | 5 ++++- .../smithy4s/example/EHFallbackClientError.scala | 5 ++++- .../smithy4s/example/EHFallbackServerError.scala | 5 ++++- .../src/generated/smithy4s/example/EHNotFound.scala | 5 ++++- .../smithy4s/example/EHServiceUnavailable.scala | 5 ++++- .../src/generated/smithy4s/example/EchoBody.scala | 5 ++++- .../src/generated/smithy4s/example/EchoInput.scala | 7 +++++-- .../src/generated/smithy4s/example/EnvVarString.scala | 5 ++++- .../smithy4s/example/ErrorCustomTypeMessage.scala | 5 ++++- .../example/ErrorCustomTypeRequiredMessage.scala | 5 ++++- .../example/ErrorHandlingOperationInput.scala | 5 ++++- .../example/ErrorHandlingOperationOutput.scala | 5 ++++- .../example/ErrorNullableCustomTypeMessage.scala | 5 ++++- .../ErrorNullableCustomTypeRequiredMessage.scala | 5 ++++- .../smithy4s/example/ErrorNullableMessage.scala | 5 ++++- .../example/ErrorNullableRequiredMessage.scala | 5 ++++- .../smithy4s/example/ErrorRequiredMessage.scala | 5 ++++- .../smithy4s/example/ExtraErrorOperationInput.scala | 5 ++++- .../generated/smithy4s/example/FallbackError.scala | 5 ++++- .../generated/smithy4s/example/FallbackError2.scala | 5 ++++- .../generated/smithy4s/example/FancyListFormat.scala | 1 + .../src/generated/smithy4s/example/Four.scala | 5 ++++- .../smithy4s/example/GenericClientError.scala | 5 ++++- .../smithy4s/example/GenericServerError.scala | 5 ++++- .../src/generated/smithy4s/example/GetCityInput.scala | 5 ++++- .../generated/smithy4s/example/GetCityOutput.scala | 5 ++++- .../smithy4s/example/GetCurrentTimeOutput.scala | 5 ++++- .../src/generated/smithy4s/example/GetEnumInput.scala | 5 ++++- .../generated/smithy4s/example/GetEnumOutput.scala | 5 ++++- .../src/generated/smithy4s/example/GetFooOutput.scala | 5 ++++- .../generated/smithy4s/example/GetForecastInput.scala | 5 ++++- .../smithy4s/example/GetForecastOutput.scala | 5 ++++- .../generated/smithy4s/example/GetIntEnumInput.scala | 5 ++++- .../generated/smithy4s/example/GetIntEnumOutput.scala | 5 ++++- .../generated/smithy4s/example/GetMenuRequest.scala | 5 ++++- .../generated/smithy4s/example/GetMenuResult.scala | 5 ++++- .../generated/smithy4s/example/GetObjectInput.scala | 5 ++++- .../generated/smithy4s/example/GetObjectOutput.scala | 5 ++++- .../smithy4s/example/GetStreamedObjectInput.scala | 5 ++++- .../smithy4s/example/GetStreamedObjectOutput.scala | 1 + .../src/generated/smithy4s/example/Hash.scala | 1 + .../smithy4s/example/HeadRequestOutput.scala | 5 ++++- .../smithy4s/example/HeaderEndpointData.scala | 5 ++++- .../generated/smithy4s/example/HeadersStruct.scala | 5 ++++- .../smithy4s/example/HeadersWithDefaults.scala | 5 ++++- .../generated/smithy4s/example/HealthRequest.scala | 5 ++++- .../generated/smithy4s/example/HealthResponse.scala | 5 ++++- .../generated/smithy4s/example/HostLabelInput.scala | 5 ++++- .../src/generated/smithy4s/example/IntList.scala | 5 ++++- .../src/generated/smithy4s/example/Key.scala | 5 ++++- .../generated/smithy4s/example/KeyNotFoundError.scala | 5 ++++- .../src/generated/smithy4s/example/KeyValue.scala | 5 ++++- .../generated/smithy4s/example/ListCitiesInput.scala | 5 ++++- .../generated/smithy4s/example/ListCitiesOutput.scala | 7 +++++-- .../smithy4s/example/ListPublishersOutput.scala | 5 ++++- .../src/generated/smithy4s/example/MenuItem.scala | 5 ++++- .../smithy4s/example/MixinErrorExample.scala | 5 ++++- .../src/generated/smithy4s/example/MixinExample.scala | 5 ++++- .../example/MixinOptionalMemberDefaultAdded.scala | 5 ++++- .../example/MixinOptionalMemberOverride.scala | 5 ++++- .../src/generated/smithy4s/example/MovieTheater.scala | 5 ++++- .../src/generated/smithy4s/example/MyOpError.scala | 1 + .../src/generated/smithy4s/example/NameFormat.scala | 1 + .../src/generated/smithy4s/example/NoMoreSpace.scala | 5 ++++- .../generated/smithy4s/example/NoSuchResource.scala | 5 ++++- .../smithy4s/example/NonEmptyListFormat.scala | 1 + .../smithy4s/example/NonEmptyMapFormat.scala | 1 + .../generated/smithy4s/example/NotFoundError.scala | 5 ++++- .../src/generated/smithy4s/example/Numeric.scala | 5 ++++- .../src/generated/smithy4s/example/One.scala | 5 ++++- .../generated/smithy4s/example/OperationInput.scala | 11 +++++++---- .../generated/smithy4s/example/OperationOutput.scala | 9 ++++++--- .../generated/smithy4s/example/OpticsStructure.scala | 5 ++++- .../smithy4s/example/OptionalOutputOutput.scala | 5 ++++- .../src/generated/smithy4s/example/OrderType.scala | 5 ++++- .../src/generated/smithy4s/example/PackedInput.scala | 5 ++++- .../src/generated/smithy4s/example/Patchable.scala | 5 ++++- .../smithy4s/example/PatchableEdgeCases.scala | 5 ++++- .../src/generated/smithy4s/example/PathParams.scala | 5 ++++- .../src/generated/smithy4s/example/PayloadData.scala | 5 ++++- .../src/generated/smithy4s/example/Pizza.scala | 5 ++++- .../src/generated/smithy4s/example/Podcast.scala | 10 ++++++++-- .../src/generated/smithy4s/example/PriceError.scala | 5 ++++- .../src/generated/smithy4s/example/Product.scala | 1 + .../generated/smithy4s/example/PutObjectInput.scala | 7 +++++-- .../smithy4s/example/PutStreamedObjectInput.scala | 5 ++++- .../src/generated/smithy4s/example/Queries.scala | 5 ++++- .../smithy4s/example/QueriesWithDefaults.scala | 5 ++++- .../smithy4s/example/RandomOtherClientError.scala | 5 ++++- .../example/RandomOtherClientErrorWithCode.scala | 5 ++++- .../smithy4s/example/RandomOtherServerError.scala | 5 ++++- .../example/RandomOtherServerErrorWithCode.scala | 5 ++++- .../src/generated/smithy4s/example/RangeCheck.scala | 5 ++++- .../generated/smithy4s/example/RecursiveInput.scala | 5 ++++- .../smithy4s/example/RecursiveTraitStructure.scala | 5 ++++- .../generated/smithy4s/example/ReservationInput.scala | 5 ++++- .../smithy4s/example/ReservationOutput.scala | 5 ++++- .../generated/smithy4s/example/RoundTripData.scala | 5 ++++- .../src/generated/smithy4s/example/Salad.scala | 5 ++++- .../src/generated/smithy4s/example/Serializable.scala | 1 + .../src/generated/smithy4s/example/ServerError.scala | 5 ++++- .../smithy4s/example/ServerErrorCustomMessage.scala | 5 ++++- .../generated/smithy4s/example/SomeCollections.scala | 5 ++++- .../smithy4s/example/StructureConstrainingEnum.scala | 5 ++++- .../smithy4s/example/StructureWithRefinedMember.scala | 5 ++++- .../smithy4s/example/StructureWithRefinedTypes.scala | 5 ++++- .../src/generated/smithy4s/example/TestAdt.scala | 10 ++++++++-- .../src/generated/smithy4s/example/TestBody.scala | 5 ++++- .../smithy4s/example/TestDiscriminatedInput.scala | 5 ++++- .../smithy4s/example/TestDiscriminatedOutput.scala | 5 ++++- .../generated/smithy4s/example/TestEmptyMixin.scala | 5 ++++- .../src/generated/smithy4s/example/TestIdRef.scala | 5 ++++- .../src/generated/smithy4s/example/TestInput.scala | 7 +++++-- .../src/generated/smithy4s/example/TestMixinAdt.scala | 5 ++++- .../smithy4s/example/TestStructurePatternTarget.scala | 5 ++++- .../src/generated/smithy4s/example/TestTrait.scala | 5 ++++- .../src/generated/smithy4s/example/Three.scala | 5 ++++- .../src/generated/smithy4s/example/Two.scala | 5 ++++- .../smithy4s/example/UnauthorizedError.scala | 5 ++++- .../smithy4s/example/UnknownServerError.scala | 5 ++++- .../generated/smithy4s/example/ValidationChecks.scala | 5 ++++- .../src/generated/smithy4s/example/Value.scala | 5 ++++- .../generated/smithy4s/example/VersionOutput.scala | 5 ++++- .../smithy4s/example/collision/ListInput.scala | 5 ++++- .../smithy4s/example/collision/MapInput.scala | 5 ++++- .../smithy4s/example/collision/OptionInput.scala | 5 ++++- .../smithy4s/example/collision/Packagee.scala | 5 ++++- .../collision/ReservedKeywordStructTrait.scala | 5 ++++- .../collision/ReservedKeywordTraitExampleStruct.scala | 5 ++++- .../example/collision/Scala3ReservedKeywords.scala | 5 ++++- .../smithy4s/example/collision/SetInput.scala | 5 ++++- .../collision/TestReservedNamespaceImport.scala | 5 ++++- .../smithy4s/example/error/NotFoundError.scala | 5 ++++- .../generated/smithy4s/example/greet/GreetInput.scala | 5 ++++- .../smithy4s/example/greet/GreetOutput.scala | 5 ++++- .../example/guides/auth/HealthCheckOutput.scala | 5 ++++- .../example/guides/auth/NotAuthorizedError.scala | 5 ++++- .../smithy4s/example/guides/auth/World.scala | 5 ++++- .../smithy4s/example/guides/hello/World.scala | 5 ++++- .../smithy4s/example/hello/GenericServerError.scala | 5 ++++- .../generated/smithy4s/example/hello/Greeting.scala | 5 ++++- .../src/generated/smithy4s/example/hello/Person.scala | 5 ++++- .../smithy4s/example/hello/SpecificServerError.scala | 5 ++++- .../smithy4s/example/import_test/OpOutput.scala | 5 ++++- .../example/product/ExampleOperationInput.scala | 5 ++++- .../example/product/ExampleOperationOutput.scala | 5 ++++- .../smithy4s/example/reservedNameOverride/Set.scala | 5 ++++- .../example/reservedNameOverride/SetOpInput.scala | 5 ++++- .../smithy4s/example/test/ComplexError.scala | 5 ++++- .../smithy4s/example/test/ErrorDetails.scala | 5 ++++- .../generated/smithy4s/example/test/HelloInput.scala | 5 ++++- .../generated/smithy4s/example/test/HelloOutput.scala | 5 ++++- .../smithy4s/example/test/SayHelloInput.scala | 5 ++++- .../smithy4s/example/test/SayHelloOutput.scala | 5 ++++- .../smithy4s/example/test/SayHelloPayload.scala | 5 ++++- .../generated/smithy4s/example/test/SimpleError.scala | 5 ++++- .../smithy4s/example/test/TestPathInput.scala | 5 ++++- modules/bootstrapped/src/generated/weather/Dog.scala | 5 ++++- .../src/generated/weather/GetWeatherInput.scala | 5 ++++- .../src/generated/weather/GetWeatherOutput.scala | 5 ++++- 196 files changed, 762 insertions(+), 195 deletions(-) diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsRequest.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsRequest.scala index 077c9500d..5f7fa09f8 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsRequest.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsRequest.scala @@ -13,5 +13,6 @@ object DescribeEndpointsRequest extends ShapeTag.Companion[DescribeEndpointsRequ val hints: Hints = Hints.empty + implicit val schema: Schema[DescribeEndpointsRequest] = constant(DescribeEndpointsRequest()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsResponse.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsResponse.scala index 55a255936..f1a0a33d7 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsResponse.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsResponse.scala @@ -16,9 +16,12 @@ object DescribeEndpointsResponse extends ShapeTag.Companion[DescribeEndpointsRes val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(endpoints: List[Endpoint]): DescribeEndpointsResponse = DescribeEndpointsResponse(endpoints) + implicit val schema: Schema[DescribeEndpointsResponse] = struct( Endpoints.underlyingSchema.required[DescribeEndpointsResponse]("Endpoints", _.endpoints).addHints(smithy.api.Documentation("

List of endpoints.

")), ){ - DescribeEndpointsResponse.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/Endpoint.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/Endpoint.scala index 42b407cfe..66f4c95c4 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/Endpoint.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/Endpoint.scala @@ -23,10 +23,13 @@ object Endpoint extends ShapeTag.Companion[Endpoint] { smithy.api.Documentation("

An endpoint information details.

"), ).lazily + // constructor using the original order from the spec + private def make(address: String, cachePeriodInMinutes: Long): Endpoint = Endpoint(address, cachePeriodInMinutes) + implicit val schema: Schema[Endpoint] = struct( string.required[Endpoint]("Address", _.address).addHints(smithy.api.Documentation("

IP address of the endpoint.

")), long.required[Endpoint]("CachePeriodInMinutes", _.cachePeriodInMinutes).addHints(smithy.api.Default(smithy4s.Document.fromDouble(0.0d)), smithy.api.Documentation("

Endpoint cache time to live (TTL) value.

")), ){ - Endpoint.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InternalServerError.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InternalServerError.scala index 86a233328..03e004357 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InternalServerError.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InternalServerError.scala @@ -23,9 +23,12 @@ object InternalServerError extends ShapeTag.Companion[InternalServerError] { smithy.api.Error.SERVER.widen, ).lazily + // constructor using the original order from the spec + private def make(message: Option[ErrorMessage]): InternalServerError = InternalServerError(message) + implicit val schema: Schema[InternalServerError] = struct( ErrorMessage.schema.optional[InternalServerError]("message", _.message).addHints(smithy.api.Documentation("

The server encountered an internal error trying to fulfill the request.

")), ){ - InternalServerError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InvalidEndpointException.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InvalidEndpointException.scala index dfc430f31..b58732c38 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InvalidEndpointException.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InvalidEndpointException.scala @@ -20,9 +20,12 @@ object InvalidEndpointException extends ShapeTag.Companion[InvalidEndpointExcept smithy.api.HttpError(421), ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): InvalidEndpointException = InvalidEndpointException(message) + implicit val schema: Schema[InvalidEndpointException] = struct( string.optional[InvalidEndpointException]("Message", _.message), ){ - InvalidEndpointException.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesInput.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesInput.scala index 1c9e6578d..2522ac228 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesInput.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesInput.scala @@ -23,10 +23,13 @@ object ListTablesInput extends ShapeTag.Companion[ListTablesInput] { smithy.api.Documentation("

Represents the input of a ListTables operation.

"), ).lazily + // constructor using the original order from the spec + private def make(exclusiveStartTableName: Option[TableName], limit: Option[ListTablesInputLimit]): ListTablesInput = ListTablesInput(exclusiveStartTableName, limit) + implicit val schema: Schema[ListTablesInput] = struct( TableName.schema.optional[ListTablesInput]("ExclusiveStartTableName", _.exclusiveStartTableName).addHints(smithy.api.Documentation("

The first table name that this operation will evaluate. Use the value that was returned for\n LastEvaluatedTableName in a previous operation, so that you can obtain the next page\n of results.

")), ListTablesInputLimit.schema.optional[ListTablesInput]("Limit", _.limit).addHints(smithy.api.Documentation("

A maximum number of table names to return. If this parameter is not specified, the limit is 100.

")), ){ - ListTablesInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesOutput.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesOutput.scala index 74745fa34..d91fcd3b8 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesOutput.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesOutput.scala @@ -28,10 +28,13 @@ object ListTablesOutput extends ShapeTag.Companion[ListTablesOutput] { smithy.api.Documentation("

Represents the output of a ListTables operation.

"), ).lazily + // constructor using the original order from the spec + private def make(tableNames: Option[List[TableName]], lastEvaluatedTableName: Option[TableName]): ListTablesOutput = ListTablesOutput(tableNames, lastEvaluatedTableName) + implicit val schema: Schema[ListTablesOutput] = struct( TableNameList.underlyingSchema.optional[ListTablesOutput]("TableNames", _.tableNames).addHints(smithy.api.Documentation("

The names of the tables associated with the current account at the current endpoint. The maximum size of this array is 100.

\n

If LastEvaluatedTableName also appears in the output, you can use this value as the\n ExclusiveStartTableName parameter in a subsequent ListTables request and\n obtain the next page of results.

")), TableName.schema.optional[ListTablesOutput]("LastEvaluatedTableName", _.lastEvaluatedTableName).addHints(smithy.api.Documentation("

The name of the last table in the current page of results. Use this value as the\n ExclusiveStartTableName in a new request to obtain the next page of results, until\n all the table names are returned.

\n

If you do not receive a LastEvaluatedTableName value in the response, this means that\n there are no more table names to be retrieved.

")), ){ - ListTablesOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/Attributes.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/Attributes.scala index 9dc1ec9dc..74a00febc 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/Attributes.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/Attributes.scala @@ -18,6 +18,9 @@ object Attributes extends ShapeTag.Companion[Attributes] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(user: String, public: Boolean, size: Long, creationDate: Timestamp, region: String, queryable: Option[Boolean], queryableLastChange: Option[Timestamp], blockPublicAccess: Option[Boolean], permissions: Option[List[Permission]], tags: Option[List[String]], backedUp: Option[Boolean], metadata: Option[List[Metadata]], encryption: Option[Encryption]): Attributes = Attributes(user, public, size, creationDate, region, queryable, queryableLastChange, blockPublicAccess, permissions, tags, backedUp, metadata, encryption) + implicit val schema: Schema[Attributes] = struct( string.required[Attributes]("user", _.user), boolean.required[Attributes]("public", _.public), @@ -33,6 +36,6 @@ object Attributes extends ShapeTag.Companion[Attributes] { ListMetadata.underlyingSchema.optional[Attributes]("metadata", _.metadata), Encryption.schema.optional[Attributes]("encryption", _.encryption), ){ - Attributes.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/CreateObjectInput.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/CreateObjectInput.scala index f03a707c2..33d590048 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/CreateObjectInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/CreateObjectInput.scala @@ -14,11 +14,14 @@ object CreateObjectInput extends ShapeTag.Companion[CreateObjectInput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(key: String, bucketName: String, payload: S3Object): CreateObjectInput = CreateObjectInput(key, bucketName, payload) + implicit val schema: Schema[CreateObjectInput] = struct( string.required[CreateObjectInput]("key", _.key).addHints(smithy.api.HttpLabel()), string.required[CreateObjectInput]("bucketName", _.bucketName).addHints(smithy.api.HttpLabel()), S3Object.schema.required[CreateObjectInput]("payload", _.payload).addHints(smithy.api.HttpPayload()), ){ - CreateObjectInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/Creds.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/Creds.scala index d854dbde0..4418e09e1 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/Creds.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/Creds.scala @@ -14,10 +14,13 @@ object Creds extends ShapeTag.Companion[Creds] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(user: Option[String], key: Option[String]): Creds = Creds(user, key) + implicit val schema: Schema[Creds] = struct( string.optional[Creds]("user", _.user), string.optional[Creds]("key", _.key), ){ - Creds.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/Encryption.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/Encryption.scala index 773c9fbd1..64189ebf8 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/Encryption.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/Encryption.scala @@ -16,11 +16,14 @@ object Encryption extends ShapeTag.Companion[Encryption] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(user: Option[String], date: Option[Timestamp], metadata: Option[EncryptionMetadata]): Encryption = Encryption(user, date, metadata) + implicit val schema: Schema[Encryption] = struct( string.optional[Encryption]("user", _.user), timestamp.optional[Encryption]("date", _.date).addHints(smithy.api.TimestampFormat.EPOCH_SECONDS.widen), EncryptionMetadata.schema.optional[Encryption]("metadata", _.metadata), ){ - Encryption.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/EncryptionMetadata.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/EncryptionMetadata.scala index b6dd56750..e2b7931b2 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/EncryptionMetadata.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/EncryptionMetadata.scala @@ -15,11 +15,14 @@ object EncryptionMetadata extends ShapeTag.Companion[EncryptionMetadata] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(system: Option[String], credentials: Option[Creds], partial: Option[Boolean]): EncryptionMetadata = EncryptionMetadata(system, credentials, partial) + implicit val schema: Schema[EncryptionMetadata] = struct( string.optional[EncryptionMetadata]("system", _.system), Creds.schema.optional[EncryptionMetadata]("credentials", _.credentials), boolean.optional[EncryptionMetadata]("partial", _.partial), ){ - EncryptionMetadata.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/Metadata.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/Metadata.scala index 7e9a46221..75c62534c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/Metadata.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/Metadata.scala @@ -17,6 +17,9 @@ object Metadata extends ShapeTag.Companion[Metadata] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(contentType: Option[String], lastModified: Option[Timestamp], checkSum: Option[String], pendingDeletion: Option[Boolean], etag: Option[String]): Metadata = Metadata(contentType, lastModified, checkSum, pendingDeletion, etag) + implicit val schema: Schema[Metadata] = struct( string.optional[Metadata]("contentType", _.contentType), timestamp.optional[Metadata]("lastModified", _.lastModified).addHints(smithy.api.TimestampFormat.EPOCH_SECONDS.widen), @@ -24,6 +27,6 @@ object Metadata extends ShapeTag.Companion[Metadata] { boolean.optional[Metadata]("pendingDeletion", _.pendingDeletion), string.optional[Metadata]("etag", _.etag), ){ - Metadata.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/Permission.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/Permission.scala index 86c33aae0..b69135c2c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/Permission.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/Permission.scala @@ -14,11 +14,14 @@ object Permission extends ShapeTag.Companion[Permission] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(read: Option[Boolean], write: Option[Boolean], directory: Option[Boolean]): Permission = Permission(read, write, directory) + implicit val schema: Schema[Permission] = struct( boolean.optional[Permission]("read", _.read), boolean.optional[Permission]("write", _.write), boolean.optional[Permission]("directory", _.directory), ){ - Permission.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/S3Object.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/S3Object.scala index d675aad1e..595ea5937 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/S3Object.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/S3Object.scala @@ -16,12 +16,15 @@ object S3Object extends ShapeTag.Companion[S3Object] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(id: String, owner: String, attributes: Attributes, data: Blob): S3Object = S3Object(id, owner, attributes, data) + implicit val schema: Schema[S3Object] = struct( string.required[S3Object]("id", _.id), string.required[S3Object]("owner", _.owner), Attributes.schema.required[S3Object]("attributes", _.attributes), bytes.required[S3Object]("data", _.data), ){ - S3Object.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/SendStringInput.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/SendStringInput.scala index a66e17a97..9667d7d04 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/SendStringInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/SendStringInput.scala @@ -14,11 +14,14 @@ object SendStringInput extends ShapeTag.Companion[SendStringInput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(key: String, bucketName: String, body: String): SendStringInput = SendStringInput(key, bucketName, body) + implicit val schema: Schema[SendStringInput] = struct( string.required[SendStringInput]("key", _.key).addHints(smithy.api.HttpLabel()), string.required[SendStringInput]("bucketName", _.bucketName).addHints(smithy.api.HttpLabel()), string.required[SendStringInput]("body", _.body).addHints(smithy.api.HttpPayload()), ){ - SendStringInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/AStructure.scala b/modules/bootstrapped/src/generated/smithy4s/example/AStructure.scala index f62bc3298..aa00b0243 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/AStructure.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/AStructure.scala @@ -16,9 +16,12 @@ object AStructure extends ShapeTag.Companion[AStructure] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(astring: AString): AStructure = AStructure(astring) + implicit val schema: Schema[AStructure] = struct( AString.schema.field[AStructure]("astring", _.astring).addHints(smithy.api.Default(smithy4s.Document.fromString("\"Hello World\" with \"quotes\""))), ){ - AStructure.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/AddBrandsInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/AddBrandsInput.scala index bd005c8b3..88947a2be 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/AddBrandsInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/AddBrandsInput.scala @@ -14,9 +14,12 @@ object AddBrandsInput extends ShapeTag.Companion[AddBrandsInput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(brands: Option[List[String]]): AddBrandsInput = AddBrandsInput(brands) + implicit val schema: Schema[AddBrandsInput] = struct( BrandList.underlyingSchema.optional[AddBrandsInput]("brands", _.brands), ){ - AddBrandsInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemRequest.scala b/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemRequest.scala index 3f1a20cb2..21587377e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemRequest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemRequest.scala @@ -14,10 +14,13 @@ object AddMenuItemRequest extends ShapeTag.Companion[AddMenuItemRequest] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(restaurant: String, menuItem: MenuItem): AddMenuItemRequest = AddMenuItemRequest(restaurant, menuItem) + implicit val schema: Schema[AddMenuItemRequest] = struct( string.required[AddMenuItemRequest]("restaurant", _.restaurant).addHints(smithy.api.HttpLabel()), MenuItem.schema.required[AddMenuItemRequest]("menuItem", _.menuItem).addHints(smithy.api.HttpPayload()), ){ - AddMenuItemRequest.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemResult.scala b/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemResult.scala index 6cf0d7d8e..5b9f18fff 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemResult.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemResult.scala @@ -16,10 +16,13 @@ object AddMenuItemResult extends ShapeTag.Companion[AddMenuItemResult] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(itemId: String, added: Timestamp): AddMenuItemResult = AddMenuItemResult(itemId, added) + implicit val schema: Schema[AddMenuItemResult] = struct( string.required[AddMenuItemResult]("itemId", _.itemId).addHints(smithy.api.HttpPayload()), timestamp.required[AddMenuItemResult]("added", _.added).addHints(smithy.api.TimestampFormat.EPOCH_SECONDS.widen, smithy.api.HttpHeader("X-ADDED-AT")), ){ - AddMenuItemResult.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/AgeFormat.scala b/modules/bootstrapped/src/generated/smithy4s/example/AgeFormat.scala index 5c0200bf5..b2f5e6b25 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/AgeFormat.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/AgeFormat.scala @@ -15,5 +15,6 @@ object AgeFormat extends ShapeTag.Companion[AgeFormat] { smithy.api.Trait(selector = Some(":test(integer, member > integer)"), structurallyExclusive = None, conflicts = None, breakingChanges = None), ).lazily + implicit val schema: Schema[AgeFormat] = constant(AgeFormat()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ArbitraryDataTest.scala b/modules/bootstrapped/src/generated/smithy4s/example/ArbitraryDataTest.scala index 522fde046..2da65aa3b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ArbitraryDataTest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ArbitraryDataTest.scala @@ -15,5 +15,6 @@ object ArbitraryDataTest extends ShapeTag.Companion[ArbitraryDataTest] { smithy4s.example.ArbitraryData(smithy4s.Document.obj("str" -> smithy4s.Document.fromString("hello"), "int" -> smithy4s.Document.fromDouble(1.0d), "bool" -> smithy4s.Document.fromBoolean(true), "arr" -> smithy4s.Document.array(smithy4s.Document.fromString("one"), smithy4s.Document.fromString("two"), smithy4s.Document.fromString("three")), "obj" -> smithy4s.Document.obj("str" -> smithy4s.Document.fromString("s"), "i" -> smithy4s.Document.fromDouble(1.0d)))), ).lazily + implicit val schema: Schema[ArbitraryDataTest] = constant(ArbitraryDataTest()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/BigStruct.scala b/modules/bootstrapped/src/generated/smithy4s/example/BigStruct.scala index 3b7a87cee..9b1da71ca 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/BigStruct.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/BigStruct.scala @@ -14,6 +14,9 @@ object BigStruct extends ShapeTag.Companion[BigStruct] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int, a7: Int, a8: Int, a9: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, a16: Int, a17: Int, a18: Int, a19: Int, a20: Int, a21: Int, a22: Int, a23: Int): BigStruct = BigStruct(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23) + implicit val schema: Schema[BigStruct] = struct.genericArity( int.required[BigStruct]("a1", _.a1), int.required[BigStruct]("a2", _.a2), @@ -39,7 +42,7 @@ object BigStruct extends ShapeTag.Companion[BigStruct] { int.required[BigStruct]("a22", _.a22), int.required[BigStruct]("a23", _.a23), ){ - arr => new BigStruct( + arr => make( arr(0).asInstanceOf[Int], arr(1).asInstanceOf[Int], arr(2).asInstanceOf[Int], diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Candy.scala b/modules/bootstrapped/src/generated/smithy4s/example/Candy.scala index 4c4ab160a..202a29a28 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Candy.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Candy.scala @@ -14,9 +14,12 @@ object Candy extends ShapeTag.Companion[Candy] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(name: Option[String]): Candy = Candy(name) + implicit val schema: Schema[Candy] = struct( string.optional[Candy]("name", _.name), ){ - Candy.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/CityCoordinates.scala b/modules/bootstrapped/src/generated/smithy4s/example/CityCoordinates.scala index 43409f4d7..35426521c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/CityCoordinates.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/CityCoordinates.scala @@ -14,10 +14,13 @@ object CityCoordinates extends ShapeTag.Companion[CityCoordinates] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(latitude: Float, longitude: Float): CityCoordinates = CityCoordinates(latitude, longitude) + implicit val schema: Schema[CityCoordinates] = struct( float.required[CityCoordinates]("latitude", _.latitude), float.required[CityCoordinates]("longitude", _.longitude), ){ - CityCoordinates.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/CitySummary.scala b/modules/bootstrapped/src/generated/smithy4s/example/CitySummary.scala index fac0553d8..710780f75 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/CitySummary.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/CitySummary.scala @@ -16,10 +16,13 @@ object CitySummary extends ShapeTag.Companion[CitySummary] { smithy.api.References(List(smithy.api.Reference(resource = smithy.api.NonEmptyString("smithy4s.example#City"), ids = None, service = None, rel = None))), ).lazily + // constructor using the original order from the spec + private def make(cityId: CityId, name: String): CitySummary = CitySummary(cityId, name) + implicit val schema: Schema[CitySummary] = struct( CityId.schema.required[CitySummary]("cityId", _.cityId), string.required[CitySummary]("name", _.name), ){ - CitySummary.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ClientError.scala b/modules/bootstrapped/src/generated/smithy4s/example/ClientError.scala index d72af23ce..d6d53dc57 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ClientError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ClientError.scala @@ -19,10 +19,13 @@ object ClientError extends ShapeTag.Companion[ClientError] { smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(code: Int, details: String): ClientError = ClientError(code, details) + implicit val schema: Schema[ClientError] = struct( int.required[ClientError]("code", _.code), string.required[ClientError]("details", _.details), ){ - ClientError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeInput.scala index 188b367d3..eca90764f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeInput.scala @@ -14,9 +14,12 @@ object CustomCodeInput extends ShapeTag.Companion[CustomCodeInput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(code: Int): CustomCodeInput = CustomCodeInput(code) + implicit val schema: Schema[CustomCodeInput] = struct( int.required[CustomCodeInput]("code", _.code).addHints(smithy.api.HttpLabel()), ){ - CustomCodeInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeOutput.scala index 11a96ca7e..b8f9d7ea8 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeOutput.scala @@ -14,9 +14,12 @@ object CustomCodeOutput extends ShapeTag.Companion[CustomCodeOutput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(code: Option[Int]): CustomCodeOutput = CustomCodeOutput(code) + implicit val schema: Schema[CustomCodeOutput] = struct( int.optional[CustomCodeOutput]("code", _.code).addHints(smithy.api.HttpResponseCode()), ){ - CustomCodeOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DefaultInMixinUsageTest.scala b/modules/bootstrapped/src/generated/smithy4s/example/DefaultInMixinUsageTest.scala index c22d932ca..5a259b153 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DefaultInMixinUsageTest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DefaultInMixinUsageTest.scala @@ -14,9 +14,12 @@ object DefaultInMixinUsageTest extends ShapeTag.Companion[DefaultInMixinUsageTes val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(one: String): DefaultInMixinUsageTest = DefaultInMixinUsageTest(one) + implicit val schema: Schema[DefaultInMixinUsageTest] = struct( string.field[DefaultInMixinUsageTest]("one", _.one).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), ){ - DefaultInMixinUsageTest.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DefaultOrderingTest.scala b/modules/bootstrapped/src/generated/smithy4s/example/DefaultOrderingTest.scala index 1942014d3..0663f17e9 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DefaultOrderingTest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DefaultOrderingTest.scala @@ -15,11 +15,14 @@ object DefaultOrderingTest extends ShapeTag.Companion[DefaultOrderingTest] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(one: Int, two: Option[String], three: String): DefaultOrderingTest = DefaultOrderingTest(three, one, two) + implicit val schema: Schema[DefaultOrderingTest] = struct( - string.required[DefaultOrderingTest]("three", _.three), int.field[DefaultOrderingTest]("one", _.one).addHints(smithy.api.Default(smithy4s.Document.fromDouble(1.0d))), string.optional[DefaultOrderingTest]("two", _.two), + string.required[DefaultOrderingTest]("three", _.three), ){ - DefaultOrderingTest.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DefaultTest.scala b/modules/bootstrapped/src/generated/smithy4s/example/DefaultTest.scala index 2413dfa7f..ba0318af7 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DefaultTest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DefaultTest.scala @@ -27,6 +27,9 @@ object DefaultTest extends ShapeTag.Companion[DefaultTest] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(one: Int, two: String, three: List[String], four: List[String], five: String, six: Int, seven: Document, eight: Map[String, String], nine: Short, ten: Double, eleven: Float, twelve: Long, thirteen: Timestamp, fourteen: Timestamp, fifteen: Timestamp, sixteen: Byte, seventeen: Blob, eighteen: Boolean): DefaultTest = DefaultTest(one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen) + implicit val schema: Schema[DefaultTest] = struct( int.field[DefaultTest]("one", _.one).addHints(smithy.api.Default(smithy4s.Document.fromDouble(1.0d))), string.field[DefaultTest]("two", _.two).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), @@ -47,6 +50,6 @@ object DefaultTest extends ShapeTag.Companion[DefaultTest] { bytes.field[DefaultTest]("seventeen", _.seventeen).addHints(smithy.api.Default(smithy4s.Document.array())), boolean.field[DefaultTest]("eighteen", _.eighteen).addHints(smithy.api.Default(smithy4s.Document.fromBoolean(false))), ){ - DefaultTest.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DefaultVariants.scala b/modules/bootstrapped/src/generated/smithy4s/example/DefaultVariants.scala index 190fc8f22..80d326dec 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DefaultVariants.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DefaultVariants.scala @@ -14,12 +14,15 @@ object DefaultVariants extends ShapeTag.Companion[DefaultVariants] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(req: String, reqDef: String, opt: Option[String], optDef: String): DefaultVariants = DefaultVariants(req, reqDef, optDef, opt) + implicit val schema: Schema[DefaultVariants] = struct( string.required[DefaultVariants]("req", _.req), string.required[DefaultVariants]("reqDef", _.reqDef).addHints(smithy.api.Default(smithy4s.Document.fromString("default"))), - string.field[DefaultVariants]("optDef", _.optDef).addHints(smithy.api.Default(smithy4s.Document.fromString("default"))), string.optional[DefaultVariants]("opt", _.opt), + string.field[DefaultVariants]("optDef", _.optDef).addHints(smithy.api.Default(smithy4s.Document.fromString("default"))), ){ - DefaultVariants.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedStructure.scala b/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedStructure.scala index 468eb6fe0..2dd6e1fc3 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedStructure.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedStructure.scala @@ -17,12 +17,15 @@ object DeprecatedStructure extends ShapeTag.Companion[DeprecatedStructure] { smithy.api.Deprecated(message = Some("A compelling reason"), since = Some("0.0.1")), ).lazily + // constructor using the original order from the spec + private def make(strings: Option[List[String]], other: Option[List[String]], name: Option[String], nameV2: Option[String]): DeprecatedStructure = DeprecatedStructure(strings, other, name, nameV2) + implicit val schema: Schema[DeprecatedStructure] = struct( Strings.underlyingSchema.optional[DeprecatedStructure]("strings", _.strings).addHints(smithy.api.Deprecated(message = None, since = None)), Strings.underlyingSchema.optional[DeprecatedStructure]("other", _.other), string.optional[DeprecatedStructure]("name", _.name).addHints(smithy.api.Deprecated(message = None, since = None)), string.optional[DeprecatedStructure]("nameV2", _.nameV2), ){ - DeprecatedStructure.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedUnion.scala b/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedUnion.scala index d59b88972..4e8080a68 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedUnion.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedUnion.scala @@ -58,6 +58,7 @@ object DeprecatedUnion extends ShapeTag.Companion[DeprecatedUnion] { smithy.api.Deprecated(message = None, since = None), ).lazily + implicit val schema: Schema[DeprecatedUnionProductCase] = constant(DeprecatedUnionProductCase()).withId(id).addHints(hints) val alt = schema.oneOf[DeprecatedUnion]("p") @@ -74,6 +75,7 @@ object DeprecatedUnion extends ShapeTag.Companion[DeprecatedUnion] { smithy.api.Deprecated(message = None, since = None), ).lazily + implicit val schema: Schema[UnionProductCaseDeprecatedAtCallSite] = constant(UnionProductCaseDeprecatedAtCallSite()).withId(id).addHints(hints) val alt = schema.oneOf[DeprecatedUnion]("p2") diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DocTest.scala b/modules/bootstrapped/src/generated/smithy4s/example/DocTest.scala index 455b0605f..54f5b6f39 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DocTest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DocTest.scala @@ -18,5 +18,6 @@ object DocTest extends ShapeTag.Companion[DocTest] { smithy.api.Documentation("Test if an at-sign is rendered appropriately\n@test"), ).lazily + implicit val schema: Schema[DocTest] = constant(DocTest()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DocumentationComment.scala b/modules/bootstrapped/src/generated/smithy4s/example/DocumentationComment.scala index 845e500dd..688f41033 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DocumentationComment.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DocumentationComment.scala @@ -20,9 +20,12 @@ object DocumentationComment extends ShapeTag.Companion[DocumentationComment] { smithy.api.Documentation("We should be able to use comments in documentation /* */"), ).lazily + // constructor using the original order from the spec + private def make(member: Option[String]): DocumentationComment = DocumentationComment(member) + implicit val schema: Schema[DocumentationComment] = struct( string.optional[DocumentationComment]("member", _.member).addHints(smithy.api.Documentation("/*")), ){ - DocumentationComment.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackClientError.scala b/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackClientError.scala index e4d8b452f..f8e10badd 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackClientError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackClientError.scala @@ -19,9 +19,12 @@ object EHFallbackClientError extends ShapeTag.Companion[EHFallbackClientError] { smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): EHFallbackClientError = EHFallbackClientError(message) + implicit val schema: Schema[EHFallbackClientError] = struct( string.optional[EHFallbackClientError]("message", _.message), ){ - EHFallbackClientError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackServerError.scala index cf29ba67e..03eec972b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackServerError.scala @@ -19,9 +19,12 @@ object EHFallbackServerError extends ShapeTag.Companion[EHFallbackServerError] { smithy.api.Error.SERVER.widen, ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): EHFallbackServerError = EHFallbackServerError(message) + implicit val schema: Schema[EHFallbackServerError] = struct( string.optional[EHFallbackServerError]("message", _.message), ){ - EHFallbackServerError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EHNotFound.scala b/modules/bootstrapped/src/generated/smithy4s/example/EHNotFound.scala index 13da18b51..439314098 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EHNotFound.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EHNotFound.scala @@ -20,9 +20,12 @@ object EHNotFound extends ShapeTag.Companion[EHNotFound] { smithy.api.HttpError(404), ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): EHNotFound = EHNotFound(message) + implicit val schema: Schema[EHNotFound] = struct( string.optional[EHNotFound]("message", _.message), ){ - EHNotFound.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EHServiceUnavailable.scala b/modules/bootstrapped/src/generated/smithy4s/example/EHServiceUnavailable.scala index 6b92be906..0ce6ef873 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EHServiceUnavailable.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EHServiceUnavailable.scala @@ -20,9 +20,12 @@ object EHServiceUnavailable extends ShapeTag.Companion[EHServiceUnavailable] { smithy.api.HttpError(503), ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): EHServiceUnavailable = EHServiceUnavailable(message) + implicit val schema: Schema[EHServiceUnavailable] = struct( string.optional[EHServiceUnavailable]("message", _.message), ){ - EHServiceUnavailable.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EchoBody.scala b/modules/bootstrapped/src/generated/smithy4s/example/EchoBody.scala index 24610a848..bac45a335 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EchoBody.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EchoBody.scala @@ -14,9 +14,12 @@ object EchoBody extends ShapeTag.Companion[EchoBody] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(data: Option[String]): EchoBody = EchoBody(data) + implicit val schema: Schema[EchoBody] = struct( string.validated(smithy.api.Length(min = Some(10L), max = None)).optional[EchoBody]("data", _.data), ){ - EchoBody.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EchoInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/EchoInput.scala index d0163a892..c77303d8f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EchoInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EchoInput.scala @@ -14,11 +14,14 @@ object EchoInput extends ShapeTag.Companion[EchoInput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(pathParam: String, queryParam: Option[String], body: EchoBody): EchoInput = EchoInput(pathParam, body, queryParam) + implicit val schema: Schema[EchoInput] = struct( string.validated(smithy.api.Length(min = Some(10L), max = None)).required[EchoInput]("pathParam", _.pathParam).addHints(smithy.api.HttpLabel()), - EchoBody.schema.required[EchoInput]("body", _.body).addHints(smithy.api.HttpPayload()), string.validated(smithy.api.Length(min = Some(10L), max = None)).optional[EchoInput]("queryParam", _.queryParam).addHints(smithy.api.HttpQuery("queryParam")), + EchoBody.schema.required[EchoInput]("body", _.body).addHints(smithy.api.HttpPayload()), ){ - EchoInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EnvVarString.scala b/modules/bootstrapped/src/generated/smithy4s/example/EnvVarString.scala index d801b8587..252c8cd74 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EnvVarString.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EnvVarString.scala @@ -20,9 +20,12 @@ object EnvVarString extends ShapeTag.Companion[EnvVarString] { smithy.api.Documentation(s"This is meant to be used with $${ENV_VAR}"), ).lazily + // constructor using the original order from the spec + private def make(member: Option[String]): EnvVarString = EnvVarString(member) + implicit val schema: Schema[EnvVarString] = struct( string.optional[EnvVarString]("member", _.member).addHints(smithy.api.Documentation(s"This is meant to be used with $$ENV_VAR")), ){ - EnvVarString.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeMessage.scala index 1cabf17e6..c41db954d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeMessage.scala @@ -18,9 +18,12 @@ object ErrorCustomTypeMessage extends ShapeTag.Companion[ErrorCustomTypeMessage] smithy.api.Error.SERVER.widen, ).lazily + // constructor using the original order from the spec + private def make(message: Option[CustomErrorMessageType]): ErrorCustomTypeMessage = ErrorCustomTypeMessage(message) + implicit val schema: Schema[ErrorCustomTypeMessage] = struct( CustomErrorMessageType.schema.optional[ErrorCustomTypeMessage]("message", _.message), ){ - ErrorCustomTypeMessage.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeRequiredMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeRequiredMessage.scala index 0a1b0b585..5383a88df 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeRequiredMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeRequiredMessage.scala @@ -18,9 +18,12 @@ object ErrorCustomTypeRequiredMessage extends ShapeTag.Companion[ErrorCustomType smithy.api.Error.SERVER.widen, ).lazily + // constructor using the original order from the spec + private def make(message: CustomErrorMessageType): ErrorCustomTypeRequiredMessage = ErrorCustomTypeRequiredMessage(message) + implicit val schema: Schema[ErrorCustomTypeRequiredMessage] = struct( CustomErrorMessageType.schema.required[ErrorCustomTypeRequiredMessage]("message", _.message), ){ - ErrorCustomTypeRequiredMessage.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationInput.scala index 26727a182..13fff9e99 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationInput.scala @@ -16,9 +16,12 @@ object ErrorHandlingOperationInput extends ShapeTag.Companion[ErrorHandlingOpera smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(in: Option[String]): ErrorHandlingOperationInput = ErrorHandlingOperationInput(in) + implicit val schema: Schema[ErrorHandlingOperationInput] = struct( string.optional[ErrorHandlingOperationInput]("in", _.in), ){ - ErrorHandlingOperationInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationOutput.scala index 8c668a281..71b78d2d0 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationOutput.scala @@ -16,9 +16,12 @@ object ErrorHandlingOperationOutput extends ShapeTag.Companion[ErrorHandlingOper smithy.api.Output(), ).lazily + // constructor using the original order from the spec + private def make(out: Option[String]): ErrorHandlingOperationOutput = ErrorHandlingOperationOutput(out) + implicit val schema: Schema[ErrorHandlingOperationOutput] = struct( string.optional[ErrorHandlingOperationOutput]("out", _.out), ){ - ErrorHandlingOperationOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeMessage.scala index f5431a084..7295a2e64 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeMessage.scala @@ -19,9 +19,12 @@ object ErrorNullableCustomTypeMessage extends ShapeTag.Companion[ErrorNullableCu smithy.api.Error.SERVER.widen, ).lazily + // constructor using the original order from the spec + private def make(message: Option[Nullable[CustomErrorMessageType]]): ErrorNullableCustomTypeMessage = ErrorNullableCustomTypeMessage(message) + implicit val schema: Schema[ErrorNullableCustomTypeMessage] = struct( CustomErrorMessageType.schema.nullable.optional[ErrorNullableCustomTypeMessage]("message", _.message), ){ - ErrorNullableCustomTypeMessage.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeRequiredMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeRequiredMessage.scala index 5985d5473..3df5985ad 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeRequiredMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeRequiredMessage.scala @@ -19,9 +19,12 @@ object ErrorNullableCustomTypeRequiredMessage extends ShapeTag.Companion[ErrorNu smithy.api.Error.SERVER.widen, ).lazily + // constructor using the original order from the spec + private def make(message: Nullable[CustomErrorMessageType]): ErrorNullableCustomTypeRequiredMessage = ErrorNullableCustomTypeRequiredMessage(message) + implicit val schema: Schema[ErrorNullableCustomTypeRequiredMessage] = struct( CustomErrorMessageType.schema.nullable.required[ErrorNullableCustomTypeRequiredMessage]("message", _.message), ){ - ErrorNullableCustomTypeRequiredMessage.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableMessage.scala index ddf3e2dd8..11270b8ea 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableMessage.scala @@ -20,9 +20,12 @@ object ErrorNullableMessage extends ShapeTag.Companion[ErrorNullableMessage] { smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(message: Option[Nullable[String]]): ErrorNullableMessage = ErrorNullableMessage(message) + implicit val schema: Schema[ErrorNullableMessage] = struct( string.nullable.optional[ErrorNullableMessage]("message", _.message), ){ - ErrorNullableMessage.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableRequiredMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableRequiredMessage.scala index 9f1e55f24..394f2f246 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableRequiredMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableRequiredMessage.scala @@ -20,9 +20,12 @@ object ErrorNullableRequiredMessage extends ShapeTag.Companion[ErrorNullableRequ smithy.api.Error.SERVER.widen, ).lazily + // constructor using the original order from the spec + private def make(message: Nullable[String]): ErrorNullableRequiredMessage = ErrorNullableRequiredMessage(message) + implicit val schema: Schema[ErrorNullableRequiredMessage] = struct( string.nullable.required[ErrorNullableRequiredMessage]("message", _.message), ){ - ErrorNullableRequiredMessage.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorRequiredMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorRequiredMessage.scala index f34c204b6..b8a0382e9 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorRequiredMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorRequiredMessage.scala @@ -19,9 +19,12 @@ object ErrorRequiredMessage extends ShapeTag.Companion[ErrorRequiredMessage] { smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(message: String): ErrorRequiredMessage = ErrorRequiredMessage(message) + implicit val schema: Schema[ErrorRequiredMessage] = struct( string.required[ErrorRequiredMessage]("message", _.message), ){ - ErrorRequiredMessage.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ExtraErrorOperationInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ExtraErrorOperationInput.scala index 8fd1c4ff3..cc4d67008 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ExtraErrorOperationInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ExtraErrorOperationInput.scala @@ -16,9 +16,12 @@ object ExtraErrorOperationInput extends ShapeTag.Companion[ExtraErrorOperationIn smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(in: Option[String]): ExtraErrorOperationInput = ExtraErrorOperationInput(in) + implicit val schema: Schema[ExtraErrorOperationInput] = struct( string.optional[ExtraErrorOperationInput]("in", _.in), ){ - ExtraErrorOperationInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/FallbackError.scala b/modules/bootstrapped/src/generated/smithy4s/example/FallbackError.scala index 40fe9470e..2a3597397 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/FallbackError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/FallbackError.scala @@ -18,9 +18,12 @@ object FallbackError extends ShapeTag.Companion[FallbackError] { smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(error: String): FallbackError = FallbackError(error) + implicit val schema: Schema[FallbackError] = struct( string.required[FallbackError]("error", _.error), ){ - FallbackError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/FallbackError2.scala b/modules/bootstrapped/src/generated/smithy4s/example/FallbackError2.scala index da732a725..7217ddc0d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/FallbackError2.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/FallbackError2.scala @@ -18,9 +18,12 @@ object FallbackError2 extends ShapeTag.Companion[FallbackError2] { smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(error: String): FallbackError2 = FallbackError2(error) + implicit val schema: Schema[FallbackError2] = struct( string.required[FallbackError2]("error", _.error), ){ - FallbackError2.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/FancyListFormat.scala b/modules/bootstrapped/src/generated/smithy4s/example/FancyListFormat.scala index 7cfbb139c..abd0b7648 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/FancyListFormat.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/FancyListFormat.scala @@ -15,5 +15,6 @@ object FancyListFormat extends ShapeTag.Companion[FancyListFormat] { smithy.api.Trait(selector = Some("list:test(> member > string)"), structurallyExclusive = None, conflicts = None, breakingChanges = None), ).lazily + implicit val schema: Schema[FancyListFormat] = constant(FancyListFormat()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Four.scala b/modules/bootstrapped/src/generated/smithy4s/example/Four.scala index 21871e44e..17bee4f8b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Four.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Four.scala @@ -14,9 +14,12 @@ object Four extends ShapeTag.Companion[Four] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(four: Int): Four = Four(four) + implicit val schema: Schema[Four] = struct( int.required[Four]("four", _.four), ){ - Four.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GenericClientError.scala b/modules/bootstrapped/src/generated/smithy4s/example/GenericClientError.scala index 681558f0c..701263a22 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GenericClientError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GenericClientError.scala @@ -20,9 +20,12 @@ object GenericClientError extends ShapeTag.Companion[GenericClientError] { smithy.api.HttpError(418), ).lazily + // constructor using the original order from the spec + private def make(message: String): GenericClientError = GenericClientError(message) + implicit val schema: Schema[GenericClientError] = struct( string.required[GenericClientError]("message", _.message), ){ - GenericClientError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GenericServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/GenericServerError.scala index 1ec2364f3..9b0c0be97 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GenericServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GenericServerError.scala @@ -20,9 +20,12 @@ object GenericServerError extends ShapeTag.Companion[GenericServerError] { smithy.api.HttpError(502), ).lazily + // constructor using the original order from the spec + private def make(message: String): GenericServerError = GenericServerError(message) + implicit val schema: Schema[GenericServerError] = struct( string.required[GenericServerError]("message", _.message), ){ - GenericServerError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetCityInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetCityInput.scala index 1691ad67e..68949caee 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetCityInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetCityInput.scala @@ -18,9 +18,12 @@ object GetCityInput extends ShapeTag.Companion[GetCityInput] { val cityId: Lens[GetCityInput, CityId] = Lens[GetCityInput, CityId](_.cityId)(n => a => a.copy(cityId = n)) } + // constructor using the original order from the spec + private def make(cityId: CityId): GetCityInput = GetCityInput(cityId) + implicit val schema: Schema[GetCityInput] = struct( CityId.schema.required[GetCityInput]("cityId", _.cityId), ){ - GetCityInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetCityOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetCityOutput.scala index 4c087dd66..f6c4a101f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetCityOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetCityOutput.scala @@ -14,10 +14,13 @@ object GetCityOutput extends ShapeTag.Companion[GetCityOutput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(name: String, coordinates: CityCoordinates): GetCityOutput = GetCityOutput(name, coordinates) + implicit val schema: Schema[GetCityOutput] = struct( string.required[GetCityOutput]("name", _.name), CityCoordinates.schema.required[GetCityOutput]("coordinates", _.coordinates), ){ - GetCityOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetCurrentTimeOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetCurrentTimeOutput.scala index 7b8723d43..18cb015f3 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetCurrentTimeOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetCurrentTimeOutput.scala @@ -15,9 +15,12 @@ object GetCurrentTimeOutput extends ShapeTag.Companion[GetCurrentTimeOutput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(time: Timestamp): GetCurrentTimeOutput = GetCurrentTimeOutput(time) + implicit val schema: Schema[GetCurrentTimeOutput] = struct( timestamp.required[GetCurrentTimeOutput]("time", _.time), ){ - GetCurrentTimeOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetEnumInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetEnumInput.scala index e9f0a8d9a..1f5d74274 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetEnumInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetEnumInput.scala @@ -13,9 +13,12 @@ object GetEnumInput extends ShapeTag.Companion[GetEnumInput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(aa: TheEnum): GetEnumInput = GetEnumInput(aa) + implicit val schema: Schema[GetEnumInput] = struct( TheEnum.schema.required[GetEnumInput]("aa", _.aa).addHints(smithy.api.HttpLabel()), ){ - GetEnumInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetEnumOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetEnumOutput.scala index 595cb77ed..dab42c726 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetEnumOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetEnumOutput.scala @@ -14,9 +14,12 @@ object GetEnumOutput extends ShapeTag.Companion[GetEnumOutput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(result: Option[String]): GetEnumOutput = GetEnumOutput(result) + implicit val schema: Schema[GetEnumOutput] = struct( string.optional[GetEnumOutput]("result", _.result), ){ - GetEnumOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetFooOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetFooOutput.scala index 08ec2f5af..2325a83bc 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetFooOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetFooOutput.scala @@ -18,9 +18,12 @@ object GetFooOutput extends ShapeTag.Companion[GetFooOutput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(foo: Option[Foo]): GetFooOutput = GetFooOutput(foo) + implicit val schema: Schema[GetFooOutput] = struct( Foo.schema.optional[GetFooOutput]("foo", _.foo), ){ - GetFooOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetForecastInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetForecastInput.scala index 00da55b89..d1f6455cc 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetForecastInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetForecastInput.scala @@ -13,9 +13,12 @@ object GetForecastInput extends ShapeTag.Companion[GetForecastInput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(cityId: CityId): GetForecastInput = GetForecastInput(cityId) + implicit val schema: Schema[GetForecastInput] = struct( CityId.schema.required[GetForecastInput]("cityId", _.cityId), ){ - GetForecastInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetForecastOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetForecastOutput.scala index eb5b03951..ce31234f0 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetForecastOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetForecastOutput.scala @@ -18,9 +18,12 @@ object GetForecastOutput extends ShapeTag.Companion[GetForecastOutput] { val forecast: Lens[GetForecastOutput, Option[ForecastResult]] = Lens[GetForecastOutput, Option[ForecastResult]](_.forecast)(n => a => a.copy(forecast = n)) } + // constructor using the original order from the spec + private def make(forecast: Option[ForecastResult]): GetForecastOutput = GetForecastOutput(forecast) + implicit val schema: Schema[GetForecastOutput] = struct( ForecastResult.schema.optional[GetForecastOutput]("forecast", _.forecast), ){ - GetForecastOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumInput.scala index 94a36e1f6..698a1f883 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumInput.scala @@ -15,9 +15,12 @@ object GetIntEnumInput extends ShapeTag.Companion[GetIntEnumInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(aa: EnumResult): GetIntEnumInput = GetIntEnumInput(aa) + implicit val schema: Schema[GetIntEnumInput] = struct( EnumResult.schema.required[GetIntEnumInput]("aa", _.aa).addHints(smithy.api.HttpLabel()), ){ - GetIntEnumInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumOutput.scala index 427d909e4..0e1997ae5 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumOutput.scala @@ -15,9 +15,12 @@ object GetIntEnumOutput extends ShapeTag.Companion[GetIntEnumOutput] { smithy.api.Output(), ).lazily + // constructor using the original order from the spec + private def make(result: EnumResult): GetIntEnumOutput = GetIntEnumOutput(result) + implicit val schema: Schema[GetIntEnumOutput] = struct( EnumResult.schema.required[GetIntEnumOutput]("result", _.result), ){ - GetIntEnumOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetMenuRequest.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetMenuRequest.scala index db8f99667..886eef8c8 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetMenuRequest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetMenuRequest.scala @@ -14,9 +14,12 @@ object GetMenuRequest extends ShapeTag.Companion[GetMenuRequest] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(restaurant: String): GetMenuRequest = GetMenuRequest(restaurant) + implicit val schema: Schema[GetMenuRequest] = struct( string.required[GetMenuRequest]("restaurant", _.restaurant).addHints(smithy.api.HttpLabel()), ){ - GetMenuRequest.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetMenuResult.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetMenuResult.scala index 32f1da46a..c31383fdc 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetMenuResult.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetMenuResult.scala @@ -13,9 +13,12 @@ object GetMenuResult extends ShapeTag.Companion[GetMenuResult] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(menu: Map[String, MenuItem]): GetMenuResult = GetMenuResult(menu) + implicit val schema: Schema[GetMenuResult] = struct( Menu.underlyingSchema.required[GetMenuResult]("menu", _.menu).addHints(smithy.api.HttpPayload()), ){ - GetMenuResult.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetObjectInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetObjectInput.scala index d8f4f8dde..704e53b40 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetObjectInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetObjectInput.scala @@ -26,10 +26,13 @@ object GetObjectInput extends ShapeTag.Companion[GetObjectInput] { smithy.api.Documentation("Input for getting an Object\nall fields are required\nand are given through HTTP labels\nSee https://smithy.io/2.0/spec/http-bindings.html?highlight=httppayload#http-uri-label"), ).lazily + // constructor using the original order from the spec + private def make(key: ObjectKey, bucketName: BucketName): GetObjectInput = GetObjectInput(key, bucketName) + implicit val schema: Schema[GetObjectInput] = struct( ObjectKey.schema.required[GetObjectInput]("key", _.key).addHints(smithy.api.Documentation("Sent in the URI label named \"key\".\nKey can also be seen as the filename\nIt is always required for a GET operation"), smithy.api.HttpLabel()), BucketName.schema.required[GetObjectInput]("bucketName", _.bucketName).addHints(smithy.api.Documentation("Sent in the URI label named \"bucketName\"."), smithy.api.HttpLabel()), ){ - GetObjectInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetObjectOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetObjectOutput.scala index 642ee7084..a321727ed 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetObjectOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetObjectOutput.scala @@ -14,10 +14,13 @@ object GetObjectOutput extends ShapeTag.Companion[GetObjectOutput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(size: ObjectSize, data: Option[String]): GetObjectOutput = GetObjectOutput(size, data) + implicit val schema: Schema[GetObjectOutput] = struct( ObjectSize.schema.required[GetObjectOutput]("size", _.size).addHints(smithy.api.HttpHeader("X-Size")), string.optional[GetObjectOutput]("data", _.data).addHints(smithy.api.HttpPayload()), ){ - GetObjectOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectInput.scala index a3b111877..3037e7bd6 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectInput.scala @@ -14,9 +14,12 @@ object GetStreamedObjectInput extends ShapeTag.Companion[GetStreamedObjectInput] val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(key: String): GetStreamedObjectInput = GetStreamedObjectInput(key) + implicit val schema: Schema[GetStreamedObjectInput] = struct( string.required[GetStreamedObjectInput]("key", _.key), ){ - GetStreamedObjectInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectOutput.scala index 84339ff6f..1c7b9c6d3 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectOutput.scala @@ -13,5 +13,6 @@ object GetStreamedObjectOutput extends ShapeTag.Companion[GetStreamedObjectOutpu val hints: Hints = Hints.empty + implicit val schema: Schema[GetStreamedObjectOutput] = constant(GetStreamedObjectOutput()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Hash.scala b/modules/bootstrapped/src/generated/smithy4s/example/Hash.scala index fa9630a69..4f0b7ed7d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Hash.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Hash.scala @@ -15,5 +15,6 @@ object Hash extends ShapeTag.Companion[Hash] { smithy.api.Trait(selector = None, structurallyExclusive = None, conflicts = None, breakingChanges = None), ).lazily + implicit val schema: Schema[Hash] = constant(Hash()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HeadRequestOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/HeadRequestOutput.scala index 5787aeb46..65a0e88f0 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HeadRequestOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HeadRequestOutput.scala @@ -14,9 +14,12 @@ object HeadRequestOutput extends ShapeTag.Companion[HeadRequestOutput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(test: String): HeadRequestOutput = HeadRequestOutput(test) + implicit val schema: Schema[HeadRequestOutput] = struct( string.required[HeadRequestOutput]("test", _.test).addHints(smithy.api.HttpHeader("Test")), ){ - HeadRequestOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HeaderEndpointData.scala b/modules/bootstrapped/src/generated/smithy4s/example/HeaderEndpointData.scala index 7e4913cba..46cb0ce7c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HeaderEndpointData.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HeaderEndpointData.scala @@ -14,12 +14,15 @@ object HeaderEndpointData extends ShapeTag.Companion[HeaderEndpointData] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(uppercaseHeader: Option[String], capitalizedHeader: Option[String], lowercaseHeader: Option[String], mixedHeader: Option[String]): HeaderEndpointData = HeaderEndpointData(uppercaseHeader, capitalizedHeader, lowercaseHeader, mixedHeader) + implicit val schema: Schema[HeaderEndpointData] = struct( string.optional[HeaderEndpointData]("uppercaseHeader", _.uppercaseHeader).addHints(smithy.api.HttpHeader("X-UPPERCASE-HEADER")), string.optional[HeaderEndpointData]("capitalizedHeader", _.capitalizedHeader).addHints(smithy.api.HttpHeader("X-Capitalized-Header")), string.optional[HeaderEndpointData]("lowercaseHeader", _.lowercaseHeader).addHints(smithy.api.HttpHeader("x-lowercase-header")), string.optional[HeaderEndpointData]("mixedHeader", _.mixedHeader).addHints(smithy.api.HttpHeader("x-MiXeD-hEaDEr")), ){ - HeaderEndpointData.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HeadersStruct.scala b/modules/bootstrapped/src/generated/smithy4s/example/HeadersStruct.scala index 195351dfa..f74344a58 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HeadersStruct.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HeadersStruct.scala @@ -18,6 +18,9 @@ object HeadersStruct extends ShapeTag.Companion[HeadersStruct] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(str: Option[String], int: Option[Int], ts1: Option[Timestamp], ts2: Option[Timestamp], ts3: Option[Timestamp], ts4: Option[Timestamp], b: Option[Boolean], sl: Option[List[String]], ie: Option[Numbers], on: Option[OpenNums], ons: Option[OpenNumsStr], slm: Option[Map[String, String]]): HeadersStruct = HeadersStruct(str, int, ts1, ts2, ts3, ts4, b, sl, ie, on, ons, slm) + implicit val schema: Schema[HeadersStruct] = struct( string.optional[HeadersStruct]("str", _.str).addHints(smithy.api.HttpHeader("str")), int.optional[HeadersStruct]("int", _.int).addHints(smithy.api.HttpHeader("int")), @@ -32,6 +35,6 @@ object HeadersStruct extends ShapeTag.Companion[HeadersStruct] { OpenNumsStr.schema.optional[HeadersStruct]("ons", _.ons).addHints(smithy.api.HttpHeader("openNumsStr")), StringMap.underlyingSchema.optional[HeadersStruct]("slm", _.slm).addHints(smithy.api.HttpPrefixHeaders("foo-")), ){ - HeadersStruct.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HeadersWithDefaults.scala b/modules/bootstrapped/src/generated/smithy4s/example/HeadersWithDefaults.scala index da79656e5..e54cc9667 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HeadersWithDefaults.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HeadersWithDefaults.scala @@ -14,9 +14,12 @@ object HeadersWithDefaults extends ShapeTag.Companion[HeadersWithDefaults] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(dflt: String): HeadersWithDefaults = HeadersWithDefaults(dflt) + implicit val schema: Schema[HeadersWithDefaults] = struct( string.field[HeadersWithDefaults]("dflt", _.dflt).addHints(smithy.api.Default(smithy4s.Document.fromString("test")), smithy.api.HttpHeader("dflt")), ){ - HeadersWithDefaults.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HealthRequest.scala b/modules/bootstrapped/src/generated/smithy4s/example/HealthRequest.scala index bdd5ff029..ed53660ad 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HealthRequest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HealthRequest.scala @@ -14,9 +14,12 @@ object HealthRequest extends ShapeTag.Companion[HealthRequest] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(query: Option[String]): HealthRequest = HealthRequest(query) + implicit val schema: Schema[HealthRequest] = struct( string.validated(smithy.api.Length(min = Some(0L), max = Some(5L))).optional[HealthRequest]("query", _.query).addHints(smithy.api.HttpQuery("query")), ){ - HealthRequest.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HealthResponse.scala b/modules/bootstrapped/src/generated/smithy4s/example/HealthResponse.scala index 5be00aabf..2cdf7b243 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HealthResponse.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HealthResponse.scala @@ -16,9 +16,12 @@ object HealthResponse extends ShapeTag.Companion[HealthResponse] { smithy4s.example.FreeForm(smithy4s.Document.obj("i" -> smithy4s.Document.fromDouble(1.0d), "a" -> smithy4s.Document.fromDouble(2.0d))), ).lazily + // constructor using the original order from the spec + private def make(status: String): HealthResponse = HealthResponse(status) + implicit val schema: Schema[HealthResponse] = struct( string.required[HealthResponse]("status", _.status), ){ - HealthResponse.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HostLabelInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/HostLabelInput.scala index 9641541b5..4a246321a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HostLabelInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HostLabelInput.scala @@ -14,11 +14,14 @@ object HostLabelInput extends ShapeTag.Companion[HostLabelInput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(label1: String, label2: String, label3: HostLabelEnum): HostLabelInput = HostLabelInput(label1, label2, label3) + implicit val schema: Schema[HostLabelInput] = struct( string.required[HostLabelInput]("label1", _.label1).addHints(smithy.api.HostLabel()), string.required[HostLabelInput]("label2", _.label2).addHints(smithy.api.HostLabel()), HostLabelEnum.schema.required[HostLabelInput]("label3", _.label3).addHints(smithy.api.HostLabel()), ){ - HostLabelInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/IntList.scala b/modules/bootstrapped/src/generated/smithy4s/example/IntList.scala index 664294cea..7b45d7e34 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/IntList.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/IntList.scala @@ -15,10 +15,13 @@ object IntList extends ShapeTag.Companion[IntList] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(head: Int, tail: Option[smithy4s.example.IntList]): IntList = IntList(head, tail) + implicit val schema: Schema[IntList] = recursive(struct( int.required[IntList]("head", _.head), smithy4s.example.IntList.schema.optional[IntList]("tail", _.tail), ){ - IntList.apply + make }.withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Key.scala b/modules/bootstrapped/src/generated/smithy4s/example/Key.scala index 8c897d925..592d18558 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Key.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Key.scala @@ -14,9 +14,12 @@ object Key extends ShapeTag.Companion[Key] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(key: String): Key = Key(key) + implicit val schema: Schema[Key] = struct( string.required[Key]("key", _.key), ){ - Key.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/KeyNotFoundError.scala b/modules/bootstrapped/src/generated/smithy4s/example/KeyNotFoundError.scala index 8b63244af..07b103043 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/KeyNotFoundError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/KeyNotFoundError.scala @@ -19,9 +19,12 @@ object KeyNotFoundError extends ShapeTag.Companion[KeyNotFoundError] { smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(message: String): KeyNotFoundError = KeyNotFoundError(message) + implicit val schema: Schema[KeyNotFoundError] = struct( string.required[KeyNotFoundError]("message", _.message), ){ - KeyNotFoundError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/KeyValue.scala b/modules/bootstrapped/src/generated/smithy4s/example/KeyValue.scala index 1d9e04d0f..6618ea793 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/KeyValue.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/KeyValue.scala @@ -14,10 +14,13 @@ object KeyValue extends ShapeTag.Companion[KeyValue] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(key: String, value: String): KeyValue = KeyValue(key, value) + implicit val schema: Schema[KeyValue] = struct( string.required[KeyValue]("key", _.key), string.required[KeyValue]("value", _.value), ){ - KeyValue.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesInput.scala index 91792fa2e..0c8195a0c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesInput.scala @@ -15,10 +15,13 @@ object ListCitiesInput extends ShapeTag.Companion[ListCitiesInput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(nextToken: Option[String], pageSize: Option[Int]): ListCitiesInput = ListCitiesInput(nextToken, pageSize) + implicit val schema: Schema[ListCitiesInput] = struct( string.optional[ListCitiesInput]("nextToken", _.nextToken), int.optional[ListCitiesInput]("pageSize", _.pageSize), ){ - ListCitiesInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesOutput.scala index a454076d7..4935ea243 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesOutput.scala @@ -14,10 +14,13 @@ object ListCitiesOutput extends ShapeTag.Companion[ListCitiesOutput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(nextToken: Option[String], items: List[CitySummary]): ListCitiesOutput = ListCitiesOutput(items, nextToken) + implicit val schema: Schema[ListCitiesOutput] = struct( - CitySummaries.underlyingSchema.required[ListCitiesOutput]("items", _.items), string.optional[ListCitiesOutput]("nextToken", _.nextToken), + CitySummaries.underlyingSchema.required[ListCitiesOutput]("items", _.items), ){ - ListCitiesOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ListPublishersOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ListPublishersOutput.scala index 84e2ca088..0923cfdbe 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ListPublishersOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ListPublishersOutput.scala @@ -15,9 +15,12 @@ object ListPublishersOutput extends ShapeTag.Companion[ListPublishersOutput] { smithy.api.Output(), ).lazily + // constructor using the original order from the spec + private def make(publishers: List[PublisherId]): ListPublishersOutput = ListPublishersOutput(publishers) + implicit val schema: Schema[ListPublishersOutput] = struct( PublishersList.underlyingSchema.required[ListPublishersOutput]("publishers", _.publishers), ){ - ListPublishersOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MenuItem.scala b/modules/bootstrapped/src/generated/smithy4s/example/MenuItem.scala index 17021371c..30efcb3f3 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MenuItem.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MenuItem.scala @@ -14,10 +14,13 @@ object MenuItem extends ShapeTag.Companion[MenuItem] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(food: Food, price: Float): MenuItem = MenuItem(food, price) + implicit val schema: Schema[MenuItem] = struct( Food.schema.required[MenuItem]("food", _.food), float.required[MenuItem]("price", _.price), ){ - MenuItem.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MixinErrorExample.scala b/modules/bootstrapped/src/generated/smithy4s/example/MixinErrorExample.scala index 5e829af09..88874959c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MixinErrorExample.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MixinErrorExample.scala @@ -21,12 +21,15 @@ object MixinErrorExample extends ShapeTag.Companion[MixinErrorExample] { smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(a: Option[String], b: Option[Int], c: Option[Long], d: Option[Boolean]): MixinErrorExample = MixinErrorExample(a, b, c, d) + implicit val schema: Schema[MixinErrorExample] = struct( string.optional[MixinErrorExample]("a", _.a), int.optional[MixinErrorExample]("b", _.b), long.optional[MixinErrorExample]("c", _.c), boolean.optional[MixinErrorExample]("d", _.d), ){ - MixinErrorExample.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MixinExample.scala b/modules/bootstrapped/src/generated/smithy4s/example/MixinExample.scala index 7ddd988ba..4fc88a165 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MixinExample.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MixinExample.scala @@ -17,12 +17,15 @@ object MixinExample extends ShapeTag.Companion[MixinExample] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(a: Option[String], b: Option[Int], c: Option[Long], d: Option[Boolean]): MixinExample = MixinExample(a, b, c, d) + implicit val schema: Schema[MixinExample] = struct( string.optional[MixinExample]("a", _.a), int.optional[MixinExample]("b", _.b), long.optional[MixinExample]("c", _.c), boolean.optional[MixinExample]("d", _.d), ){ - MixinExample.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberDefaultAdded.scala b/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberDefaultAdded.scala index 875e67644..316e4753e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberDefaultAdded.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberDefaultAdded.scala @@ -14,9 +14,12 @@ object MixinOptionalMemberDefaultAdded extends ShapeTag.Companion[MixinOptionalM val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(a: String): MixinOptionalMemberDefaultAdded = MixinOptionalMemberDefaultAdded(a) + implicit val schema: Schema[MixinOptionalMemberDefaultAdded] = struct( string.field[MixinOptionalMemberDefaultAdded]("a", _.a).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), ){ - MixinOptionalMemberDefaultAdded.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberOverride.scala b/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberOverride.scala index 720b41ff2..606e3361a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberOverride.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberOverride.scala @@ -14,9 +14,12 @@ object MixinOptionalMemberOverride extends ShapeTag.Companion[MixinOptionalMembe val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(a: String): MixinOptionalMemberOverride = MixinOptionalMemberOverride(a) + implicit val schema: Schema[MixinOptionalMemberOverride] = struct( string.required[MixinOptionalMemberOverride]("a", _.a), ){ - MixinOptionalMemberOverride.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MovieTheater.scala b/modules/bootstrapped/src/generated/smithy4s/example/MovieTheater.scala index cfaf4ada5..bffb168c8 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MovieTheater.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MovieTheater.scala @@ -17,10 +17,13 @@ object MovieTheater extends ShapeTag.Companion[MovieTheater] { smithy4s.example.Hash(), ).lazily + // constructor using the original order from the spec + private def make(name: Option[String]): MovieTheater = MovieTheater(name) + implicit val schema: Schema[MovieTheater] = struct( string.optional[MovieTheater]("name", _.name), ){ - MovieTheater.apply + make }.withId(id).addHints(hints) implicit val movieTheaterHash: cats.Hash[MovieTheater] = SchemaVisitorHash.fromSchema(schema) diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MyOpError.scala b/modules/bootstrapped/src/generated/smithy4s/example/MyOpError.scala index daf8341af..b6cc35f80 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MyOpError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MyOpError.scala @@ -17,5 +17,6 @@ object MyOpError extends ShapeTag.Companion[MyOpError] { smithy.api.Error.CLIENT.widen, ).lazily + implicit val schema: Schema[MyOpError] = constant(MyOpError()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/NameFormat.scala b/modules/bootstrapped/src/generated/smithy4s/example/NameFormat.scala index 47985e22b..6786997b5 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/NameFormat.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/NameFormat.scala @@ -15,5 +15,6 @@ object NameFormat extends ShapeTag.Companion[NameFormat] { smithy.api.Trait(selector = Some("string"), structurallyExclusive = None, conflicts = None, breakingChanges = None), ).lazily + implicit val schema: Schema[NameFormat] = constant(NameFormat()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/NoMoreSpace.scala b/modules/bootstrapped/src/generated/smithy4s/example/NoMoreSpace.scala index 233f9f689..2e502a0fb 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/NoMoreSpace.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/NoMoreSpace.scala @@ -25,10 +25,13 @@ object NoMoreSpace extends ShapeTag.Companion[NoMoreSpace] { smithy.api.HttpError(507), ).lazily + // constructor using the original order from the spec + private def make(message: String, foo: Option[Foo]): NoMoreSpace = NoMoreSpace(message, foo) + implicit val schema: Schema[NoMoreSpace] = struct( string.required[NoMoreSpace]("message", _.message), Foo.schema.optional[NoMoreSpace]("foo", _.foo), ){ - NoMoreSpace.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/NoSuchResource.scala b/modules/bootstrapped/src/generated/smithy4s/example/NoSuchResource.scala index dc0c46dd7..4838f3f91 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/NoSuchResource.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/NoSuchResource.scala @@ -18,9 +18,12 @@ object NoSuchResource extends ShapeTag.Companion[NoSuchResource] { smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(resourceType: String): NoSuchResource = NoSuchResource(resourceType) + implicit val schema: Schema[NoSuchResource] = struct( string.required[NoSuchResource]("resourceType", _.resourceType), ){ - NoSuchResource.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/NonEmptyListFormat.scala b/modules/bootstrapped/src/generated/smithy4s/example/NonEmptyListFormat.scala index c8d5d0be9..26bb31475 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/NonEmptyListFormat.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/NonEmptyListFormat.scala @@ -15,5 +15,6 @@ object NonEmptyListFormat extends ShapeTag.Companion[NonEmptyListFormat] { smithy.api.Trait(selector = Some("list"), structurallyExclusive = None, conflicts = None, breakingChanges = None), ).lazily + implicit val schema: Schema[NonEmptyListFormat] = constant(NonEmptyListFormat()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/NonEmptyMapFormat.scala b/modules/bootstrapped/src/generated/smithy4s/example/NonEmptyMapFormat.scala index eda0b05aa..be005727d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/NonEmptyMapFormat.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/NonEmptyMapFormat.scala @@ -15,5 +15,6 @@ object NonEmptyMapFormat extends ShapeTag.Companion[NonEmptyMapFormat] { smithy.api.Trait(selector = Some("map"), structurallyExclusive = None, conflicts = None, breakingChanges = None), ).lazily + implicit val schema: Schema[NonEmptyMapFormat] = constant(NonEmptyMapFormat()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/NotFoundError.scala b/modules/bootstrapped/src/generated/smithy4s/example/NotFoundError.scala index 5a638aef3..9a627fa6b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/NotFoundError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/NotFoundError.scala @@ -19,9 +19,12 @@ object NotFoundError extends ShapeTag.Companion[NotFoundError] { smithy.api.HttpError(404), ).lazily + // constructor using the original order from the spec + private def make(name: String): NotFoundError = NotFoundError(name) + implicit val schema: Schema[NotFoundError] = struct( string.required[NotFoundError]("name", _.name), ){ - NotFoundError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Numeric.scala b/modules/bootstrapped/src/generated/smithy4s/example/Numeric.scala index 8994a6dea..42ca93bb5 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Numeric.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Numeric.scala @@ -20,6 +20,9 @@ object Numeric extends ShapeTag.Companion[Numeric] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(i: Int, f: Float, d: Double, s: Short, l: Long, bi: BigInt, bd: BigDecimal): Numeric = Numeric(i, f, d, s, l, bi, bd) + implicit val schema: Schema[Numeric] = struct( int.field[Numeric]("i", _.i).addHints(smithy.api.Default(smithy4s.Document.fromDouble(1.0d))), float.field[Numeric]("f", _.f).addHints(smithy.api.Default(smithy4s.Document.fromDouble(1.0d))), @@ -29,6 +32,6 @@ object Numeric extends ShapeTag.Companion[Numeric] { bigint.field[Numeric]("bi", _.bi).addHints(smithy.api.Default(smithy4s.Document.fromDouble(1.0d))), bigdecimal.field[Numeric]("bd", _.bd).addHints(smithy.api.Default(smithy4s.Document.fromDouble(1.0d))), ){ - Numeric.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/One.scala b/modules/bootstrapped/src/generated/smithy4s/example/One.scala index db79d736a..a6b63d89d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/One.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/One.scala @@ -14,9 +14,12 @@ object One extends ShapeTag.Companion[One] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(value: Option[String]): One = One(value) + implicit val schema: Schema[One] = struct( string.optional[One]("value", _.value), ){ - One.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/OperationInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/OperationInput.scala index 6640a2556..87bf99b27 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/OperationInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/OperationInput.scala @@ -16,18 +16,21 @@ object OperationInput extends ShapeTag.Companion[OperationInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(optional: Option[String], optionalWithDefault: String, requiredLabel: String, requiredWithDefault: String, optionalHeader: Option[String], optionalHeaderWithDefault: String, requiredHeaderWithDefault: String, optionalQuery: Option[String], optionalQueryWithDefault: String, requiredQueryWithDefault: String): OperationInput = OperationInput(optionalWithDefault, requiredLabel, requiredWithDefault, optionalHeaderWithDefault, requiredHeaderWithDefault, optionalQueryWithDefault, requiredQueryWithDefault, optional, optionalHeader, optionalQuery) + implicit val schema: Schema[OperationInput] = struct( + string.optional[OperationInput]("optional", _.optional), string.field[OperationInput]("optionalWithDefault", _.optionalWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("optional-default"))), string.required[OperationInput]("requiredLabel", _.requiredLabel).addHints(smithy.api.Default(smithy4s.Document.fromString("required-label-with-default")), smithy.api.HttpLabel()), string.required[OperationInput]("requiredWithDefault", _.requiredWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("required-default"))), + string.optional[OperationInput]("optionalHeader", _.optionalHeader).addHints(smithy.api.HttpHeader("optional-header")), string.field[OperationInput]("optionalHeaderWithDefault", _.optionalHeaderWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("optional-header-with-default")), smithy.api.HttpHeader("optional-header-with-default")), string.required[OperationInput]("requiredHeaderWithDefault", _.requiredHeaderWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("required-header-with-default")), smithy.api.HttpHeader("required-header-with-default")), + string.optional[OperationInput]("optionalQuery", _.optionalQuery).addHints(smithy.api.HttpQuery("optional-query")), string.field[OperationInput]("optionalQueryWithDefault", _.optionalQueryWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("optional-query-with-default")), smithy.api.HttpQuery("optional-query-with-default")), string.field[OperationInput]("requiredQueryWithDefault", _.requiredQueryWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("required-query-with-default")), smithy.api.HttpQuery("required-query-with-default")), - string.optional[OperationInput]("optional", _.optional), - string.optional[OperationInput]("optionalHeader", _.optionalHeader).addHints(smithy.api.HttpHeader("optional-header")), - string.optional[OperationInput]("optionalQuery", _.optionalQuery).addHints(smithy.api.HttpQuery("optional-query")), ){ - OperationInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/OperationOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/OperationOutput.scala index c059e1ac9..5f8ada5db 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/OperationOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/OperationOutput.scala @@ -16,14 +16,17 @@ object OperationOutput extends ShapeTag.Companion[OperationOutput] { smithy.api.Output(), ).lazily + // constructor using the original order from the spec + private def make(optional: Option[String], optionalWithDefault: String, requiredWithDefault: String, optionalHeader: Option[String], optionalHeaderWithDefault: String, requiredHeaderWithDefault: String): OperationOutput = OperationOutput(optionalWithDefault, requiredWithDefault, optionalHeaderWithDefault, requiredHeaderWithDefault, optional, optionalHeader) + implicit val schema: Schema[OperationOutput] = struct( + string.optional[OperationOutput]("optional", _.optional), string.field[OperationOutput]("optionalWithDefault", _.optionalWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("optional-default"))), string.required[OperationOutput]("requiredWithDefault", _.requiredWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("required-default"))), + string.optional[OperationOutput]("optionalHeader", _.optionalHeader).addHints(smithy.api.HttpHeader("optional-header")), string.field[OperationOutput]("optionalHeaderWithDefault", _.optionalHeaderWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("optional-header-with-default")), smithy.api.HttpHeader("optional-header-with-default")), string.required[OperationOutput]("requiredHeaderWithDefault", _.requiredHeaderWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("required-header-with-default")), smithy.api.HttpHeader("required-header-with-default")), - string.optional[OperationOutput]("optional", _.optional), - string.optional[OperationOutput]("optionalHeader", _.optionalHeader).addHints(smithy.api.HttpHeader("optional-header")), ){ - OperationOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/OpticsStructure.scala b/modules/bootstrapped/src/generated/smithy4s/example/OpticsStructure.scala index 2ab51fc3f..8bd79af13 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/OpticsStructure.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/OpticsStructure.scala @@ -18,9 +18,12 @@ object OpticsStructure extends ShapeTag.Companion[OpticsStructure] { val two: Lens[OpticsStructure, Option[OpticsEnum]] = Lens[OpticsStructure, Option[OpticsEnum]](_.two)(n => a => a.copy(two = n)) } + // constructor using the original order from the spec + private def make(two: Option[OpticsEnum]): OpticsStructure = OpticsStructure(two) + implicit val schema: Schema[OpticsStructure] = struct( OpticsEnum.schema.optional[OpticsStructure]("two", _.two), ){ - OpticsStructure.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/OptionalOutputOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/OptionalOutputOutput.scala index bfd1bb0cf..2b103d0c1 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/OptionalOutputOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/OptionalOutputOutput.scala @@ -16,9 +16,12 @@ object OptionalOutputOutput extends ShapeTag.Companion[OptionalOutputOutput] { smithy.api.Output(), ).lazily + // constructor using the original order from the spec + private def make(body: Option[String]): OptionalOutputOutput = OptionalOutputOutput(body) + implicit val schema: Schema[OptionalOutputOutput] = struct( string.optional[OptionalOutputOutput]("body", _.body).addHints(smithy.api.HttpPayload()), ){ - OptionalOutputOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/OrderType.scala b/modules/bootstrapped/src/generated/smithy4s/example/OrderType.scala index a670f643a..09e97407a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/OrderType.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/OrderType.scala @@ -55,11 +55,14 @@ object OrderType extends ShapeTag.Companion[OrderType] { smithy.api.Documentation("For an InStoreOrder a location ID isn\'t needed"), ).lazily + // constructor using the original order from the spec + private def make(id: OrderNumber, locationId: Option[String]): InStoreOrder = InStoreOrder(id, locationId) + val schema: Schema[InStoreOrder] = struct( OrderNumber.schema.required[InStoreOrder]("id", _.id), string.optional[InStoreOrder]("locationId", _.locationId), ){ - InStoreOrder.apply + make }.withId(id).addHints(hints) val alt = schema.oneOf[OrderType]("inStore") diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PackedInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/PackedInput.scala index 7f376b9b0..1656e90ee 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PackedInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PackedInput.scala @@ -14,9 +14,12 @@ object PackedInput extends ShapeTag.Companion[PackedInput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(key: String): PackedInput = PackedInput(key) + implicit val schema: Schema[PackedInput] = struct( string.required[PackedInput]("key", _.key), ){ - PackedInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Patchable.scala b/modules/bootstrapped/src/generated/smithy4s/example/Patchable.scala index a681d2627..6fef05f07 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Patchable.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Patchable.scala @@ -15,9 +15,12 @@ object Patchable extends ShapeTag.Companion[Patchable] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(allowExplicitNull: Option[Nullable[Int]]): Patchable = Patchable(allowExplicitNull) + implicit val schema: Schema[Patchable] = struct( int.nullable.optional[Patchable]("allowExplicitNull", _.allowExplicitNull), ){ - Patchable.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PatchableEdgeCases.scala b/modules/bootstrapped/src/generated/smithy4s/example/PatchableEdgeCases.scala index d2681ab34..c755ac6f6 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PatchableEdgeCases.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PatchableEdgeCases.scala @@ -16,6 +16,9 @@ object PatchableEdgeCases extends ShapeTag.Companion[PatchableEdgeCases] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(required: Nullable[Int], requiredDefaultValue: Nullable[Int], requiredDefaultNull: Nullable[Int], defaultValue: Nullable[Int], defaultNull: Nullable[Int]): PatchableEdgeCases = PatchableEdgeCases(required, requiredDefaultValue, requiredDefaultNull, defaultValue, defaultNull) + implicit val schema: Schema[PatchableEdgeCases] = struct( int.nullable.required[PatchableEdgeCases]("required", _.required), int.nullable.required[PatchableEdgeCases]("requiredDefaultValue", _.requiredDefaultValue).addHints(smithy.api.Default(smithy4s.Document.fromDouble(3.0d))), @@ -23,6 +26,6 @@ object PatchableEdgeCases extends ShapeTag.Companion[PatchableEdgeCases] { int.nullable.field[PatchableEdgeCases]("defaultValue", _.defaultValue).addHints(smithy.api.Default(smithy4s.Document.fromDouble(5.0d))), int.nullable.field[PatchableEdgeCases]("defaultNull", _.defaultNull).addHints(smithy.api.Default(smithy4s.Document.nullDoc)), ){ - PatchableEdgeCases.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PathParams.scala b/modules/bootstrapped/src/generated/smithy4s/example/PathParams.scala index c6636f79f..01ea3e7ae 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PathParams.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PathParams.scala @@ -18,6 +18,9 @@ object PathParams extends ShapeTag.Companion[PathParams] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(str: String, int: Int, ts1: Timestamp, ts2: Timestamp, ts3: Timestamp, ts4: Timestamp, b: Boolean, ie: Numbers): PathParams = PathParams(str, int, ts1, ts2, ts3, ts4, b, ie) + implicit val schema: Schema[PathParams] = struct( string.required[PathParams]("str", _.str).addHints(smithy.api.HttpLabel()), int.required[PathParams]("int", _.int).addHints(smithy.api.HttpLabel()), @@ -28,6 +31,6 @@ object PathParams extends ShapeTag.Companion[PathParams] { boolean.required[PathParams]("b", _.b).addHints(smithy.api.HttpLabel()), Numbers.schema.required[PathParams]("ie", _.ie).addHints(smithy.api.HttpLabel()), ){ - PathParams.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PayloadData.scala b/modules/bootstrapped/src/generated/smithy4s/example/PayloadData.scala index 010267664..677a51cd9 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PayloadData.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PayloadData.scala @@ -13,9 +13,12 @@ object PayloadData extends ShapeTag.Companion[PayloadData] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(testBiggerUnion: Option[TestBiggerUnion]): PayloadData = PayloadData(testBiggerUnion) + implicit val schema: Schema[PayloadData] = struct( TestBiggerUnion.schema.optional[PayloadData]("testBiggerUnion", _.testBiggerUnion), ){ - PayloadData.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Pizza.scala b/modules/bootstrapped/src/generated/smithy4s/example/Pizza.scala index 51abc7509..933bcc5e6 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Pizza.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Pizza.scala @@ -14,11 +14,14 @@ object Pizza extends ShapeTag.Companion[Pizza] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(name: String, base: PizzaBase, toppings: List[Ingredient]): Pizza = Pizza(name, base, toppings) + implicit val schema: Schema[Pizza] = struct( string.required[Pizza]("name", _.name), PizzaBase.schema.required[Pizza]("base", _.base), Ingredients.underlyingSchema.required[Pizza]("toppings", _.toppings), ){ - Pizza.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Podcast.scala b/modules/bootstrapped/src/generated/smithy4s/example/Podcast.scala index 71aa7dc5e..00e77a45e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Podcast.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Podcast.scala @@ -54,12 +54,15 @@ object Podcast extends ShapeTag.Companion[Podcast] { val durationMillis: Lens[Video, Option[Long]] = Lens[Video, Option[Long]](_.durationMillis)(n => a => a.copy(durationMillis = n)) } + // constructor using the original order from the spec + private def make(title: Option[String], url: Option[String], durationMillis: Option[Long]): Video = Video(title, url, durationMillis) + val schema: Schema[Video] = struct( string.optional[Video]("title", _.title), string.optional[Video]("url", _.url), long.optional[Video]("durationMillis", _.durationMillis), ){ - Video.apply + make }.withId(id).addHints(hints) val alt = schema.oneOf[Podcast]("video") @@ -79,12 +82,15 @@ object Podcast extends ShapeTag.Companion[Podcast] { val durationMillis: Lens[Audio, Option[Long]] = Lens[Audio, Option[Long]](_.durationMillis)(n => a => a.copy(durationMillis = n)) } + // constructor using the original order from the spec + private def make(title: Option[String], url: Option[String], durationMillis: Option[Long]): Audio = Audio(title, url, durationMillis) + val schema: Schema[Audio] = struct( string.optional[Audio]("title", _.title), string.optional[Audio]("url", _.url), long.optional[Audio]("durationMillis", _.durationMillis), ){ - Audio.apply + make }.withId(id).addHints(hints) val alt = schema.oneOf[Podcast]("audio") diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PriceError.scala b/modules/bootstrapped/src/generated/smithy4s/example/PriceError.scala index 017b2d358..c91af0620 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PriceError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PriceError.scala @@ -20,10 +20,13 @@ object PriceError extends ShapeTag.Companion[PriceError] { smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(message: String, code: Int): PriceError = PriceError(message, code) + implicit val schema: Schema[PriceError] = struct( string.required[PriceError]("message", _.message), int.required[PriceError]("code", _.code).addHints(smithy.api.HttpHeader("X-CODE")), ){ - PriceError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Product.scala b/modules/bootstrapped/src/generated/smithy4s/example/Product.scala index 9e17279df..18693bed1 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Product.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Product.scala @@ -13,5 +13,6 @@ object Product extends ShapeTag.Companion[Product] { val hints: Hints = Hints.empty + implicit val schema: Schema[Product] = constant(Product()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PutObjectInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/PutObjectInput.scala index e9b408d9e..f9ce0dc47 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PutObjectInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PutObjectInput.scala @@ -17,13 +17,16 @@ object PutObjectInput extends ShapeTag.Companion[PutObjectInput] { smithy.api.Documentation("A key and bucket is always required for putting a new file in a bucket"), ).lazily + // constructor using the original order from the spec + private def make(key: ObjectKey, bucketName: BucketName, foo: Option[LowHigh], someValue: Option[SomeValue], data: String): PutObjectInput = PutObjectInput(key, bucketName, data, foo, someValue) + implicit val schema: Schema[PutObjectInput] = struct( ObjectKey.schema.required[PutObjectInput]("key", _.key).addHints(smithy.api.HttpLabel()), BucketName.schema.required[PutObjectInput]("bucketName", _.bucketName).addHints(smithy.api.HttpLabel()), - string.required[PutObjectInput]("data", _.data).addHints(smithy.api.HttpPayload()), LowHigh.schema.optional[PutObjectInput]("foo", _.foo).addHints(smithy.api.HttpHeader("X-Foo")), SomeValue.schema.optional[PutObjectInput]("someValue", _.someValue).addHints(smithy.api.HttpQuery("paramName")), + string.required[PutObjectInput]("data", _.data).addHints(smithy.api.HttpPayload()), ){ - PutObjectInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PutStreamedObjectInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/PutStreamedObjectInput.scala index 3ec3d4d00..c9c917b01 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PutStreamedObjectInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PutStreamedObjectInput.scala @@ -14,9 +14,12 @@ object PutStreamedObjectInput extends ShapeTag.Companion[PutStreamedObjectInput] val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(key: String): PutStreamedObjectInput = PutStreamedObjectInput(key) + implicit val schema: Schema[PutStreamedObjectInput] = struct( string.required[PutStreamedObjectInput]("key", _.key), ){ - PutStreamedObjectInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Queries.scala b/modules/bootstrapped/src/generated/smithy4s/example/Queries.scala index 602f663d6..36f3b330b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Queries.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Queries.scala @@ -18,6 +18,9 @@ object Queries extends ShapeTag.Companion[Queries] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(str: Option[String], int: Option[Int], ts1: Option[Timestamp], ts2: Option[Timestamp], ts3: Option[Timestamp], ts4: Option[Timestamp], b: Option[Boolean], sl: Option[List[String]], ie: Option[Numbers], on: Option[OpenNums], ons: Option[OpenNumsStr], slm: Option[Map[String, String]]): Queries = Queries(str, int, ts1, ts2, ts3, ts4, b, sl, ie, on, ons, slm) + implicit val schema: Schema[Queries] = struct( string.optional[Queries]("str", _.str).addHints(smithy.api.HttpQuery("str")), int.optional[Queries]("int", _.int).addHints(smithy.api.HttpQuery("int")), @@ -32,6 +35,6 @@ object Queries extends ShapeTag.Companion[Queries] { OpenNumsStr.schema.optional[Queries]("ons", _.ons).addHints(smithy.api.HttpQuery("openNumsStr")), StringMap.underlyingSchema.optional[Queries]("slm", _.slm).addHints(smithy.api.HttpQueryParams()), ){ - Queries.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/QueriesWithDefaults.scala b/modules/bootstrapped/src/generated/smithy4s/example/QueriesWithDefaults.scala index 6b7849756..f66cd016d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/QueriesWithDefaults.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/QueriesWithDefaults.scala @@ -14,9 +14,12 @@ object QueriesWithDefaults extends ShapeTag.Companion[QueriesWithDefaults] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(dflt: String): QueriesWithDefaults = QueriesWithDefaults(dflt) + implicit val schema: Schema[QueriesWithDefaults] = struct( string.field[QueriesWithDefaults]("dflt", _.dflt).addHints(smithy.api.Default(smithy4s.Document.fromString("test")), smithy.api.HttpQuery("dflt")), ){ - QueriesWithDefaults.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientError.scala b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientError.scala index de03a5f6c..3eea7a1a5 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientError.scala @@ -19,9 +19,12 @@ object RandomOtherClientError extends ShapeTag.Companion[RandomOtherClientError] smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): RandomOtherClientError = RandomOtherClientError(message) + implicit val schema: Schema[RandomOtherClientError] = struct( string.optional[RandomOtherClientError]("message", _.message), ){ - RandomOtherClientError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientErrorWithCode.scala b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientErrorWithCode.scala index 9ad675321..ca3189976 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientErrorWithCode.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientErrorWithCode.scala @@ -20,9 +20,12 @@ object RandomOtherClientErrorWithCode extends ShapeTag.Companion[RandomOtherClie smithy.api.HttpError(404), ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): RandomOtherClientErrorWithCode = RandomOtherClientErrorWithCode(message) + implicit val schema: Schema[RandomOtherClientErrorWithCode] = struct( string.optional[RandomOtherClientErrorWithCode]("message", _.message), ){ - RandomOtherClientErrorWithCode.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerError.scala index c7d4236eb..eecfa7afa 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerError.scala @@ -19,9 +19,12 @@ object RandomOtherServerError extends ShapeTag.Companion[RandomOtherServerError] smithy.api.Error.SERVER.widen, ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): RandomOtherServerError = RandomOtherServerError(message) + implicit val schema: Schema[RandomOtherServerError] = struct( string.optional[RandomOtherServerError]("message", _.message), ){ - RandomOtherServerError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerErrorWithCode.scala b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerErrorWithCode.scala index 05f07af8a..70cc7cf70 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerErrorWithCode.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerErrorWithCode.scala @@ -20,9 +20,12 @@ object RandomOtherServerErrorWithCode extends ShapeTag.Companion[RandomOtherServ smithy.api.HttpError(503), ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): RandomOtherServerErrorWithCode = RandomOtherServerErrorWithCode(message) + implicit val schema: Schema[RandomOtherServerErrorWithCode] = struct( string.optional[RandomOtherServerErrorWithCode]("message", _.message), ){ - RandomOtherServerErrorWithCode.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RangeCheck.scala b/modules/bootstrapped/src/generated/smithy4s/example/RangeCheck.scala index f84a839fc..f13fc3641 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RangeCheck.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RangeCheck.scala @@ -16,9 +16,12 @@ object RangeCheck extends ShapeTag.Companion[RangeCheck] { smithy.api.Suppress(List("UnreferencedShape")), ).lazily + // constructor using the original order from the spec + private def make(qty: Int): RangeCheck = RangeCheck(qty) + implicit val schema: Schema[RangeCheck] = struct( int.validated(smithy.api.Range(min = Some(scala.math.BigDecimal(1.0)), max = None)).required[RangeCheck]("qty", _.qty), ){ - RangeCheck.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RecursiveInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/RecursiveInput.scala index 349001198..e11a0f26f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RecursiveInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RecursiveInput.scala @@ -14,9 +14,12 @@ object RecursiveInput extends ShapeTag.Companion[RecursiveInput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(hello: Option[smithy4s.example.RecursiveInput]): RecursiveInput = RecursiveInput(hello) + implicit val schema: Schema[RecursiveInput] = recursive(struct( smithy4s.example.RecursiveInput.schema.optional[RecursiveInput]("hello", _.hello), ){ - RecursiveInput.apply + make }.withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RecursiveTraitStructure.scala b/modules/bootstrapped/src/generated/smithy4s/example/RecursiveTraitStructure.scala index 943de8f25..95e830265 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RecursiveTraitStructure.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RecursiveTraitStructure.scala @@ -17,9 +17,12 @@ object RecursiveTraitStructure extends ShapeTag.Companion[RecursiveTraitStructur smithy.api.Trait(selector = None, structurallyExclusive = None, conflicts = None, breakingChanges = None), ).lazily + // constructor using the original order from the spec + private def make(name: Option[String]): RecursiveTraitStructure = RecursiveTraitStructure(name) + implicit val schema: Schema[RecursiveTraitStructure] = recursive(struct( string.optional[RecursiveTraitStructure]("name", _.name).addHints(smithy4s.example.RecursiveTraitStructure(name = None)), ){ - RecursiveTraitStructure.apply + make }.withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ReservationInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ReservationInput.scala index d5bf33d33..36aa1ce2f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ReservationInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ReservationInput.scala @@ -16,10 +16,13 @@ object ReservationInput extends ShapeTag.Companion[ReservationInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(name: String, town: Option[String]): ReservationInput = ReservationInput(name, town) + implicit val schema: Schema[ReservationInput] = struct( string.required[ReservationInput]("name", _.name).addHints(smithy.api.HttpLabel()), string.optional[ReservationInput]("town", _.town).addHints(smithy.api.HttpQuery("town")), ){ - ReservationInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ReservationOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ReservationOutput.scala index 42687bff3..70e7000b3 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ReservationOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ReservationOutput.scala @@ -16,9 +16,12 @@ object ReservationOutput extends ShapeTag.Companion[ReservationOutput] { smithy.api.Output(), ).lazily + // constructor using the original order from the spec + private def make(message: String): ReservationOutput = ReservationOutput(message) + implicit val schema: Schema[ReservationOutput] = struct( string.required[ReservationOutput]("message", _.message), ){ - ReservationOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RoundTripData.scala b/modules/bootstrapped/src/generated/smithy4s/example/RoundTripData.scala index 7c9082350..8416024df 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RoundTripData.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RoundTripData.scala @@ -14,12 +14,15 @@ object RoundTripData extends ShapeTag.Companion[RoundTripData] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(label: String, header: Option[String], query: Option[String], body: Option[String]): RoundTripData = RoundTripData(label, header, query, body) + implicit val schema: Schema[RoundTripData] = struct( string.required[RoundTripData]("label", _.label).addHints(smithy.api.HttpLabel()), string.optional[RoundTripData]("header", _.header).addHints(smithy.api.HttpHeader("HEADER")), string.optional[RoundTripData]("query", _.query).addHints(smithy.api.HttpQuery("query")), string.optional[RoundTripData]("body", _.body), ){ - RoundTripData.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Salad.scala b/modules/bootstrapped/src/generated/smithy4s/example/Salad.scala index fcbd941b6..ecc959fb1 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Salad.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Salad.scala @@ -14,10 +14,13 @@ object Salad extends ShapeTag.Companion[Salad] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(name: String, ingredients: List[Ingredient]): Salad = Salad(name, ingredients) + implicit val schema: Schema[Salad] = struct( string.required[Salad]("name", _.name), Ingredients.underlyingSchema.required[Salad]("ingredients", _.ingredients), ){ - Salad.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Serializable.scala b/modules/bootstrapped/src/generated/smithy4s/example/Serializable.scala index 843a8d197..d15f83013 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Serializable.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Serializable.scala @@ -13,5 +13,6 @@ object Serializable extends ShapeTag.Companion[Serializable] { val hints: Hints = Hints.empty + implicit val schema: Schema[Serializable] = constant(Serializable()).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/ServerError.scala index b99acea5d..4deeb0080 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ServerError.scala @@ -19,9 +19,12 @@ object ServerError extends ShapeTag.Companion[ServerError] { smithy.api.Error.SERVER.widen, ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): ServerError = ServerError(message) + implicit val schema: Schema[ServerError] = struct( string.optional[ServerError]("message", _.message), ){ - ServerError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ServerErrorCustomMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ServerErrorCustomMessage.scala index c8e2c48f2..0127f6b21 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ServerErrorCustomMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ServerErrorCustomMessage.scala @@ -19,9 +19,12 @@ object ServerErrorCustomMessage extends ShapeTag.Companion[ServerErrorCustomMess smithy.api.Error.SERVER.widen, ).lazily + // constructor using the original order from the spec + private def make(messageField: Option[String]): ServerErrorCustomMessage = ServerErrorCustomMessage(messageField) + implicit val schema: Schema[ServerErrorCustomMessage] = struct( string.optional[ServerErrorCustomMessage]("messageField", _.messageField), ){ - ServerErrorCustomMessage.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/SomeCollections.scala b/modules/bootstrapped/src/generated/smithy4s/example/SomeCollections.scala index 686b88c56..7e0f14ae6 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/SomeCollections.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/SomeCollections.scala @@ -16,11 +16,14 @@ object SomeCollections extends ShapeTag.Companion[SomeCollections] { smithy.api.Trait(selector = None, structurallyExclusive = None, conflicts = None, breakingChanges = None), ).lazily + // constructor using the original order from the spec + private def make(someList: List[String], someSet: Set[String], someMap: Map[String, String]): SomeCollections = SomeCollections(someList, someSet, someMap) + implicit val schema: Schema[SomeCollections] = recursive(struct( StringList.underlyingSchema.required[SomeCollections]("someList", _.someList), StringSet.underlyingSchema.required[SomeCollections]("someSet", _.someSet), StringMap.underlyingSchema.required[SomeCollections]("someMap", _.someMap), ){ - SomeCollections.apply + make }.withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/StructureConstrainingEnum.scala b/modules/bootstrapped/src/generated/smithy4s/example/StructureConstrainingEnum.scala index 12dc9e05e..e2befcd3c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/StructureConstrainingEnum.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/StructureConstrainingEnum.scala @@ -16,10 +16,13 @@ object StructureConstrainingEnum extends ShapeTag.Companion[StructureConstrainin val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(letter: Option[Letters], card: Option[FaceCard]): StructureConstrainingEnum = StructureConstrainingEnum(letter, card) + implicit val schema: Schema[StructureConstrainingEnum] = struct( Letters.schema.validated(smithy.api.Length(min = Some(2L), max = None)).validated(smithy.api.Pattern(s"$$aaa$$")).optional[StructureConstrainingEnum]("letter", _.letter), FaceCard.schema.validated(smithy.api.Range(min = None, max = Some(scala.math.BigDecimal(1.0)))).optional[StructureConstrainingEnum]("card", _.card), ){ - StructureConstrainingEnum.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedMember.scala b/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedMember.scala index 2e80c3efe..1871d1e75 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedMember.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedMember.scala @@ -15,9 +15,12 @@ object StructureWithRefinedMember extends ShapeTag.Companion[StructureWithRefine val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(otherAge: Option[smithy4s.refined.Age]): StructureWithRefinedMember = StructureWithRefinedMember(otherAge) + implicit val schema: Schema[StructureWithRefinedMember] = struct( int.refined[smithy4s.refined.Age](smithy4s.example.AgeFormat()).optional[StructureWithRefinedMember]("otherAge", _.otherAge), ){ - StructureWithRefinedMember.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedTypes.scala b/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedTypes.scala index baf14356a..622911680 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedTypes.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedTypes.scala @@ -13,6 +13,9 @@ object StructureWithRefinedTypes extends ShapeTag.Companion[StructureWithRefined val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(age: Age, personAge: PersonAge, requiredAge: Age, fancyList: Option[smithy4s.example.FancyList], unwrappedFancyList: Option[smithy4s.refined.FancyList], name: Option[smithy4s.example.Name], dogName: Option[smithy4s.refined.Name]): StructureWithRefinedTypes = StructureWithRefinedTypes(age, personAge, requiredAge, fancyList, unwrappedFancyList, name, dogName) + implicit val schema: Schema[StructureWithRefinedTypes] = struct( Age.schema.field[StructureWithRefinedTypes]("age", _.age).addHints(smithy.api.Default(smithy4s.Document.fromDouble(0.0d))), PersonAge.schema.field[StructureWithRefinedTypes]("personAge", _.personAge).addHints(smithy.api.Default(smithy4s.Document.fromDouble(0.0d))), @@ -22,6 +25,6 @@ object StructureWithRefinedTypes extends ShapeTag.Companion[StructureWithRefined smithy4s.example.Name.schema.optional[StructureWithRefinedTypes]("name", _.name), DogName.underlyingSchema.optional[StructureWithRefinedTypes]("dogName", _.dogName), ){ - StructureWithRefinedTypes.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestAdt.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestAdt.scala index 5860ece68..ef2bfe7fb 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestAdt.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestAdt.scala @@ -45,13 +45,16 @@ object TestAdt extends ShapeTag.Companion[TestAdt] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(lng: Option[Long], sht: Option[Short], blb: Option[Blob], str: Option[String]): AdtOne = AdtOne(lng, sht, blb, str) + val schema: Schema[AdtOne] = struct( long.optional[AdtOne]("lng", _.lng), short.optional[AdtOne]("sht", _.sht), bytes.optional[AdtOne]("blb", _.blb), string.optional[AdtOne]("str", _.str), ){ - AdtOne.apply + make }.withId(id).addHints(hints) val alt = schema.oneOf[TestAdt]("one") @@ -65,12 +68,15 @@ object TestAdt extends ShapeTag.Companion[TestAdt] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(lng: Option[Long], sht: Option[Short], int: Option[Int]): AdtTwo = AdtTwo(lng, sht, int) + val schema: Schema[AdtTwo] = struct( long.optional[AdtTwo]("lng", _.lng), short.optional[AdtTwo]("sht", _.sht), int.optional[AdtTwo]("int", _.int), ){ - AdtTwo.apply + make }.withId(id).addHints(hints) val alt = schema.oneOf[TestAdt]("two") diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestBody.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestBody.scala index 90ac42416..c8c5d5ebe 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestBody.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestBody.scala @@ -19,9 +19,12 @@ object TestBody extends ShapeTag.Companion[TestBody] { val data: Lens[TestBody, Option[String]] = Lens[TestBody, Option[String]](_.data)(n => a => a.copy(data = n)) } + // constructor using the original order from the spec + private def make(data: Option[String]): TestBody = TestBody(data) + implicit val schema: Schema[TestBody] = struct( string.validated(smithy.api.Length(min = Some(10L), max = None)).optional[TestBody]("data", _.data), ){ - TestBody.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedInput.scala index 0d5687de8..45bef9b96 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedInput.scala @@ -14,9 +14,12 @@ object TestDiscriminatedInput extends ShapeTag.Companion[TestDiscriminatedInput] val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(key: String): TestDiscriminatedInput = TestDiscriminatedInput(key) + implicit val schema: Schema[TestDiscriminatedInput] = struct( string.required[TestDiscriminatedInput]("key", _.key).addHints(smithy.api.HttpLabel()), ){ - TestDiscriminatedInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedOutput.scala index 11cfdc307..2dbd3f49b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedOutput.scala @@ -13,9 +13,12 @@ object TestDiscriminatedOutput extends ShapeTag.Companion[TestDiscriminatedOutpu val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(data: Option[PayloadData]): TestDiscriminatedOutput = TestDiscriminatedOutput(data) + implicit val schema: Schema[TestDiscriminatedOutput] = struct( PayloadData.schema.optional[TestDiscriminatedOutput]("data", _.data).addHints(smithy.api.HttpPayload()), ){ - TestDiscriminatedOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestEmptyMixin.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestEmptyMixin.scala index 6d8566a6c..80b97727e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestEmptyMixin.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestEmptyMixin.scala @@ -14,9 +14,12 @@ object TestEmptyMixin extends ShapeTag.Companion[TestEmptyMixin] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(a: Option[Long]): TestEmptyMixin = TestEmptyMixin(a) + implicit val schema: Schema[TestEmptyMixin] = struct( long.optional[TestEmptyMixin]("a", _.a), ){ - TestEmptyMixin.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestIdRef.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestIdRef.scala index 7189b2c52..875914011 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestIdRef.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestIdRef.scala @@ -14,10 +14,13 @@ object TestIdRef extends ShapeTag.Companion[TestIdRef] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(test: Option[ShapeId], test2: Option[TestIdRefTwo]): TestIdRef = TestIdRef(test, test2) + implicit val schema: Schema[TestIdRef] = struct( string.refined[ShapeId](smithy.api.IdRef(selector = "*", failWhenMissing = None, errorMessage = None)).optional[TestIdRef]("test", _.test), TestIdRefTwo.schema.optional[TestIdRef]("test2", _.test2), ){ - TestIdRef.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestInput.scala index a1b180044..4969f3486 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestInput.scala @@ -21,11 +21,14 @@ object TestInput extends ShapeTag.Companion[TestInput] { val queryParam: Lens[TestInput, Option[String]] = Lens[TestInput, Option[String]](_.queryParam)(n => a => a.copy(queryParam = n)) } + // constructor using the original order from the spec + private def make(pathParam: String, queryParam: Option[String], body: TestBody): TestInput = TestInput(pathParam, body, queryParam) + implicit val schema: Schema[TestInput] = struct( string.validated(smithy.api.Length(min = Some(10L), max = None)).required[TestInput]("pathParam", _.pathParam).addHints(smithy.api.HttpLabel()), - TestBody.schema.required[TestInput]("body", _.body).addHints(smithy.api.HttpPayload()), string.validated(smithy.api.Length(min = Some(10L), max = None)).optional[TestInput]("queryParam", _.queryParam).addHints(smithy.api.HttpQuery("queryParam")), + TestBody.schema.required[TestInput]("body", _.body).addHints(smithy.api.HttpPayload()), ){ - TestInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestMixinAdt.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestMixinAdt.scala index a6a02b8a3..19bcd6699 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestMixinAdt.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestMixinAdt.scala @@ -38,11 +38,14 @@ object TestMixinAdt extends ShapeTag.Companion[TestMixinAdt] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(a: Option[String], b: Option[Int]): TestAdtMemberWithMixin = TestAdtMemberWithMixin(a, b) + val schema: Schema[TestAdtMemberWithMixin] = struct( string.optional[TestAdtMemberWithMixin]("a", _.a), int.optional[TestAdtMemberWithMixin]("b", _.b), ){ - TestAdtMemberWithMixin.apply + make }.withId(id).addHints(hints) val alt = schema.oneOf[TestMixinAdt]("test") diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestStructurePatternTarget.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestStructurePatternTarget.scala index a075bba2b..27c3c97da 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestStructurePatternTarget.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestStructurePatternTarget.scala @@ -15,10 +15,13 @@ object TestStructurePatternTarget extends ShapeTag.Companion[TestStructurePatter val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(one: String, two: Int): TestStructurePatternTarget = TestStructurePatternTarget(one, two) + implicit val schema: Schema[TestStructurePatternTarget] = struct( string.required[TestStructurePatternTarget]("one", _.one), int.required[TestStructurePatternTarget]("two", _.two), ){ - TestStructurePatternTarget.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestTrait.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestTrait.scala index 4f88cfc5a..953f6b191 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestTrait.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestTrait.scala @@ -20,9 +20,12 @@ object TestTrait extends ShapeTag.Companion[TestTrait] { smithy.api.Trait(selector = None, structurallyExclusive = None, conflicts = None, breakingChanges = None), ).lazily + // constructor using the original order from the spec + private def make(orderType: Option[OrderType]): TestTrait = TestTrait(orderType) + implicit val schema: Schema[TestTrait] = recursive(struct( OrderType.schema.optional[TestTrait]("orderType", _.orderType), ){ - TestTrait.apply + make }.withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Three.scala b/modules/bootstrapped/src/generated/smithy4s/example/Three.scala index 27a20425d..43ac5163c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Three.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Three.scala @@ -14,9 +14,12 @@ object Three extends ShapeTag.Companion[Three] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(three: String): Three = Three(three) + implicit val schema: Schema[Three] = struct( string.required[Three]("three", _.three), ){ - Three.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Two.scala b/modules/bootstrapped/src/generated/smithy4s/example/Two.scala index 5e7a7b18f..18d8ba665 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Two.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Two.scala @@ -14,9 +14,12 @@ object Two extends ShapeTag.Companion[Two] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(value: Option[Int]): Two = Two(value) + implicit val schema: Schema[Two] = struct( int.optional[Two]("value", _.value), ){ - Two.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/UnauthorizedError.scala b/modules/bootstrapped/src/generated/smithy4s/example/UnauthorizedError.scala index 13c56808b..2317693b5 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/UnauthorizedError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/UnauthorizedError.scala @@ -18,9 +18,12 @@ object UnauthorizedError extends ShapeTag.Companion[UnauthorizedError] { smithy.api.Error.CLIENT.widen, ).lazily + // constructor using the original order from the spec + private def make(reason: String): UnauthorizedError = UnauthorizedError(reason) + implicit val schema: Schema[UnauthorizedError] = struct( string.required[UnauthorizedError]("reason", _.reason), ){ - UnauthorizedError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/UnknownServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/UnknownServerError.scala index a44b1a125..8f4fd5447 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/UnknownServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/UnknownServerError.scala @@ -19,11 +19,14 @@ object UnknownServerError extends ShapeTag.Companion[UnknownServerError] { smithy.api.HttpError(500), ).lazily + // constructor using the original order from the spec + private def make(errorCode: UnknownServerErrorCode, description: Option[String], stateHash: Option[String]): UnknownServerError = UnknownServerError(errorCode, description, stateHash) + implicit val schema: Schema[UnknownServerError] = struct( UnknownServerErrorCode.schema.required[UnknownServerError]("errorCode", _.errorCode), string.optional[UnknownServerError]("description", _.description), string.optional[UnknownServerError]("stateHash", _.stateHash), ){ - UnknownServerError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ValidationChecks.scala b/modules/bootstrapped/src/generated/smithy4s/example/ValidationChecks.scala index af58ae91c..7484b2228 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ValidationChecks.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ValidationChecks.scala @@ -15,11 +15,14 @@ object ValidationChecks extends ShapeTag.Companion[ValidationChecks] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(str: Option[String], lst: Option[List[String]], int: Option[Int]): ValidationChecks = ValidationChecks(str, lst, int) + implicit val schema: Schema[ValidationChecks] = struct( string.validated(smithy.api.Length(min = Some(1L), max = Some(10L))).optional[ValidationChecks]("str", _.str).addHints(smithy.api.HttpQuery("str")), StringList.underlyingSchema.validated(smithy.api.Length(min = Some(1L), max = Some(10L))).optional[ValidationChecks]("lst", _.lst).addHints(smithy.api.HttpQuery("lst")), int.validated(smithy.api.Range(min = Some(scala.math.BigDecimal(1.0)), max = Some(scala.math.BigDecimal(10.0)))).optional[ValidationChecks]("int", _.int).addHints(smithy.api.HttpQuery("int")), ){ - ValidationChecks.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Value.scala b/modules/bootstrapped/src/generated/smithy4s/example/Value.scala index 81a985299..044cfecee 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Value.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Value.scala @@ -14,9 +14,12 @@ object Value extends ShapeTag.Companion[Value] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(value: String): Value = Value(value) + implicit val schema: Schema[Value] = struct( string.required[Value]("value", _.value), ){ - Value.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/VersionOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/VersionOutput.scala index 2c86176da..0c672c8f7 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/VersionOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/VersionOutput.scala @@ -14,9 +14,12 @@ object VersionOutput extends ShapeTag.Companion[VersionOutput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(version: String): VersionOutput = VersionOutput(version) + implicit val schema: Schema[VersionOutput] = struct( string.required[VersionOutput]("version", _.version).addHints(smithy.api.HttpPayload()), ){ - VersionOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/ListInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/ListInput.scala index ab1d2962b..1367ce127 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/ListInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/ListInput.scala @@ -15,9 +15,12 @@ object ListInput extends ShapeTag.Companion[ListInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(list: List[String]): ListInput = ListInput(list) + implicit val schema: Schema[ListInput] = struct( MyList.underlyingSchema.required[ListInput]("list", _.list), ){ - ListInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/MapInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/MapInput.scala index 57e71784b..b58fc06ca 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/MapInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/MapInput.scala @@ -15,9 +15,12 @@ object MapInput extends ShapeTag.Companion[MapInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(value: Map[String, String]): MapInput = MapInput(value) + implicit val schema: Schema[MapInput] = struct( MyMap.underlyingSchema.required[MapInput]("value", _.value), ){ - MapInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/OptionInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/OptionInput.scala index 367455983..e0f4d0a4d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/OptionInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/OptionInput.scala @@ -15,9 +15,12 @@ object OptionInput extends ShapeTag.Companion[OptionInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(value: Option[String]): OptionInput = OptionInput(value) + implicit val schema: Schema[OptionInput] = struct( String.schema.optional[OptionInput]("value", _.value), ){ - OptionInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/Packagee.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/Packagee.scala index e2bfe2cf1..97b19e2db 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/Packagee.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/Packagee.scala @@ -14,9 +14,12 @@ object Packagee extends ShapeTag.Companion[Packagee] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(_class: Option[Int]): Packagee = Packagee(_class) + implicit val schema: Schema[Packagee] = struct( int.optional[Packagee]("class", _._class), ){ - Packagee.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordStructTrait.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordStructTrait.scala index 28af31c19..c33f68ac0 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordStructTrait.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordStructTrait.scala @@ -16,10 +16,13 @@ object ReservedKeywordStructTrait extends ShapeTag.Companion[ReservedKeywordStru smithy.api.Trait(selector = None, structurallyExclusive = None, conflicts = None, breakingChanges = None), ).lazily + // constructor using the original order from the spec + private def make(_implicit: String, _package: Option[Packagee]): ReservedKeywordStructTrait = ReservedKeywordStructTrait(_implicit, _package) + implicit val schema: Schema[ReservedKeywordStructTrait] = recursive(struct( String.schema.required[ReservedKeywordStructTrait]("implicit", _._implicit), Packagee.schema.optional[ReservedKeywordStructTrait]("package", _._package), ){ - ReservedKeywordStructTrait.apply + make }.withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordTraitExampleStruct.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordTraitExampleStruct.scala index a3fef97c4..20228c91c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordTraitExampleStruct.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordTraitExampleStruct.scala @@ -16,9 +16,12 @@ object ReservedKeywordTraitExampleStruct extends ShapeTag.Companion[ReservedKeyw smithy4s.example.collision.ReservedKeywordUnionTrait.PackageCase(smithy4s.example.collision.PackageUnion.ClassCase(42).widen).widen, ).lazily + // constructor using the original order from the spec + private def make(member: Option[String]): ReservedKeywordTraitExampleStruct = ReservedKeywordTraitExampleStruct(member) + implicit val schema: Schema[ReservedKeywordTraitExampleStruct] = struct( String.schema.optional[ReservedKeywordTraitExampleStruct]("member", _.member).addHints(smithy4s.example.collision.ReservedKeywordStructTrait(_implicit = smithy4s.example.collision.String("demo"), _package = Some(smithy4s.example.collision.Packagee(_class = Some(42)))), smithy4s.example.collision.ReservedKeywordUnionTrait.PackageCase(smithy4s.example.collision.PackageUnion.ClassCase(42).widen).widen), ){ - ReservedKeywordTraitExampleStruct.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/Scala3ReservedKeywords.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/Scala3ReservedKeywords.scala index e0846e10b..51f06200d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/Scala3ReservedKeywords.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/Scala3ReservedKeywords.scala @@ -13,10 +13,13 @@ object Scala3ReservedKeywords extends ShapeTag.Companion[Scala3ReservedKeywords] val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(_export: Option[String], _enum: Option[String]): Scala3ReservedKeywords = Scala3ReservedKeywords(_export, _enum) + implicit val schema: Schema[Scala3ReservedKeywords] = struct( String.schema.optional[Scala3ReservedKeywords]("export", _._export), String.schema.optional[Scala3ReservedKeywords]("enum", _._enum), ){ - Scala3ReservedKeywords.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/SetInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/SetInput.scala index 62f90ae3e..bc8b6c752 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/SetInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/SetInput.scala @@ -15,9 +15,12 @@ object SetInput extends ShapeTag.Companion[SetInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(set: Set[String]): SetInput = SetInput(set) + implicit val schema: Schema[SetInput] = struct( MySet.underlyingSchema.required[SetInput]("set", _.set), ){ - SetInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/TestReservedNamespaceImport.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/TestReservedNamespaceImport.scala index e05d3bda3..18e09d75b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/TestReservedNamespaceImport.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/TestReservedNamespaceImport.scala @@ -14,9 +14,12 @@ object TestReservedNamespaceImport extends ShapeTag.Companion[TestReservedNamesp val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(_package: Option[MyPackageString]): TestReservedNamespaceImport = TestReservedNamespaceImport(_package) + implicit val schema: Schema[TestReservedNamespaceImport] = struct( MyPackageString.schema.optional[TestReservedNamespaceImport]("package", _._package), ){ - TestReservedNamespaceImport.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/error/NotFoundError.scala b/modules/bootstrapped/src/generated/smithy4s/example/error/NotFoundError.scala index 1624a24ba..f179ca7c9 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/error/NotFoundError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/error/NotFoundError.scala @@ -19,9 +19,12 @@ object NotFoundError extends ShapeTag.Companion[NotFoundError] { smithy.api.HttpError(404), ).lazily + // constructor using the original order from the spec + private def make(error: Option[String]): NotFoundError = NotFoundError(error) + implicit val schema: Schema[NotFoundError] = struct( string.optional[NotFoundError]("error", _.error), ){ - NotFoundError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetInput.scala index e9d879052..12867b8eb 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetInput.scala @@ -16,9 +16,12 @@ object GreetInput extends ShapeTag.Companion[GreetInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(name: String): GreetInput = GreetInput(name) + implicit val schema: Schema[GreetInput] = struct( string.required[GreetInput]("name", _.name), ){ - GreetInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetOutput.scala index b4963ab10..b4b99578e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetOutput.scala @@ -16,9 +16,12 @@ object GreetOutput extends ShapeTag.Companion[GreetOutput] { smithy.api.Output(), ).lazily + // constructor using the original order from the spec + private def make(message: String): GreetOutput = GreetOutput(message) + implicit val schema: Schema[GreetOutput] = struct( string.required[GreetOutput]("message", _.message), ){ - GreetOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/HealthCheckOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/HealthCheckOutput.scala index 0f10b696d..3548e39c4 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/HealthCheckOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/HealthCheckOutput.scala @@ -16,9 +16,12 @@ object HealthCheckOutput extends ShapeTag.Companion[HealthCheckOutput] { smithy.api.Output(), ).lazily + // constructor using the original order from the spec + private def make(message: String): HealthCheckOutput = HealthCheckOutput(message) + implicit val schema: Schema[HealthCheckOutput] = struct( string.required[HealthCheckOutput]("message", _.message), ){ - HealthCheckOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/NotAuthorizedError.scala b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/NotAuthorizedError.scala index e665d4c3e..a8afaa13d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/NotAuthorizedError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/NotAuthorizedError.scala @@ -20,9 +20,12 @@ object NotAuthorizedError extends ShapeTag.Companion[NotAuthorizedError] { smithy.api.HttpError(401), ).lazily + // constructor using the original order from the spec + private def make(message: String): NotAuthorizedError = NotAuthorizedError(message) + implicit val schema: Schema[NotAuthorizedError] = struct( string.required[NotAuthorizedError]("message", _.message), ){ - NotAuthorizedError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/World.scala b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/World.scala index ce9eebb92..9bb897eba 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/World.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/World.scala @@ -14,9 +14,12 @@ object World extends ShapeTag.Companion[World] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(message: String): World = World(message) + implicit val schema: Schema[World] = struct( string.field[World]("message", _.message).addHints(smithy.api.Default(smithy4s.Document.fromString("World !"))), ){ - World.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/guides/hello/World.scala b/modules/bootstrapped/src/generated/smithy4s/example/guides/hello/World.scala index 855c310c9..3d3998c02 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/guides/hello/World.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/guides/hello/World.scala @@ -14,9 +14,12 @@ object World extends ShapeTag.Companion[World] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(message: String): World = World(message) + implicit val schema: Schema[World] = struct( string.field[World]("message", _.message).addHints(smithy.api.Default(smithy4s.Document.fromString("World !"))), ){ - World.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/hello/GenericServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/hello/GenericServerError.scala index d01b83fca..2e3ccb9c8 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/hello/GenericServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/hello/GenericServerError.scala @@ -20,9 +20,12 @@ object GenericServerError extends ShapeTag.Companion[GenericServerError] { smithy.api.HttpError(500), ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): GenericServerError = GenericServerError(message) + implicit val schema: Schema[GenericServerError] = struct( string.optional[GenericServerError]("message", _.message), ){ - GenericServerError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/hello/Greeting.scala b/modules/bootstrapped/src/generated/smithy4s/example/hello/Greeting.scala index 979eed29a..524579048 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/hello/Greeting.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/hello/Greeting.scala @@ -14,9 +14,12 @@ object Greeting extends ShapeTag.Companion[Greeting] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(message: String): Greeting = Greeting(message) + implicit val schema: Schema[Greeting] = struct( string.required[Greeting]("message", _.message), ){ - Greeting.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/hello/Person.scala b/modules/bootstrapped/src/generated/smithy4s/example/hello/Person.scala index 9f3790325..86d488269 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/hello/Person.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/hello/Person.scala @@ -14,10 +14,13 @@ object Person extends ShapeTag.Companion[Person] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(name: String, town: Option[String]): Person = Person(name, town) + implicit val schema: Schema[Person] = struct( string.required[Person]("name", _.name).addHints(smithy.api.HttpLabel()), string.optional[Person]("town", _.town).addHints(smithy.api.HttpQuery("town")), ){ - Person.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/hello/SpecificServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/hello/SpecificServerError.scala index a94923632..36b132739 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/hello/SpecificServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/hello/SpecificServerError.scala @@ -20,9 +20,12 @@ object SpecificServerError extends ShapeTag.Companion[SpecificServerError] { smithy.api.HttpError(599), ).lazily + // constructor using the original order from the spec + private def make(message: Option[String]): SpecificServerError = SpecificServerError(message) + implicit val schema: Schema[SpecificServerError] = struct( string.optional[SpecificServerError]("message", _.message), ){ - SpecificServerError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/import_test/OpOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/import_test/OpOutput.scala index 219a4bb6c..f92a73133 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/import_test/OpOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/import_test/OpOutput.scala @@ -14,9 +14,12 @@ object OpOutput extends ShapeTag.Companion[OpOutput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(output: String): OpOutput = OpOutput(output) + implicit val schema: Schema[OpOutput] = struct( string.required[OpOutput]("output", _.output).addHints(smithy.api.HttpPayload()), ){ - OpOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationInput.scala index 8f8203b72..c2ccd10aa 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationInput.scala @@ -16,9 +16,12 @@ object ExampleOperationInput extends ShapeTag.Companion[ExampleOperationInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(a: String): ExampleOperationInput = ExampleOperationInput(a) + implicit val schema: Schema[ExampleOperationInput] = struct( string.required[ExampleOperationInput]("a", _.a), ){ - ExampleOperationInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationOutput.scala index 520159ee2..a0f301f27 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationOutput.scala @@ -16,9 +16,12 @@ object ExampleOperationOutput extends ShapeTag.Companion[ExampleOperationOutput] smithy.api.Output(), ).lazily + // constructor using the original order from the spec + private def make(b: String): ExampleOperationOutput = ExampleOperationOutput(b) + implicit val schema: Schema[ExampleOperationOutput] = struct( string.required[ExampleOperationOutput]("b", _.b), ){ - ExampleOperationOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/Set.scala b/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/Set.scala index 1dc11c9c8..db76738c5 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/Set.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/Set.scala @@ -15,10 +15,13 @@ object Set extends ShapeTag.Companion[Set] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(someField: String, otherField: Int): Set = Set(someField, otherField) + implicit val schema: Schema[Set] = struct( string.required[Set]("someField", _.someField), int.required[Set]("otherField", _.otherField), ){ - Set.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/SetOpInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/SetOpInput.scala index 079966ce3..66cdf304a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/SetOpInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/SetOpInput.scala @@ -15,9 +15,12 @@ object SetOpInput extends ShapeTag.Companion[SetOpInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(set: Set): SetOpInput = SetOpInput(set) + implicit val schema: Schema[SetOpInput] = struct( Set.schema.required[SetOpInput]("set", _.set), ){ - SetOpInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/ComplexError.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/ComplexError.scala index 5d5ba693a..d78ef7314 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/ComplexError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/ComplexError.scala @@ -22,11 +22,14 @@ object ComplexError extends ShapeTag.Companion[ComplexError] { smithy.test.HttpResponseTests(List(smithy.test.HttpResponseTestCase(id = "complex_error", protocol = smithy4s.ShapeId(namespace = "alloy", name = "simpleRestJson"), code = 504, authScheme = None, headers = None, forbidHeaders = None, requireHeaders = Some(List("X-Error-Type")), body = Some("{\"value\":-1,\"message\":\"some error message\",\"details\":{\"date\":123,\"location\":\"NYC\"}}"), bodyMediaType = Some("application/json"), params = Some(smithy4s.Document.obj("value" -> smithy4s.Document.fromDouble(-1.0d), "message" -> smithy4s.Document.fromString("some error message"), "details" -> smithy4s.Document.obj("date" -> smithy4s.Document.fromDouble(123.0d), "location" -> smithy4s.Document.fromString("NYC")))), vendorParams = None, vendorParamsShape = None, documentation = None, tags = None, appliesTo = None), smithy.test.HttpResponseTestCase(id = "complex_error_no_details", protocol = smithy4s.ShapeId(namespace = "alloy", name = "simpleRestJson"), code = 504, authScheme = None, headers = None, forbidHeaders = None, requireHeaders = Some(List("X-Error-Type")), body = Some("{\"value\":-1,\"message\":\"some error message\"}"), bodyMediaType = Some("application/json"), params = Some(smithy4s.Document.obj("value" -> smithy4s.Document.fromDouble(-1.0d), "message" -> smithy4s.Document.fromString("some error message"))), vendorParams = None, vendorParamsShape = None, documentation = None, tags = None, appliesTo = None))), ).lazily + // constructor using the original order from the spec + private def make(value: Int, message: String, details: Option[ErrorDetails]): ComplexError = ComplexError(value, message, details) + implicit val schema: Schema[ComplexError] = struct( int.required[ComplexError]("value", _.value), string.required[ComplexError]("message", _.message), ErrorDetails.schema.optional[ComplexError]("details", _.details), ){ - ComplexError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/ErrorDetails.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/ErrorDetails.scala index bbf883f12..eca6ecec9 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/ErrorDetails.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/ErrorDetails.scala @@ -16,10 +16,13 @@ object ErrorDetails extends ShapeTag.Companion[ErrorDetails] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(date: Timestamp, location: String): ErrorDetails = ErrorDetails(date, location) + implicit val schema: Schema[ErrorDetails] = struct( timestamp.required[ErrorDetails]("date", _.date).addHints(smithy.api.TimestampFormat.EPOCH_SECONDS.widen), string.required[ErrorDetails]("location", _.location), ){ - ErrorDetails.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/HelloInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/HelloInput.scala index c16c11ba1..c2325672c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/HelloInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/HelloInput.scala @@ -16,9 +16,12 @@ object HelloInput extends ShapeTag.Companion[HelloInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(name: String): HelloInput = HelloInput(name) + implicit val schema: Schema[HelloInput] = struct( string.required[HelloInput]("name", _.name).addHints(smithy.api.HttpLabel()), ){ - HelloInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/HelloOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/HelloOutput.scala index 463a01f64..eb7f315ba 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/HelloOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/HelloOutput.scala @@ -16,9 +16,12 @@ object HelloOutput extends ShapeTag.Companion[HelloOutput] { smithy.api.Output(), ).lazily + // constructor using the original order from the spec + private def make(message: String): HelloOutput = HelloOutput(message) + implicit val schema: Schema[HelloOutput] = struct( string.required[HelloOutput]("message", _.message), ){ - HelloOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloInput.scala index df5ff96c1..fd2d67f46 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloInput.scala @@ -16,11 +16,14 @@ object SayHelloInput extends ShapeTag.Companion[SayHelloInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(greeting: Option[String], query: Option[String], name: Option[String]): SayHelloInput = SayHelloInput(greeting, query, name) + implicit val schema: Schema[SayHelloInput] = struct( string.optional[SayHelloInput]("greeting", _.greeting).addHints(smithy.api.HttpHeader("X-Greeting")), string.optional[SayHelloInput]("query", _.query).addHints(smithy.api.HttpQuery("Hi")), string.optional[SayHelloInput]("name", _.name), ){ - SayHelloInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloOutput.scala index ff1f22f0c..6222023e3 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloOutput.scala @@ -14,10 +14,13 @@ object SayHelloOutput extends ShapeTag.Companion[SayHelloOutput] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(payload: SayHelloPayload, header1: String): SayHelloOutput = SayHelloOutput(payload, header1) + implicit val schema: Schema[SayHelloOutput] = struct( SayHelloPayload.schema.required[SayHelloOutput]("payload", _.payload).addHints(smithy.api.HttpPayload()), string.required[SayHelloOutput]("header1", _.header1).addHints(smithy.api.HttpHeader("X-H1")), ){ - SayHelloOutput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloPayload.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloPayload.scala index cd13d88b9..019f7d02b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloPayload.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloPayload.scala @@ -14,9 +14,12 @@ object SayHelloPayload extends ShapeTag.Companion[SayHelloPayload] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(result: String): SayHelloPayload = SayHelloPayload(result) + implicit val schema: Schema[SayHelloPayload] = struct( string.required[SayHelloPayload]("result", _.result), ){ - SayHelloPayload.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/SimpleError.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/SimpleError.scala index 4d48c4005..dce30a68a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/SimpleError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/SimpleError.scala @@ -19,9 +19,12 @@ object SimpleError extends ShapeTag.Companion[SimpleError] { smithy.test.HttpResponseTests(List(smithy.test.HttpResponseTestCase(id = "simple_error", protocol = smithy4s.ShapeId(namespace = "alloy", name = "simpleRestJson"), code = 400, authScheme = None, headers = None, forbidHeaders = None, requireHeaders = Some(List("X-Error-Type")), body = Some("{\"expected\":-1}"), bodyMediaType = Some("application/json"), params = Some(smithy4s.Document.obj("expected" -> smithy4s.Document.fromDouble(-1.0d))), vendorParams = None, vendorParamsShape = None, documentation = None, tags = None, appliesTo = None))), ).lazily + // constructor using the original order from the spec + private def make(expected: Int): SimpleError = SimpleError(expected) + implicit val schema: Schema[SimpleError] = struct( int.required[SimpleError]("expected", _.expected), ){ - SimpleError.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/TestPathInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/TestPathInput.scala index 9a0da39c7..45adf9349 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/TestPathInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/TestPathInput.scala @@ -16,9 +16,12 @@ object TestPathInput extends ShapeTag.Companion[TestPathInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(path: String): TestPathInput = TestPathInput(path) + implicit val schema: Schema[TestPathInput] = struct( string.required[TestPathInput]("path", _.path).addHints(smithy.api.HttpLabel()), ){ - TestPathInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/weather/Dog.scala b/modules/bootstrapped/src/generated/weather/Dog.scala index 8471bb189..23b1b4157 100644 --- a/modules/bootstrapped/src/generated/weather/Dog.scala +++ b/modules/bootstrapped/src/generated/weather/Dog.scala @@ -14,9 +14,12 @@ object Dog extends ShapeTag.Companion[Dog] { val hints: Hints = Hints.empty + // constructor using the original order from the spec + private def make(name: String): Dog = Dog(name) + implicit val schema: Schema[Dog] = struct( string.required[Dog]("name", _.name), ){ - Dog.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/weather/GetWeatherInput.scala b/modules/bootstrapped/src/generated/weather/GetWeatherInput.scala index 59deaf4b5..57b06d405 100644 --- a/modules/bootstrapped/src/generated/weather/GetWeatherInput.scala +++ b/modules/bootstrapped/src/generated/weather/GetWeatherInput.scala @@ -16,9 +16,12 @@ object GetWeatherInput extends ShapeTag.Companion[GetWeatherInput] { smithy.api.Input(), ).lazily + // constructor using the original order from the spec + private def make(city: String): GetWeatherInput = GetWeatherInput(city) + implicit val schema: Schema[GetWeatherInput] = struct( string.required[GetWeatherInput]("city", _.city).addHints(smithy.api.HttpLabel()), ){ - GetWeatherInput.apply + make }.withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/weather/GetWeatherOutput.scala b/modules/bootstrapped/src/generated/weather/GetWeatherOutput.scala index af2a2d943..bc9f818af 100644 --- a/modules/bootstrapped/src/generated/weather/GetWeatherOutput.scala +++ b/modules/bootstrapped/src/generated/weather/GetWeatherOutput.scala @@ -16,9 +16,12 @@ object GetWeatherOutput extends ShapeTag.Companion[GetWeatherOutput] { smithy.api.Output(), ).lazily + // constructor using the original order from the spec + private def make(weather: String): GetWeatherOutput = GetWeatherOutput(weather) + implicit val schema: Schema[GetWeatherOutput] = struct( string.required[GetWeatherOutput]("weather", _.weather), ){ - GetWeatherOutput.apply + make }.withId(id).addHints(hints) } From 831c75094b3b40627f513eaddc6bc87a5807ea95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=A9lois?= Date: Fri, 1 Mar 2024 15:26:54 +0100 Subject: [PATCH 3/6] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 898a87d5b..26fb8e2e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.18.11 + +* smithy4s Structure schemas are now retaining the original order of fields, as per the specification. + # 0.18.10 * Bumps alloy to 0.3.1. This is required as otherwise the `alloy#nullable` hints get filtered out when using SimpleRestJsonBuilder. From f0b79af38cfbf7f131a19c429b77e611589edb83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=A9lois?= Date: Mon, 4 Mar 2024 09:52:36 +0100 Subject: [PATCH 4/6] Avoid using curly brackets for `make` invocation --- modules/codegen/src/smithy4s/codegen/internals/Renderer.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala b/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala index b840b5d00..1d3e7de9a 100644 --- a/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala +++ b/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala @@ -737,8 +737,7 @@ private[internals] class Renderer(compilationUnit: CompilationUnit) { self => if (recursive) line"$recursive_($struct_" else line"$struct_" line"${schemaImplicit}val schema: $Schema_[${product.nameRef}] = $definition" .args(renderedFields) - .block(line"make") - .appendToLast(".withId(id).addHints(hints)") + .appendToLast("(make).withId(id).addHints(hints)") .appendToLast(if (recursive) ")" else "") } else { val definition = From 5bc7c6d3c508cab4a59982f5aa320dbef62b0b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=A9lois?= Date: Mon, 4 Mar 2024 09:52:54 +0100 Subject: [PATCH 5/6] Regenerate bootstrapped code --- .../amazonaws/dynamodb/DescribeEndpointsResponse.scala | 4 +--- .../src/generated/com/amazonaws/dynamodb/Endpoint.scala | 4 +--- .../com/amazonaws/dynamodb/InternalServerError.scala | 4 +--- .../com/amazonaws/dynamodb/InvalidEndpointException.scala | 4 +--- .../com/amazonaws/dynamodb/ListTablesInput.scala | 4 +--- .../com/amazonaws/dynamodb/ListTablesOutput.scala | 4 +--- .../src/generated/smithy4s/benchmark/Attributes.scala | 4 +--- .../generated/smithy4s/benchmark/CreateObjectInput.scala | 4 +--- .../src/generated/smithy4s/benchmark/Creds.scala | 4 +--- .../src/generated/smithy4s/benchmark/Encryption.scala | 4 +--- .../generated/smithy4s/benchmark/EncryptionMetadata.scala | 4 +--- .../src/generated/smithy4s/benchmark/Metadata.scala | 4 +--- .../src/generated/smithy4s/benchmark/Permission.scala | 4 +--- .../src/generated/smithy4s/benchmark/S3Object.scala | 4 +--- .../generated/smithy4s/benchmark/SendStringInput.scala | 4 +--- .../src/generated/smithy4s/example/AStructure.scala | 4 +--- .../src/generated/smithy4s/example/AddBrandsInput.scala | 4 +--- .../generated/smithy4s/example/AddMenuItemRequest.scala | 4 +--- .../generated/smithy4s/example/AddMenuItemResult.scala | 4 +--- .../src/generated/smithy4s/example/Candy.scala | 4 +--- .../src/generated/smithy4s/example/CityCoordinates.scala | 4 +--- .../src/generated/smithy4s/example/CitySummary.scala | 4 +--- .../src/generated/smithy4s/example/ClientError.scala | 4 +--- .../src/generated/smithy4s/example/CustomCodeInput.scala | 4 +--- .../src/generated/smithy4s/example/CustomCodeOutput.scala | 4 +--- .../smithy4s/example/DefaultInMixinUsageTest.scala | 4 +--- .../generated/smithy4s/example/DefaultOrderingTest.scala | 4 +--- .../src/generated/smithy4s/example/DefaultTest.scala | 4 +--- .../src/generated/smithy4s/example/DefaultVariants.scala | 4 +--- .../generated/smithy4s/example/DeprecatedStructure.scala | 4 +--- .../generated/smithy4s/example/DocumentationComment.scala | 4 +--- .../smithy4s/example/EHFallbackClientError.scala | 4 +--- .../smithy4s/example/EHFallbackServerError.scala | 4 +--- .../src/generated/smithy4s/example/EHNotFound.scala | 4 +--- .../generated/smithy4s/example/EHServiceUnavailable.scala | 4 +--- .../src/generated/smithy4s/example/EchoBody.scala | 4 +--- .../src/generated/smithy4s/example/EchoInput.scala | 4 +--- .../src/generated/smithy4s/example/EnvVarString.scala | 4 +--- .../smithy4s/example/ErrorCustomTypeMessage.scala | 4 +--- .../smithy4s/example/ErrorCustomTypeRequiredMessage.scala | 4 +--- .../smithy4s/example/ErrorHandlingOperationInput.scala | 4 +--- .../smithy4s/example/ErrorHandlingOperationOutput.scala | 4 +--- .../smithy4s/example/ErrorNullableCustomTypeMessage.scala | 4 +--- .../example/ErrorNullableCustomTypeRequiredMessage.scala | 4 +--- .../generated/smithy4s/example/ErrorNullableMessage.scala | 4 +--- .../smithy4s/example/ErrorNullableRequiredMessage.scala | 4 +--- .../generated/smithy4s/example/ErrorRequiredMessage.scala | 4 +--- .../smithy4s/example/ExtraErrorOperationInput.scala | 4 +--- .../src/generated/smithy4s/example/FallbackError.scala | 4 +--- .../src/generated/smithy4s/example/FallbackError2.scala | 4 +--- .../src/generated/smithy4s/example/Four.scala | 4 +--- .../generated/smithy4s/example/GenericClientError.scala | 4 +--- .../generated/smithy4s/example/GenericServerError.scala | 4 +--- .../src/generated/smithy4s/example/GetCityInput.scala | 4 +--- .../src/generated/smithy4s/example/GetCityOutput.scala | 4 +--- .../generated/smithy4s/example/GetCurrentTimeOutput.scala | 4 +--- .../src/generated/smithy4s/example/GetEnumInput.scala | 4 +--- .../src/generated/smithy4s/example/GetEnumOutput.scala | 4 +--- .../src/generated/smithy4s/example/GetFooOutput.scala | 4 +--- .../src/generated/smithy4s/example/GetForecastInput.scala | 4 +--- .../generated/smithy4s/example/GetForecastOutput.scala | 4 +--- .../src/generated/smithy4s/example/GetIntEnumInput.scala | 4 +--- .../src/generated/smithy4s/example/GetIntEnumOutput.scala | 4 +--- .../src/generated/smithy4s/example/GetMenuRequest.scala | 4 +--- .../src/generated/smithy4s/example/GetMenuResult.scala | 4 +--- .../src/generated/smithy4s/example/GetObjectInput.scala | 4 +--- .../src/generated/smithy4s/example/GetObjectOutput.scala | 4 +--- .../smithy4s/example/GetStreamedObjectInput.scala | 4 +--- .../generated/smithy4s/example/HeadRequestOutput.scala | 4 +--- .../generated/smithy4s/example/HeaderEndpointData.scala | 4 +--- .../src/generated/smithy4s/example/HeadersStruct.scala | 4 +--- .../generated/smithy4s/example/HeadersWithDefaults.scala | 4 +--- .../src/generated/smithy4s/example/HealthRequest.scala | 4 +--- .../src/generated/smithy4s/example/HealthResponse.scala | 4 +--- .../src/generated/smithy4s/example/HostLabelInput.scala | 4 +--- .../src/generated/smithy4s/example/IntList.scala | 4 +--- .../bootstrapped/src/generated/smithy4s/example/Key.scala | 4 +--- .../src/generated/smithy4s/example/KeyNotFoundError.scala | 4 +--- .../src/generated/smithy4s/example/KeyValue.scala | 4 +--- .../src/generated/smithy4s/example/ListCitiesInput.scala | 4 +--- .../src/generated/smithy4s/example/ListCitiesOutput.scala | 4 +--- .../generated/smithy4s/example/ListPublishersOutput.scala | 4 +--- .../src/generated/smithy4s/example/MenuItem.scala | 4 +--- .../generated/smithy4s/example/MixinErrorExample.scala | 4 +--- .../src/generated/smithy4s/example/MixinExample.scala | 4 +--- .../example/MixinOptionalMemberDefaultAdded.scala | 4 +--- .../smithy4s/example/MixinOptionalMemberOverride.scala | 4 +--- .../src/generated/smithy4s/example/MovieTheater.scala | 4 +--- .../src/generated/smithy4s/example/NoMoreSpace.scala | 4 +--- .../src/generated/smithy4s/example/NoSuchResource.scala | 4 +--- .../src/generated/smithy4s/example/NotFoundError.scala | 4 +--- .../src/generated/smithy4s/example/Numeric.scala | 4 +--- .../bootstrapped/src/generated/smithy4s/example/One.scala | 4 +--- .../src/generated/smithy4s/example/OperationInput.scala | 4 +--- .../src/generated/smithy4s/example/OperationOutput.scala | 4 +--- .../src/generated/smithy4s/example/OpticsStructure.scala | 4 +--- .../generated/smithy4s/example/OptionalOutputOutput.scala | 4 +--- .../src/generated/smithy4s/example/OrderType.scala | 4 +--- .../src/generated/smithy4s/example/PackedInput.scala | 4 +--- .../src/generated/smithy4s/example/Patchable.scala | 4 +--- .../generated/smithy4s/example/PatchableEdgeCases.scala | 4 +--- .../src/generated/smithy4s/example/PathParams.scala | 4 +--- .../src/generated/smithy4s/example/PayloadData.scala | 4 +--- .../src/generated/smithy4s/example/Pizza.scala | 4 +--- .../src/generated/smithy4s/example/Podcast.scala | 8 ++------ .../src/generated/smithy4s/example/PriceError.scala | 4 +--- .../src/generated/smithy4s/example/PutObjectInput.scala | 4 +--- .../smithy4s/example/PutStreamedObjectInput.scala | 4 +--- .../src/generated/smithy4s/example/Queries.scala | 4 +--- .../generated/smithy4s/example/QueriesWithDefaults.scala | 4 +--- .../smithy4s/example/RandomOtherClientError.scala | 4 +--- .../smithy4s/example/RandomOtherClientErrorWithCode.scala | 4 +--- .../smithy4s/example/RandomOtherServerError.scala | 4 +--- .../smithy4s/example/RandomOtherServerErrorWithCode.scala | 4 +--- .../src/generated/smithy4s/example/RangeCheck.scala | 4 +--- .../src/generated/smithy4s/example/RecursiveInput.scala | 4 +--- .../smithy4s/example/RecursiveTraitStructure.scala | 4 +--- .../src/generated/smithy4s/example/ReservationInput.scala | 4 +--- .../generated/smithy4s/example/ReservationOutput.scala | 4 +--- .../src/generated/smithy4s/example/RoundTripData.scala | 4 +--- .../src/generated/smithy4s/example/Salad.scala | 4 +--- .../src/generated/smithy4s/example/ServerError.scala | 4 +--- .../smithy4s/example/ServerErrorCustomMessage.scala | 4 +--- .../src/generated/smithy4s/example/SomeCollections.scala | 4 +--- .../smithy4s/example/StructureConstrainingEnum.scala | 4 +--- .../smithy4s/example/StructureWithRefinedMember.scala | 4 +--- .../smithy4s/example/StructureWithRefinedTypes.scala | 4 +--- .../src/generated/smithy4s/example/TestAdt.scala | 8 ++------ .../src/generated/smithy4s/example/TestBody.scala | 4 +--- .../smithy4s/example/TestDiscriminatedInput.scala | 4 +--- .../smithy4s/example/TestDiscriminatedOutput.scala | 4 +--- .../src/generated/smithy4s/example/TestEmptyMixin.scala | 4 +--- .../src/generated/smithy4s/example/TestIdRef.scala | 4 +--- .../src/generated/smithy4s/example/TestInput.scala | 4 +--- .../src/generated/smithy4s/example/TestMixinAdt.scala | 4 +--- .../smithy4s/example/TestStructurePatternTarget.scala | 4 +--- .../src/generated/smithy4s/example/TestTrait.scala | 4 +--- .../src/generated/smithy4s/example/Three.scala | 4 +--- .../bootstrapped/src/generated/smithy4s/example/Two.scala | 4 +--- .../generated/smithy4s/example/UnauthorizedError.scala | 4 +--- .../generated/smithy4s/example/UnknownServerError.scala | 4 +--- .../src/generated/smithy4s/example/ValidationChecks.scala | 4 +--- .../src/generated/smithy4s/example/Value.scala | 4 +--- .../src/generated/smithy4s/example/VersionOutput.scala | 4 +--- .../generated/smithy4s/example/collision/ListInput.scala | 4 +--- .../generated/smithy4s/example/collision/MapInput.scala | 4 +--- .../smithy4s/example/collision/OptionInput.scala | 4 +--- .../generated/smithy4s/example/collision/Packagee.scala | 4 +--- .../example/collision/ReservedKeywordStructTrait.scala | 4 +--- .../collision/ReservedKeywordTraitExampleStruct.scala | 4 +--- .../example/collision/Scala3ReservedKeywords.scala | 4 +--- .../generated/smithy4s/example/collision/SetInput.scala | 4 +--- .../example/collision/TestReservedNamespaceImport.scala | 4 +--- .../generated/smithy4s/example/error/NotFoundError.scala | 4 +--- .../src/generated/smithy4s/example/greet/GreetInput.scala | 4 +--- .../generated/smithy4s/example/greet/GreetOutput.scala | 4 +--- .../smithy4s/example/guides/auth/HealthCheckOutput.scala | 4 +--- .../smithy4s/example/guides/auth/NotAuthorizedError.scala | 4 +--- .../generated/smithy4s/example/guides/auth/World.scala | 4 +--- .../generated/smithy4s/example/guides/hello/World.scala | 4 +--- .../smithy4s/example/hello/GenericServerError.scala | 4 +--- .../src/generated/smithy4s/example/hello/Greeting.scala | 4 +--- .../src/generated/smithy4s/example/hello/Person.scala | 4 +--- .../smithy4s/example/hello/SpecificServerError.scala | 4 +--- .../generated/smithy4s/example/import_test/OpOutput.scala | 4 +--- .../smithy4s/example/product/ExampleOperationInput.scala | 4 +--- .../smithy4s/example/product/ExampleOperationOutput.scala | 4 +--- .../smithy4s/example/reservedNameOverride/Set.scala | 4 +--- .../example/reservedNameOverride/SetOpInput.scala | 4 +--- .../generated/smithy4s/example/test/ComplexError.scala | 4 +--- .../generated/smithy4s/example/test/ErrorDetails.scala | 4 +--- .../src/generated/smithy4s/example/test/HelloInput.scala | 4 +--- .../src/generated/smithy4s/example/test/HelloOutput.scala | 4 +--- .../generated/smithy4s/example/test/SayHelloInput.scala | 4 +--- .../generated/smithy4s/example/test/SayHelloOutput.scala | 4 +--- .../generated/smithy4s/example/test/SayHelloPayload.scala | 4 +--- .../src/generated/smithy4s/example/test/SimpleError.scala | 4 +--- .../generated/smithy4s/example/test/TestPathInput.scala | 4 +--- modules/bootstrapped/src/generated/weather/Dog.scala | 4 +--- .../src/generated/weather/GetWeatherInput.scala | 4 +--- .../src/generated/weather/GetWeatherOutput.scala | 4 +--- 181 files changed, 183 insertions(+), 549 deletions(-) diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsResponse.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsResponse.scala index f1a0a33d7..8ddcfc752 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsResponse.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsResponse.scala @@ -21,7 +21,5 @@ object DescribeEndpointsResponse extends ShapeTag.Companion[DescribeEndpointsRes implicit val schema: Schema[DescribeEndpointsResponse] = struct( Endpoints.underlyingSchema.required[DescribeEndpointsResponse]("Endpoints", _.endpoints).addHints(smithy.api.Documentation("

List of endpoints.

")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/Endpoint.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/Endpoint.scala index 66f4c95c4..61b6c6461 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/Endpoint.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/Endpoint.scala @@ -29,7 +29,5 @@ object Endpoint extends ShapeTag.Companion[Endpoint] { implicit val schema: Schema[Endpoint] = struct( string.required[Endpoint]("Address", _.address).addHints(smithy.api.Documentation("

IP address of the endpoint.

")), long.required[Endpoint]("CachePeriodInMinutes", _.cachePeriodInMinutes).addHints(smithy.api.Default(smithy4s.Document.fromDouble(0.0d)), smithy.api.Documentation("

Endpoint cache time to live (TTL) value.

")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InternalServerError.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InternalServerError.scala index 03e004357..623198cbf 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InternalServerError.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InternalServerError.scala @@ -28,7 +28,5 @@ object InternalServerError extends ShapeTag.Companion[InternalServerError] { implicit val schema: Schema[InternalServerError] = struct( ErrorMessage.schema.optional[InternalServerError]("message", _.message).addHints(smithy.api.Documentation("

The server encountered an internal error trying to fulfill the request.

")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InvalidEndpointException.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InvalidEndpointException.scala index b58732c38..51a63193d 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InvalidEndpointException.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InvalidEndpointException.scala @@ -25,7 +25,5 @@ object InvalidEndpointException extends ShapeTag.Companion[InvalidEndpointExcept implicit val schema: Schema[InvalidEndpointException] = struct( string.optional[InvalidEndpointException]("Message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesInput.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesInput.scala index 2522ac228..037d4fcb3 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesInput.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesInput.scala @@ -29,7 +29,5 @@ object ListTablesInput extends ShapeTag.Companion[ListTablesInput] { implicit val schema: Schema[ListTablesInput] = struct( TableName.schema.optional[ListTablesInput]("ExclusiveStartTableName", _.exclusiveStartTableName).addHints(smithy.api.Documentation("

The first table name that this operation will evaluate. Use the value that was returned for\n LastEvaluatedTableName in a previous operation, so that you can obtain the next page\n of results.

")), ListTablesInputLimit.schema.optional[ListTablesInput]("Limit", _.limit).addHints(smithy.api.Documentation("

A maximum number of table names to return. If this parameter is not specified, the limit is 100.

")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesOutput.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesOutput.scala index d91fcd3b8..e8af11772 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesOutput.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesOutput.scala @@ -34,7 +34,5 @@ object ListTablesOutput extends ShapeTag.Companion[ListTablesOutput] { implicit val schema: Schema[ListTablesOutput] = struct( TableNameList.underlyingSchema.optional[ListTablesOutput]("TableNames", _.tableNames).addHints(smithy.api.Documentation("

The names of the tables associated with the current account at the current endpoint. The maximum size of this array is 100.

\n

If LastEvaluatedTableName also appears in the output, you can use this value as the\n ExclusiveStartTableName parameter in a subsequent ListTables request and\n obtain the next page of results.

")), TableName.schema.optional[ListTablesOutput]("LastEvaluatedTableName", _.lastEvaluatedTableName).addHints(smithy.api.Documentation("

The name of the last table in the current page of results. Use this value as the\n ExclusiveStartTableName in a new request to obtain the next page of results, until\n all the table names are returned.

\n

If you do not receive a LastEvaluatedTableName value in the response, this means that\n there are no more table names to be retrieved.

")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/Attributes.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/Attributes.scala index 74a00febc..d40ca501d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/Attributes.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/Attributes.scala @@ -35,7 +35,5 @@ object Attributes extends ShapeTag.Companion[Attributes] { boolean.optional[Attributes]("backedUp", _.backedUp), ListMetadata.underlyingSchema.optional[Attributes]("metadata", _.metadata), Encryption.schema.optional[Attributes]("encryption", _.encryption), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/CreateObjectInput.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/CreateObjectInput.scala index 33d590048..cd7501c1b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/CreateObjectInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/CreateObjectInput.scala @@ -21,7 +21,5 @@ object CreateObjectInput extends ShapeTag.Companion[CreateObjectInput] { string.required[CreateObjectInput]("key", _.key).addHints(smithy.api.HttpLabel()), string.required[CreateObjectInput]("bucketName", _.bucketName).addHints(smithy.api.HttpLabel()), S3Object.schema.required[CreateObjectInput]("payload", _.payload).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/Creds.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/Creds.scala index 4418e09e1..8aaba1dd2 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/Creds.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/Creds.scala @@ -20,7 +20,5 @@ object Creds extends ShapeTag.Companion[Creds] { implicit val schema: Schema[Creds] = struct( string.optional[Creds]("user", _.user), string.optional[Creds]("key", _.key), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/Encryption.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/Encryption.scala index 64189ebf8..de97b01fa 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/Encryption.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/Encryption.scala @@ -23,7 +23,5 @@ object Encryption extends ShapeTag.Companion[Encryption] { string.optional[Encryption]("user", _.user), timestamp.optional[Encryption]("date", _.date).addHints(smithy.api.TimestampFormat.EPOCH_SECONDS.widen), EncryptionMetadata.schema.optional[Encryption]("metadata", _.metadata), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/EncryptionMetadata.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/EncryptionMetadata.scala index e2b7931b2..9e58f800a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/EncryptionMetadata.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/EncryptionMetadata.scala @@ -22,7 +22,5 @@ object EncryptionMetadata extends ShapeTag.Companion[EncryptionMetadata] { string.optional[EncryptionMetadata]("system", _.system), Creds.schema.optional[EncryptionMetadata]("credentials", _.credentials), boolean.optional[EncryptionMetadata]("partial", _.partial), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/Metadata.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/Metadata.scala index 75c62534c..007622850 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/Metadata.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/Metadata.scala @@ -26,7 +26,5 @@ object Metadata extends ShapeTag.Companion[Metadata] { string.optional[Metadata]("checkSum", _.checkSum), boolean.optional[Metadata]("pendingDeletion", _.pendingDeletion), string.optional[Metadata]("etag", _.etag), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/Permission.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/Permission.scala index b69135c2c..fc577ca0d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/Permission.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/Permission.scala @@ -21,7 +21,5 @@ object Permission extends ShapeTag.Companion[Permission] { boolean.optional[Permission]("read", _.read), boolean.optional[Permission]("write", _.write), boolean.optional[Permission]("directory", _.directory), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/S3Object.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/S3Object.scala index 595ea5937..7162dfa11 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/S3Object.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/S3Object.scala @@ -24,7 +24,5 @@ object S3Object extends ShapeTag.Companion[S3Object] { string.required[S3Object]("owner", _.owner), Attributes.schema.required[S3Object]("attributes", _.attributes), bytes.required[S3Object]("data", _.data), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/benchmark/SendStringInput.scala b/modules/bootstrapped/src/generated/smithy4s/benchmark/SendStringInput.scala index 9667d7d04..0c4d405a0 100644 --- a/modules/bootstrapped/src/generated/smithy4s/benchmark/SendStringInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/benchmark/SendStringInput.scala @@ -21,7 +21,5 @@ object SendStringInput extends ShapeTag.Companion[SendStringInput] { string.required[SendStringInput]("key", _.key).addHints(smithy.api.HttpLabel()), string.required[SendStringInput]("bucketName", _.bucketName).addHints(smithy.api.HttpLabel()), string.required[SendStringInput]("body", _.body).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/AStructure.scala b/modules/bootstrapped/src/generated/smithy4s/example/AStructure.scala index aa00b0243..2e1f4592f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/AStructure.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/AStructure.scala @@ -21,7 +21,5 @@ object AStructure extends ShapeTag.Companion[AStructure] { implicit val schema: Schema[AStructure] = struct( AString.schema.field[AStructure]("astring", _.astring).addHints(smithy.api.Default(smithy4s.Document.fromString("\"Hello World\" with \"quotes\""))), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/AddBrandsInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/AddBrandsInput.scala index 88947a2be..a9cf0f3cc 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/AddBrandsInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/AddBrandsInput.scala @@ -19,7 +19,5 @@ object AddBrandsInput extends ShapeTag.Companion[AddBrandsInput] { implicit val schema: Schema[AddBrandsInput] = struct( BrandList.underlyingSchema.optional[AddBrandsInput]("brands", _.brands), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemRequest.scala b/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemRequest.scala index 21587377e..e57299515 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemRequest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemRequest.scala @@ -20,7 +20,5 @@ object AddMenuItemRequest extends ShapeTag.Companion[AddMenuItemRequest] { implicit val schema: Schema[AddMenuItemRequest] = struct( string.required[AddMenuItemRequest]("restaurant", _.restaurant).addHints(smithy.api.HttpLabel()), MenuItem.schema.required[AddMenuItemRequest]("menuItem", _.menuItem).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemResult.scala b/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemResult.scala index 5b9f18fff..e1ac97a0f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemResult.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/AddMenuItemResult.scala @@ -22,7 +22,5 @@ object AddMenuItemResult extends ShapeTag.Companion[AddMenuItemResult] { implicit val schema: Schema[AddMenuItemResult] = struct( string.required[AddMenuItemResult]("itemId", _.itemId).addHints(smithy.api.HttpPayload()), timestamp.required[AddMenuItemResult]("added", _.added).addHints(smithy.api.TimestampFormat.EPOCH_SECONDS.widen, smithy.api.HttpHeader("X-ADDED-AT")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Candy.scala b/modules/bootstrapped/src/generated/smithy4s/example/Candy.scala index 202a29a28..7f95cff9c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Candy.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Candy.scala @@ -19,7 +19,5 @@ object Candy extends ShapeTag.Companion[Candy] { implicit val schema: Schema[Candy] = struct( string.optional[Candy]("name", _.name), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/CityCoordinates.scala b/modules/bootstrapped/src/generated/smithy4s/example/CityCoordinates.scala index 35426521c..37cdae0ed 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/CityCoordinates.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/CityCoordinates.scala @@ -20,7 +20,5 @@ object CityCoordinates extends ShapeTag.Companion[CityCoordinates] { implicit val schema: Schema[CityCoordinates] = struct( float.required[CityCoordinates]("latitude", _.latitude), float.required[CityCoordinates]("longitude", _.longitude), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/CitySummary.scala b/modules/bootstrapped/src/generated/smithy4s/example/CitySummary.scala index 710780f75..4b77303c9 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/CitySummary.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/CitySummary.scala @@ -22,7 +22,5 @@ object CitySummary extends ShapeTag.Companion[CitySummary] { implicit val schema: Schema[CitySummary] = struct( CityId.schema.required[CitySummary]("cityId", _.cityId), string.required[CitySummary]("name", _.name), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ClientError.scala b/modules/bootstrapped/src/generated/smithy4s/example/ClientError.scala index d6d53dc57..dd3ff9b3d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ClientError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ClientError.scala @@ -25,7 +25,5 @@ object ClientError extends ShapeTag.Companion[ClientError] { implicit val schema: Schema[ClientError] = struct( int.required[ClientError]("code", _.code), string.required[ClientError]("details", _.details), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeInput.scala index eca90764f..cebd448e0 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeInput.scala @@ -19,7 +19,5 @@ object CustomCodeInput extends ShapeTag.Companion[CustomCodeInput] { implicit val schema: Schema[CustomCodeInput] = struct( int.required[CustomCodeInput]("code", _.code).addHints(smithy.api.HttpLabel()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeOutput.scala index b8f9d7ea8..aedd9f5ac 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/CustomCodeOutput.scala @@ -19,7 +19,5 @@ object CustomCodeOutput extends ShapeTag.Companion[CustomCodeOutput] { implicit val schema: Schema[CustomCodeOutput] = struct( int.optional[CustomCodeOutput]("code", _.code).addHints(smithy.api.HttpResponseCode()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DefaultInMixinUsageTest.scala b/modules/bootstrapped/src/generated/smithy4s/example/DefaultInMixinUsageTest.scala index 5a259b153..91a8311d3 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DefaultInMixinUsageTest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DefaultInMixinUsageTest.scala @@ -19,7 +19,5 @@ object DefaultInMixinUsageTest extends ShapeTag.Companion[DefaultInMixinUsageTes implicit val schema: Schema[DefaultInMixinUsageTest] = struct( string.field[DefaultInMixinUsageTest]("one", _.one).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DefaultOrderingTest.scala b/modules/bootstrapped/src/generated/smithy4s/example/DefaultOrderingTest.scala index 0663f17e9..9860fdcb6 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DefaultOrderingTest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DefaultOrderingTest.scala @@ -22,7 +22,5 @@ object DefaultOrderingTest extends ShapeTag.Companion[DefaultOrderingTest] { int.field[DefaultOrderingTest]("one", _.one).addHints(smithy.api.Default(smithy4s.Document.fromDouble(1.0d))), string.optional[DefaultOrderingTest]("two", _.two), string.required[DefaultOrderingTest]("three", _.three), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DefaultTest.scala b/modules/bootstrapped/src/generated/smithy4s/example/DefaultTest.scala index ba0318af7..bc58468ea 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DefaultTest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DefaultTest.scala @@ -49,7 +49,5 @@ object DefaultTest extends ShapeTag.Companion[DefaultTest] { byte.field[DefaultTest]("sixteen", _.sixteen).addHints(smithy.api.Default(smithy4s.Document.fromDouble(0.0d))), bytes.field[DefaultTest]("seventeen", _.seventeen).addHints(smithy.api.Default(smithy4s.Document.array())), boolean.field[DefaultTest]("eighteen", _.eighteen).addHints(smithy.api.Default(smithy4s.Document.fromBoolean(false))), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DefaultVariants.scala b/modules/bootstrapped/src/generated/smithy4s/example/DefaultVariants.scala index 80d326dec..262c261f1 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DefaultVariants.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DefaultVariants.scala @@ -22,7 +22,5 @@ object DefaultVariants extends ShapeTag.Companion[DefaultVariants] { string.required[DefaultVariants]("reqDef", _.reqDef).addHints(smithy.api.Default(smithy4s.Document.fromString("default"))), string.optional[DefaultVariants]("opt", _.opt), string.field[DefaultVariants]("optDef", _.optDef).addHints(smithy.api.Default(smithy4s.Document.fromString("default"))), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedStructure.scala b/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedStructure.scala index 2dd6e1fc3..5016854e6 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedStructure.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DeprecatedStructure.scala @@ -25,7 +25,5 @@ object DeprecatedStructure extends ShapeTag.Companion[DeprecatedStructure] { Strings.underlyingSchema.optional[DeprecatedStructure]("other", _.other), string.optional[DeprecatedStructure]("name", _.name).addHints(smithy.api.Deprecated(message = None, since = None)), string.optional[DeprecatedStructure]("nameV2", _.nameV2), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/DocumentationComment.scala b/modules/bootstrapped/src/generated/smithy4s/example/DocumentationComment.scala index 688f41033..1095f0431 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/DocumentationComment.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/DocumentationComment.scala @@ -25,7 +25,5 @@ object DocumentationComment extends ShapeTag.Companion[DocumentationComment] { implicit val schema: Schema[DocumentationComment] = struct( string.optional[DocumentationComment]("member", _.member).addHints(smithy.api.Documentation("/*")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackClientError.scala b/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackClientError.scala index f8e10badd..40e8aa7ce 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackClientError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackClientError.scala @@ -24,7 +24,5 @@ object EHFallbackClientError extends ShapeTag.Companion[EHFallbackClientError] { implicit val schema: Schema[EHFallbackClientError] = struct( string.optional[EHFallbackClientError]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackServerError.scala index 03eec972b..441901fab 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EHFallbackServerError.scala @@ -24,7 +24,5 @@ object EHFallbackServerError extends ShapeTag.Companion[EHFallbackServerError] { implicit val schema: Schema[EHFallbackServerError] = struct( string.optional[EHFallbackServerError]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EHNotFound.scala b/modules/bootstrapped/src/generated/smithy4s/example/EHNotFound.scala index 439314098..fd9a3f468 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EHNotFound.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EHNotFound.scala @@ -25,7 +25,5 @@ object EHNotFound extends ShapeTag.Companion[EHNotFound] { implicit val schema: Schema[EHNotFound] = struct( string.optional[EHNotFound]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EHServiceUnavailable.scala b/modules/bootstrapped/src/generated/smithy4s/example/EHServiceUnavailable.scala index 0ce6ef873..896f71a0d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EHServiceUnavailable.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EHServiceUnavailable.scala @@ -25,7 +25,5 @@ object EHServiceUnavailable extends ShapeTag.Companion[EHServiceUnavailable] { implicit val schema: Schema[EHServiceUnavailable] = struct( string.optional[EHServiceUnavailable]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EchoBody.scala b/modules/bootstrapped/src/generated/smithy4s/example/EchoBody.scala index bac45a335..2aeb84a5f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EchoBody.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EchoBody.scala @@ -19,7 +19,5 @@ object EchoBody extends ShapeTag.Companion[EchoBody] { implicit val schema: Schema[EchoBody] = struct( string.validated(smithy.api.Length(min = Some(10L), max = None)).optional[EchoBody]("data", _.data), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EchoInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/EchoInput.scala index c77303d8f..e9f8952df 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EchoInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EchoInput.scala @@ -21,7 +21,5 @@ object EchoInput extends ShapeTag.Companion[EchoInput] { string.validated(smithy.api.Length(min = Some(10L), max = None)).required[EchoInput]("pathParam", _.pathParam).addHints(smithy.api.HttpLabel()), string.validated(smithy.api.Length(min = Some(10L), max = None)).optional[EchoInput]("queryParam", _.queryParam).addHints(smithy.api.HttpQuery("queryParam")), EchoBody.schema.required[EchoInput]("body", _.body).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/EnvVarString.scala b/modules/bootstrapped/src/generated/smithy4s/example/EnvVarString.scala index 252c8cd74..2e9bc526a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/EnvVarString.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/EnvVarString.scala @@ -25,7 +25,5 @@ object EnvVarString extends ShapeTag.Companion[EnvVarString] { implicit val schema: Schema[EnvVarString] = struct( string.optional[EnvVarString]("member", _.member).addHints(smithy.api.Documentation(s"This is meant to be used with $$ENV_VAR")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeMessage.scala index c41db954d..fa81d91a0 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeMessage.scala @@ -23,7 +23,5 @@ object ErrorCustomTypeMessage extends ShapeTag.Companion[ErrorCustomTypeMessage] implicit val schema: Schema[ErrorCustomTypeMessage] = struct( CustomErrorMessageType.schema.optional[ErrorCustomTypeMessage]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeRequiredMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeRequiredMessage.scala index 5383a88df..fde6e1f77 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeRequiredMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorCustomTypeRequiredMessage.scala @@ -23,7 +23,5 @@ object ErrorCustomTypeRequiredMessage extends ShapeTag.Companion[ErrorCustomType implicit val schema: Schema[ErrorCustomTypeRequiredMessage] = struct( CustomErrorMessageType.schema.required[ErrorCustomTypeRequiredMessage]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationInput.scala index 13fff9e99..42a5f4f4a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationInput.scala @@ -21,7 +21,5 @@ object ErrorHandlingOperationInput extends ShapeTag.Companion[ErrorHandlingOpera implicit val schema: Schema[ErrorHandlingOperationInput] = struct( string.optional[ErrorHandlingOperationInput]("in", _.in), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationOutput.scala index 71b78d2d0..1ca1a71d7 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorHandlingOperationOutput.scala @@ -21,7 +21,5 @@ object ErrorHandlingOperationOutput extends ShapeTag.Companion[ErrorHandlingOper implicit val schema: Schema[ErrorHandlingOperationOutput] = struct( string.optional[ErrorHandlingOperationOutput]("out", _.out), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeMessage.scala index 7295a2e64..94150c679 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeMessage.scala @@ -24,7 +24,5 @@ object ErrorNullableCustomTypeMessage extends ShapeTag.Companion[ErrorNullableCu implicit val schema: Schema[ErrorNullableCustomTypeMessage] = struct( CustomErrorMessageType.schema.nullable.optional[ErrorNullableCustomTypeMessage]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeRequiredMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeRequiredMessage.scala index 3df5985ad..3f1d27809 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeRequiredMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableCustomTypeRequiredMessage.scala @@ -24,7 +24,5 @@ object ErrorNullableCustomTypeRequiredMessage extends ShapeTag.Companion[ErrorNu implicit val schema: Schema[ErrorNullableCustomTypeRequiredMessage] = struct( CustomErrorMessageType.schema.nullable.required[ErrorNullableCustomTypeRequiredMessage]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableMessage.scala index 11270b8ea..98b55be67 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableMessage.scala @@ -25,7 +25,5 @@ object ErrorNullableMessage extends ShapeTag.Companion[ErrorNullableMessage] { implicit val schema: Schema[ErrorNullableMessage] = struct( string.nullable.optional[ErrorNullableMessage]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableRequiredMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableRequiredMessage.scala index 394f2f246..0a61bc849 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableRequiredMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorNullableRequiredMessage.scala @@ -25,7 +25,5 @@ object ErrorNullableRequiredMessage extends ShapeTag.Companion[ErrorNullableRequ implicit val schema: Schema[ErrorNullableRequiredMessage] = struct( string.nullable.required[ErrorNullableRequiredMessage]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ErrorRequiredMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ErrorRequiredMessage.scala index b8a0382e9..4cf9f5f91 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ErrorRequiredMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ErrorRequiredMessage.scala @@ -24,7 +24,5 @@ object ErrorRequiredMessage extends ShapeTag.Companion[ErrorRequiredMessage] { implicit val schema: Schema[ErrorRequiredMessage] = struct( string.required[ErrorRequiredMessage]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ExtraErrorOperationInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ExtraErrorOperationInput.scala index cc4d67008..a6913112e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ExtraErrorOperationInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ExtraErrorOperationInput.scala @@ -21,7 +21,5 @@ object ExtraErrorOperationInput extends ShapeTag.Companion[ExtraErrorOperationIn implicit val schema: Schema[ExtraErrorOperationInput] = struct( string.optional[ExtraErrorOperationInput]("in", _.in), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/FallbackError.scala b/modules/bootstrapped/src/generated/smithy4s/example/FallbackError.scala index 2a3597397..722bd8106 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/FallbackError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/FallbackError.scala @@ -23,7 +23,5 @@ object FallbackError extends ShapeTag.Companion[FallbackError] { implicit val schema: Schema[FallbackError] = struct( string.required[FallbackError]("error", _.error), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/FallbackError2.scala b/modules/bootstrapped/src/generated/smithy4s/example/FallbackError2.scala index 7217ddc0d..c73619a50 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/FallbackError2.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/FallbackError2.scala @@ -23,7 +23,5 @@ object FallbackError2 extends ShapeTag.Companion[FallbackError2] { implicit val schema: Schema[FallbackError2] = struct( string.required[FallbackError2]("error", _.error), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Four.scala b/modules/bootstrapped/src/generated/smithy4s/example/Four.scala index 17bee4f8b..d54de4517 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Four.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Four.scala @@ -19,7 +19,5 @@ object Four extends ShapeTag.Companion[Four] { implicit val schema: Schema[Four] = struct( int.required[Four]("four", _.four), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GenericClientError.scala b/modules/bootstrapped/src/generated/smithy4s/example/GenericClientError.scala index 701263a22..07ffb2a3a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GenericClientError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GenericClientError.scala @@ -25,7 +25,5 @@ object GenericClientError extends ShapeTag.Companion[GenericClientError] { implicit val schema: Schema[GenericClientError] = struct( string.required[GenericClientError]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GenericServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/GenericServerError.scala index 9b0c0be97..36045febe 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GenericServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GenericServerError.scala @@ -25,7 +25,5 @@ object GenericServerError extends ShapeTag.Companion[GenericServerError] { implicit val schema: Schema[GenericServerError] = struct( string.required[GenericServerError]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetCityInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetCityInput.scala index 68949caee..6e3122679 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetCityInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetCityInput.scala @@ -23,7 +23,5 @@ object GetCityInput extends ShapeTag.Companion[GetCityInput] { implicit val schema: Schema[GetCityInput] = struct( CityId.schema.required[GetCityInput]("cityId", _.cityId), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetCityOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetCityOutput.scala index f6c4a101f..84ff8b39c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetCityOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetCityOutput.scala @@ -20,7 +20,5 @@ object GetCityOutput extends ShapeTag.Companion[GetCityOutput] { implicit val schema: Schema[GetCityOutput] = struct( string.required[GetCityOutput]("name", _.name), CityCoordinates.schema.required[GetCityOutput]("coordinates", _.coordinates), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetCurrentTimeOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetCurrentTimeOutput.scala index 18cb015f3..b38a66e0b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetCurrentTimeOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetCurrentTimeOutput.scala @@ -20,7 +20,5 @@ object GetCurrentTimeOutput extends ShapeTag.Companion[GetCurrentTimeOutput] { implicit val schema: Schema[GetCurrentTimeOutput] = struct( timestamp.required[GetCurrentTimeOutput]("time", _.time), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetEnumInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetEnumInput.scala index 1f5d74274..1536de7e2 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetEnumInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetEnumInput.scala @@ -18,7 +18,5 @@ object GetEnumInput extends ShapeTag.Companion[GetEnumInput] { implicit val schema: Schema[GetEnumInput] = struct( TheEnum.schema.required[GetEnumInput]("aa", _.aa).addHints(smithy.api.HttpLabel()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetEnumOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetEnumOutput.scala index dab42c726..ef064c2cf 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetEnumOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetEnumOutput.scala @@ -19,7 +19,5 @@ object GetEnumOutput extends ShapeTag.Companion[GetEnumOutput] { implicit val schema: Schema[GetEnumOutput] = struct( string.optional[GetEnumOutput]("result", _.result), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetFooOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetFooOutput.scala index 2325a83bc..4c6eaf208 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetFooOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetFooOutput.scala @@ -23,7 +23,5 @@ object GetFooOutput extends ShapeTag.Companion[GetFooOutput] { implicit val schema: Schema[GetFooOutput] = struct( Foo.schema.optional[GetFooOutput]("foo", _.foo), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetForecastInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetForecastInput.scala index d1f6455cc..5b1365ff4 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetForecastInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetForecastInput.scala @@ -18,7 +18,5 @@ object GetForecastInput extends ShapeTag.Companion[GetForecastInput] { implicit val schema: Schema[GetForecastInput] = struct( CityId.schema.required[GetForecastInput]("cityId", _.cityId), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetForecastOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetForecastOutput.scala index ce31234f0..9fa701868 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetForecastOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetForecastOutput.scala @@ -23,7 +23,5 @@ object GetForecastOutput extends ShapeTag.Companion[GetForecastOutput] { implicit val schema: Schema[GetForecastOutput] = struct( ForecastResult.schema.optional[GetForecastOutput]("forecast", _.forecast), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumInput.scala index 698a1f883..7c714e350 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumInput.scala @@ -20,7 +20,5 @@ object GetIntEnumInput extends ShapeTag.Companion[GetIntEnumInput] { implicit val schema: Schema[GetIntEnumInput] = struct( EnumResult.schema.required[GetIntEnumInput]("aa", _.aa).addHints(smithy.api.HttpLabel()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumOutput.scala index 0e1997ae5..287a8bd7e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetIntEnumOutput.scala @@ -20,7 +20,5 @@ object GetIntEnumOutput extends ShapeTag.Companion[GetIntEnumOutput] { implicit val schema: Schema[GetIntEnumOutput] = struct( EnumResult.schema.required[GetIntEnumOutput]("result", _.result), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetMenuRequest.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetMenuRequest.scala index 886eef8c8..a43ac4351 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetMenuRequest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetMenuRequest.scala @@ -19,7 +19,5 @@ object GetMenuRequest extends ShapeTag.Companion[GetMenuRequest] { implicit val schema: Schema[GetMenuRequest] = struct( string.required[GetMenuRequest]("restaurant", _.restaurant).addHints(smithy.api.HttpLabel()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetMenuResult.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetMenuResult.scala index c31383fdc..f94913cdb 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetMenuResult.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetMenuResult.scala @@ -18,7 +18,5 @@ object GetMenuResult extends ShapeTag.Companion[GetMenuResult] { implicit val schema: Schema[GetMenuResult] = struct( Menu.underlyingSchema.required[GetMenuResult]("menu", _.menu).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetObjectInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetObjectInput.scala index 704e53b40..a226df6c1 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetObjectInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetObjectInput.scala @@ -32,7 +32,5 @@ object GetObjectInput extends ShapeTag.Companion[GetObjectInput] { implicit val schema: Schema[GetObjectInput] = struct( ObjectKey.schema.required[GetObjectInput]("key", _.key).addHints(smithy.api.Documentation("Sent in the URI label named \"key\".\nKey can also be seen as the filename\nIt is always required for a GET operation"), smithy.api.HttpLabel()), BucketName.schema.required[GetObjectInput]("bucketName", _.bucketName).addHints(smithy.api.Documentation("Sent in the URI label named \"bucketName\"."), smithy.api.HttpLabel()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetObjectOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetObjectOutput.scala index a321727ed..824e52cf5 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetObjectOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetObjectOutput.scala @@ -20,7 +20,5 @@ object GetObjectOutput extends ShapeTag.Companion[GetObjectOutput] { implicit val schema: Schema[GetObjectOutput] = struct( ObjectSize.schema.required[GetObjectOutput]("size", _.size).addHints(smithy.api.HttpHeader("X-Size")), string.optional[GetObjectOutput]("data", _.data).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectInput.scala index 3037e7bd6..528416385 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/GetStreamedObjectInput.scala @@ -19,7 +19,5 @@ object GetStreamedObjectInput extends ShapeTag.Companion[GetStreamedObjectInput] implicit val schema: Schema[GetStreamedObjectInput] = struct( string.required[GetStreamedObjectInput]("key", _.key), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HeadRequestOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/HeadRequestOutput.scala index 65a0e88f0..19d510ea6 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HeadRequestOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HeadRequestOutput.scala @@ -19,7 +19,5 @@ object HeadRequestOutput extends ShapeTag.Companion[HeadRequestOutput] { implicit val schema: Schema[HeadRequestOutput] = struct( string.required[HeadRequestOutput]("test", _.test).addHints(smithy.api.HttpHeader("Test")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HeaderEndpointData.scala b/modules/bootstrapped/src/generated/smithy4s/example/HeaderEndpointData.scala index 46cb0ce7c..009621f35 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HeaderEndpointData.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HeaderEndpointData.scala @@ -22,7 +22,5 @@ object HeaderEndpointData extends ShapeTag.Companion[HeaderEndpointData] { string.optional[HeaderEndpointData]("capitalizedHeader", _.capitalizedHeader).addHints(smithy.api.HttpHeader("X-Capitalized-Header")), string.optional[HeaderEndpointData]("lowercaseHeader", _.lowercaseHeader).addHints(smithy.api.HttpHeader("x-lowercase-header")), string.optional[HeaderEndpointData]("mixedHeader", _.mixedHeader).addHints(smithy.api.HttpHeader("x-MiXeD-hEaDEr")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HeadersStruct.scala b/modules/bootstrapped/src/generated/smithy4s/example/HeadersStruct.scala index f74344a58..e30a9db48 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HeadersStruct.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HeadersStruct.scala @@ -34,7 +34,5 @@ object HeadersStruct extends ShapeTag.Companion[HeadersStruct] { OpenNums.schema.optional[HeadersStruct]("on", _.on).addHints(smithy.api.HttpHeader("openNums")), OpenNumsStr.schema.optional[HeadersStruct]("ons", _.ons).addHints(smithy.api.HttpHeader("openNumsStr")), StringMap.underlyingSchema.optional[HeadersStruct]("slm", _.slm).addHints(smithy.api.HttpPrefixHeaders("foo-")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HeadersWithDefaults.scala b/modules/bootstrapped/src/generated/smithy4s/example/HeadersWithDefaults.scala index e54cc9667..0bf3b427b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HeadersWithDefaults.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HeadersWithDefaults.scala @@ -19,7 +19,5 @@ object HeadersWithDefaults extends ShapeTag.Companion[HeadersWithDefaults] { implicit val schema: Schema[HeadersWithDefaults] = struct( string.field[HeadersWithDefaults]("dflt", _.dflt).addHints(smithy.api.Default(smithy4s.Document.fromString("test")), smithy.api.HttpHeader("dflt")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HealthRequest.scala b/modules/bootstrapped/src/generated/smithy4s/example/HealthRequest.scala index ed53660ad..b3c11385e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HealthRequest.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HealthRequest.scala @@ -19,7 +19,5 @@ object HealthRequest extends ShapeTag.Companion[HealthRequest] { implicit val schema: Schema[HealthRequest] = struct( string.validated(smithy.api.Length(min = Some(0L), max = Some(5L))).optional[HealthRequest]("query", _.query).addHints(smithy.api.HttpQuery("query")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HealthResponse.scala b/modules/bootstrapped/src/generated/smithy4s/example/HealthResponse.scala index 2cdf7b243..cefc9a3a7 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HealthResponse.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HealthResponse.scala @@ -21,7 +21,5 @@ object HealthResponse extends ShapeTag.Companion[HealthResponse] { implicit val schema: Schema[HealthResponse] = struct( string.required[HealthResponse]("status", _.status), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/HostLabelInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/HostLabelInput.scala index 4a246321a..18f463fd3 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/HostLabelInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/HostLabelInput.scala @@ -21,7 +21,5 @@ object HostLabelInput extends ShapeTag.Companion[HostLabelInput] { string.required[HostLabelInput]("label1", _.label1).addHints(smithy.api.HostLabel()), string.required[HostLabelInput]("label2", _.label2).addHints(smithy.api.HostLabel()), HostLabelEnum.schema.required[HostLabelInput]("label3", _.label3).addHints(smithy.api.HostLabel()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/IntList.scala b/modules/bootstrapped/src/generated/smithy4s/example/IntList.scala index 7b45d7e34..d0fc634f7 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/IntList.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/IntList.scala @@ -21,7 +21,5 @@ object IntList extends ShapeTag.Companion[IntList] { implicit val schema: Schema[IntList] = recursive(struct( int.required[IntList]("head", _.head), smithy4s.example.IntList.schema.optional[IntList]("tail", _.tail), - ){ - make - }.withId(id).addHints(hints)) + )(make).withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Key.scala b/modules/bootstrapped/src/generated/smithy4s/example/Key.scala index 592d18558..258345f79 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Key.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Key.scala @@ -19,7 +19,5 @@ object Key extends ShapeTag.Companion[Key] { implicit val schema: Schema[Key] = struct( string.required[Key]("key", _.key), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/KeyNotFoundError.scala b/modules/bootstrapped/src/generated/smithy4s/example/KeyNotFoundError.scala index 07b103043..50d0f6e52 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/KeyNotFoundError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/KeyNotFoundError.scala @@ -24,7 +24,5 @@ object KeyNotFoundError extends ShapeTag.Companion[KeyNotFoundError] { implicit val schema: Schema[KeyNotFoundError] = struct( string.required[KeyNotFoundError]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/KeyValue.scala b/modules/bootstrapped/src/generated/smithy4s/example/KeyValue.scala index 6618ea793..5e348ec03 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/KeyValue.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/KeyValue.scala @@ -20,7 +20,5 @@ object KeyValue extends ShapeTag.Companion[KeyValue] { implicit val schema: Schema[KeyValue] = struct( string.required[KeyValue]("key", _.key), string.required[KeyValue]("value", _.value), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesInput.scala index 0c8195a0c..a15fe762f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesInput.scala @@ -21,7 +21,5 @@ object ListCitiesInput extends ShapeTag.Companion[ListCitiesInput] { implicit val schema: Schema[ListCitiesInput] = struct( string.optional[ListCitiesInput]("nextToken", _.nextToken), int.optional[ListCitiesInput]("pageSize", _.pageSize), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesOutput.scala index 4935ea243..c9e25e80f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ListCitiesOutput.scala @@ -20,7 +20,5 @@ object ListCitiesOutput extends ShapeTag.Companion[ListCitiesOutput] { implicit val schema: Schema[ListCitiesOutput] = struct( string.optional[ListCitiesOutput]("nextToken", _.nextToken), CitySummaries.underlyingSchema.required[ListCitiesOutput]("items", _.items), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ListPublishersOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ListPublishersOutput.scala index 0923cfdbe..386a71d1c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ListPublishersOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ListPublishersOutput.scala @@ -20,7 +20,5 @@ object ListPublishersOutput extends ShapeTag.Companion[ListPublishersOutput] { implicit val schema: Schema[ListPublishersOutput] = struct( PublishersList.underlyingSchema.required[ListPublishersOutput]("publishers", _.publishers), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MenuItem.scala b/modules/bootstrapped/src/generated/smithy4s/example/MenuItem.scala index 30efcb3f3..90cc511aa 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MenuItem.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MenuItem.scala @@ -20,7 +20,5 @@ object MenuItem extends ShapeTag.Companion[MenuItem] { implicit val schema: Schema[MenuItem] = struct( Food.schema.required[MenuItem]("food", _.food), float.required[MenuItem]("price", _.price), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MixinErrorExample.scala b/modules/bootstrapped/src/generated/smithy4s/example/MixinErrorExample.scala index 88874959c..16b55137a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MixinErrorExample.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MixinErrorExample.scala @@ -29,7 +29,5 @@ object MixinErrorExample extends ShapeTag.Companion[MixinErrorExample] { int.optional[MixinErrorExample]("b", _.b), long.optional[MixinErrorExample]("c", _.c), boolean.optional[MixinErrorExample]("d", _.d), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MixinExample.scala b/modules/bootstrapped/src/generated/smithy4s/example/MixinExample.scala index 4fc88a165..4e5aaeb1e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MixinExample.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MixinExample.scala @@ -25,7 +25,5 @@ object MixinExample extends ShapeTag.Companion[MixinExample] { int.optional[MixinExample]("b", _.b), long.optional[MixinExample]("c", _.c), boolean.optional[MixinExample]("d", _.d), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberDefaultAdded.scala b/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberDefaultAdded.scala index 316e4753e..67f33e1f5 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberDefaultAdded.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberDefaultAdded.scala @@ -19,7 +19,5 @@ object MixinOptionalMemberDefaultAdded extends ShapeTag.Companion[MixinOptionalM implicit val schema: Schema[MixinOptionalMemberDefaultAdded] = struct( string.field[MixinOptionalMemberDefaultAdded]("a", _.a).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberOverride.scala b/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberOverride.scala index 606e3361a..3db9db9ee 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberOverride.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MixinOptionalMemberOverride.scala @@ -19,7 +19,5 @@ object MixinOptionalMemberOverride extends ShapeTag.Companion[MixinOptionalMembe implicit val schema: Schema[MixinOptionalMemberOverride] = struct( string.required[MixinOptionalMemberOverride]("a", _.a), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/MovieTheater.scala b/modules/bootstrapped/src/generated/smithy4s/example/MovieTheater.scala index bffb168c8..4053c4a40 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/MovieTheater.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/MovieTheater.scala @@ -22,9 +22,7 @@ object MovieTheater extends ShapeTag.Companion[MovieTheater] { implicit val schema: Schema[MovieTheater] = struct( string.optional[MovieTheater]("name", _.name), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) implicit val movieTheaterHash: cats.Hash[MovieTheater] = SchemaVisitorHash.fromSchema(schema) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/NoMoreSpace.scala b/modules/bootstrapped/src/generated/smithy4s/example/NoMoreSpace.scala index 2e502a0fb..04a99f106 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/NoMoreSpace.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/NoMoreSpace.scala @@ -31,7 +31,5 @@ object NoMoreSpace extends ShapeTag.Companion[NoMoreSpace] { implicit val schema: Schema[NoMoreSpace] = struct( string.required[NoMoreSpace]("message", _.message), Foo.schema.optional[NoMoreSpace]("foo", _.foo), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/NoSuchResource.scala b/modules/bootstrapped/src/generated/smithy4s/example/NoSuchResource.scala index 4838f3f91..107b9581e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/NoSuchResource.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/NoSuchResource.scala @@ -23,7 +23,5 @@ object NoSuchResource extends ShapeTag.Companion[NoSuchResource] { implicit val schema: Schema[NoSuchResource] = struct( string.required[NoSuchResource]("resourceType", _.resourceType), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/NotFoundError.scala b/modules/bootstrapped/src/generated/smithy4s/example/NotFoundError.scala index 9a627fa6b..05355370e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/NotFoundError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/NotFoundError.scala @@ -24,7 +24,5 @@ object NotFoundError extends ShapeTag.Companion[NotFoundError] { implicit val schema: Schema[NotFoundError] = struct( string.required[NotFoundError]("name", _.name), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Numeric.scala b/modules/bootstrapped/src/generated/smithy4s/example/Numeric.scala index 42ca93bb5..ad8ffef6e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Numeric.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Numeric.scala @@ -31,7 +31,5 @@ object Numeric extends ShapeTag.Companion[Numeric] { long.field[Numeric]("l", _.l).addHints(smithy.api.Default(smithy4s.Document.fromDouble(1.0d))), bigint.field[Numeric]("bi", _.bi).addHints(smithy.api.Default(smithy4s.Document.fromDouble(1.0d))), bigdecimal.field[Numeric]("bd", _.bd).addHints(smithy.api.Default(smithy4s.Document.fromDouble(1.0d))), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/One.scala b/modules/bootstrapped/src/generated/smithy4s/example/One.scala index a6b63d89d..fd37a688a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/One.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/One.scala @@ -19,7 +19,5 @@ object One extends ShapeTag.Companion[One] { implicit val schema: Schema[One] = struct( string.optional[One]("value", _.value), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/OperationInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/OperationInput.scala index 87bf99b27..6a6f0b704 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/OperationInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/OperationInput.scala @@ -30,7 +30,5 @@ object OperationInput extends ShapeTag.Companion[OperationInput] { string.optional[OperationInput]("optionalQuery", _.optionalQuery).addHints(smithy.api.HttpQuery("optional-query")), string.field[OperationInput]("optionalQueryWithDefault", _.optionalQueryWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("optional-query-with-default")), smithy.api.HttpQuery("optional-query-with-default")), string.field[OperationInput]("requiredQueryWithDefault", _.requiredQueryWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("required-query-with-default")), smithy.api.HttpQuery("required-query-with-default")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/OperationOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/OperationOutput.scala index 5f8ada5db..19b2c128d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/OperationOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/OperationOutput.scala @@ -26,7 +26,5 @@ object OperationOutput extends ShapeTag.Companion[OperationOutput] { string.optional[OperationOutput]("optionalHeader", _.optionalHeader).addHints(smithy.api.HttpHeader("optional-header")), string.field[OperationOutput]("optionalHeaderWithDefault", _.optionalHeaderWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("optional-header-with-default")), smithy.api.HttpHeader("optional-header-with-default")), string.required[OperationOutput]("requiredHeaderWithDefault", _.requiredHeaderWithDefault).addHints(smithy.api.Default(smithy4s.Document.fromString("required-header-with-default")), smithy.api.HttpHeader("required-header-with-default")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/OpticsStructure.scala b/modules/bootstrapped/src/generated/smithy4s/example/OpticsStructure.scala index 8bd79af13..c1ac0af15 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/OpticsStructure.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/OpticsStructure.scala @@ -23,7 +23,5 @@ object OpticsStructure extends ShapeTag.Companion[OpticsStructure] { implicit val schema: Schema[OpticsStructure] = struct( OpticsEnum.schema.optional[OpticsStructure]("two", _.two), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/OptionalOutputOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/OptionalOutputOutput.scala index 2b103d0c1..1d3dfec7f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/OptionalOutputOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/OptionalOutputOutput.scala @@ -21,7 +21,5 @@ object OptionalOutputOutput extends ShapeTag.Companion[OptionalOutputOutput] { implicit val schema: Schema[OptionalOutputOutput] = struct( string.optional[OptionalOutputOutput]("body", _.body).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/OrderType.scala b/modules/bootstrapped/src/generated/smithy4s/example/OrderType.scala index 09e97407a..5a2dcdd22 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/OrderType.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/OrderType.scala @@ -61,9 +61,7 @@ object OrderType extends ShapeTag.Companion[OrderType] { val schema: Schema[InStoreOrder] = struct( OrderNumber.schema.required[InStoreOrder]("id", _.id), string.optional[InStoreOrder]("locationId", _.locationId), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) val alt = schema.oneOf[OrderType]("inStore") } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PackedInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/PackedInput.scala index 1656e90ee..d1a298be7 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PackedInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PackedInput.scala @@ -19,7 +19,5 @@ object PackedInput extends ShapeTag.Companion[PackedInput] { implicit val schema: Schema[PackedInput] = struct( string.required[PackedInput]("key", _.key), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Patchable.scala b/modules/bootstrapped/src/generated/smithy4s/example/Patchable.scala index 6fef05f07..67a6d94ba 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Patchable.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Patchable.scala @@ -20,7 +20,5 @@ object Patchable extends ShapeTag.Companion[Patchable] { implicit val schema: Schema[Patchable] = struct( int.nullable.optional[Patchable]("allowExplicitNull", _.allowExplicitNull), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PatchableEdgeCases.scala b/modules/bootstrapped/src/generated/smithy4s/example/PatchableEdgeCases.scala index c755ac6f6..d0258f39d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PatchableEdgeCases.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PatchableEdgeCases.scala @@ -25,7 +25,5 @@ object PatchableEdgeCases extends ShapeTag.Companion[PatchableEdgeCases] { int.nullable.required[PatchableEdgeCases]("requiredDefaultNull", _.requiredDefaultNull).addHints(smithy.api.Default(smithy4s.Document.nullDoc)), int.nullable.field[PatchableEdgeCases]("defaultValue", _.defaultValue).addHints(smithy.api.Default(smithy4s.Document.fromDouble(5.0d))), int.nullable.field[PatchableEdgeCases]("defaultNull", _.defaultNull).addHints(smithy.api.Default(smithy4s.Document.nullDoc)), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PathParams.scala b/modules/bootstrapped/src/generated/smithy4s/example/PathParams.scala index 01ea3e7ae..c725f0ac2 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PathParams.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PathParams.scala @@ -30,7 +30,5 @@ object PathParams extends ShapeTag.Companion[PathParams] { timestamp.required[PathParams]("ts4", _.ts4).addHints(smithy.api.TimestampFormat.HTTP_DATE.widen, smithy.api.HttpLabel()), boolean.required[PathParams]("b", _.b).addHints(smithy.api.HttpLabel()), Numbers.schema.required[PathParams]("ie", _.ie).addHints(smithy.api.HttpLabel()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PayloadData.scala b/modules/bootstrapped/src/generated/smithy4s/example/PayloadData.scala index 677a51cd9..4d5e075a5 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PayloadData.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PayloadData.scala @@ -18,7 +18,5 @@ object PayloadData extends ShapeTag.Companion[PayloadData] { implicit val schema: Schema[PayloadData] = struct( TestBiggerUnion.schema.optional[PayloadData]("testBiggerUnion", _.testBiggerUnion), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Pizza.scala b/modules/bootstrapped/src/generated/smithy4s/example/Pizza.scala index 933bcc5e6..f11b3a439 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Pizza.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Pizza.scala @@ -21,7 +21,5 @@ object Pizza extends ShapeTag.Companion[Pizza] { string.required[Pizza]("name", _.name), PizzaBase.schema.required[Pizza]("base", _.base), Ingredients.underlyingSchema.required[Pizza]("toppings", _.toppings), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Podcast.scala b/modules/bootstrapped/src/generated/smithy4s/example/Podcast.scala index 00e77a45e..f5a10d5a3 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Podcast.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Podcast.scala @@ -61,9 +61,7 @@ object Podcast extends ShapeTag.Companion[Podcast] { string.optional[Video]("title", _.title), string.optional[Video]("url", _.url), long.optional[Video]("durationMillis", _.durationMillis), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) val alt = schema.oneOf[Podcast]("video") } @@ -89,9 +87,7 @@ object Podcast extends ShapeTag.Companion[Podcast] { string.optional[Audio]("title", _.title), string.optional[Audio]("url", _.url), long.optional[Audio]("durationMillis", _.durationMillis), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) val alt = schema.oneOf[Podcast]("audio") } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PriceError.scala b/modules/bootstrapped/src/generated/smithy4s/example/PriceError.scala index c91af0620..1482a1b09 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PriceError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PriceError.scala @@ -26,7 +26,5 @@ object PriceError extends ShapeTag.Companion[PriceError] { implicit val schema: Schema[PriceError] = struct( string.required[PriceError]("message", _.message), int.required[PriceError]("code", _.code).addHints(smithy.api.HttpHeader("X-CODE")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PutObjectInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/PutObjectInput.scala index f9ce0dc47..70c036793 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PutObjectInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PutObjectInput.scala @@ -26,7 +26,5 @@ object PutObjectInput extends ShapeTag.Companion[PutObjectInput] { LowHigh.schema.optional[PutObjectInput]("foo", _.foo).addHints(smithy.api.HttpHeader("X-Foo")), SomeValue.schema.optional[PutObjectInput]("someValue", _.someValue).addHints(smithy.api.HttpQuery("paramName")), string.required[PutObjectInput]("data", _.data).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/PutStreamedObjectInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/PutStreamedObjectInput.scala index c9c917b01..1f50c00aa 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/PutStreamedObjectInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/PutStreamedObjectInput.scala @@ -19,7 +19,5 @@ object PutStreamedObjectInput extends ShapeTag.Companion[PutStreamedObjectInput] implicit val schema: Schema[PutStreamedObjectInput] = struct( string.required[PutStreamedObjectInput]("key", _.key), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Queries.scala b/modules/bootstrapped/src/generated/smithy4s/example/Queries.scala index 36f3b330b..19077344f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Queries.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Queries.scala @@ -34,7 +34,5 @@ object Queries extends ShapeTag.Companion[Queries] { OpenNums.schema.optional[Queries]("on", _.on).addHints(smithy.api.HttpQuery("openNums")), OpenNumsStr.schema.optional[Queries]("ons", _.ons).addHints(smithy.api.HttpQuery("openNumsStr")), StringMap.underlyingSchema.optional[Queries]("slm", _.slm).addHints(smithy.api.HttpQueryParams()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/QueriesWithDefaults.scala b/modules/bootstrapped/src/generated/smithy4s/example/QueriesWithDefaults.scala index f66cd016d..aa80121dc 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/QueriesWithDefaults.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/QueriesWithDefaults.scala @@ -19,7 +19,5 @@ object QueriesWithDefaults extends ShapeTag.Companion[QueriesWithDefaults] { implicit val schema: Schema[QueriesWithDefaults] = struct( string.field[QueriesWithDefaults]("dflt", _.dflt).addHints(smithy.api.Default(smithy4s.Document.fromString("test")), smithy.api.HttpQuery("dflt")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientError.scala b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientError.scala index 3eea7a1a5..c19d1d46f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientError.scala @@ -24,7 +24,5 @@ object RandomOtherClientError extends ShapeTag.Companion[RandomOtherClientError] implicit val schema: Schema[RandomOtherClientError] = struct( string.optional[RandomOtherClientError]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientErrorWithCode.scala b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientErrorWithCode.scala index ca3189976..a963dded0 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientErrorWithCode.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherClientErrorWithCode.scala @@ -25,7 +25,5 @@ object RandomOtherClientErrorWithCode extends ShapeTag.Companion[RandomOtherClie implicit val schema: Schema[RandomOtherClientErrorWithCode] = struct( string.optional[RandomOtherClientErrorWithCode]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerError.scala index eecfa7afa..1a75d4eab 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerError.scala @@ -24,7 +24,5 @@ object RandomOtherServerError extends ShapeTag.Companion[RandomOtherServerError] implicit val schema: Schema[RandomOtherServerError] = struct( string.optional[RandomOtherServerError]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerErrorWithCode.scala b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerErrorWithCode.scala index 70cc7cf70..e9970e5fa 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerErrorWithCode.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RandomOtherServerErrorWithCode.scala @@ -25,7 +25,5 @@ object RandomOtherServerErrorWithCode extends ShapeTag.Companion[RandomOtherServ implicit val schema: Schema[RandomOtherServerErrorWithCode] = struct( string.optional[RandomOtherServerErrorWithCode]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RangeCheck.scala b/modules/bootstrapped/src/generated/smithy4s/example/RangeCheck.scala index f13fc3641..5703066bf 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RangeCheck.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RangeCheck.scala @@ -21,7 +21,5 @@ object RangeCheck extends ShapeTag.Companion[RangeCheck] { implicit val schema: Schema[RangeCheck] = struct( int.validated(smithy.api.Range(min = Some(scala.math.BigDecimal(1.0)), max = None)).required[RangeCheck]("qty", _.qty), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RecursiveInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/RecursiveInput.scala index e11a0f26f..cd52c7419 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RecursiveInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RecursiveInput.scala @@ -19,7 +19,5 @@ object RecursiveInput extends ShapeTag.Companion[RecursiveInput] { implicit val schema: Schema[RecursiveInput] = recursive(struct( smithy4s.example.RecursiveInput.schema.optional[RecursiveInput]("hello", _.hello), - ){ - make - }.withId(id).addHints(hints)) + )(make).withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RecursiveTraitStructure.scala b/modules/bootstrapped/src/generated/smithy4s/example/RecursiveTraitStructure.scala index 95e830265..360d2f8d3 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RecursiveTraitStructure.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RecursiveTraitStructure.scala @@ -22,7 +22,5 @@ object RecursiveTraitStructure extends ShapeTag.Companion[RecursiveTraitStructur implicit val schema: Schema[RecursiveTraitStructure] = recursive(struct( string.optional[RecursiveTraitStructure]("name", _.name).addHints(smithy4s.example.RecursiveTraitStructure(name = None)), - ){ - make - }.withId(id).addHints(hints)) + )(make).withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ReservationInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ReservationInput.scala index 36aa1ce2f..bd31f09c1 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ReservationInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ReservationInput.scala @@ -22,7 +22,5 @@ object ReservationInput extends ShapeTag.Companion[ReservationInput] { implicit val schema: Schema[ReservationInput] = struct( string.required[ReservationInput]("name", _.name).addHints(smithy.api.HttpLabel()), string.optional[ReservationInput]("town", _.town).addHints(smithy.api.HttpQuery("town")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ReservationOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/ReservationOutput.scala index 70e7000b3..4133c13ca 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ReservationOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ReservationOutput.scala @@ -21,7 +21,5 @@ object ReservationOutput extends ShapeTag.Companion[ReservationOutput] { implicit val schema: Schema[ReservationOutput] = struct( string.required[ReservationOutput]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/RoundTripData.scala b/modules/bootstrapped/src/generated/smithy4s/example/RoundTripData.scala index 8416024df..e35c451ed 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/RoundTripData.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/RoundTripData.scala @@ -22,7 +22,5 @@ object RoundTripData extends ShapeTag.Companion[RoundTripData] { string.optional[RoundTripData]("header", _.header).addHints(smithy.api.HttpHeader("HEADER")), string.optional[RoundTripData]("query", _.query).addHints(smithy.api.HttpQuery("query")), string.optional[RoundTripData]("body", _.body), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Salad.scala b/modules/bootstrapped/src/generated/smithy4s/example/Salad.scala index ecc959fb1..9cffe0a98 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Salad.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Salad.scala @@ -20,7 +20,5 @@ object Salad extends ShapeTag.Companion[Salad] { implicit val schema: Schema[Salad] = struct( string.required[Salad]("name", _.name), Ingredients.underlyingSchema.required[Salad]("ingredients", _.ingredients), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/ServerError.scala index 4deeb0080..a5029b246 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ServerError.scala @@ -24,7 +24,5 @@ object ServerError extends ShapeTag.Companion[ServerError] { implicit val schema: Schema[ServerError] = struct( string.optional[ServerError]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ServerErrorCustomMessage.scala b/modules/bootstrapped/src/generated/smithy4s/example/ServerErrorCustomMessage.scala index 0127f6b21..649818c2f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ServerErrorCustomMessage.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ServerErrorCustomMessage.scala @@ -24,7 +24,5 @@ object ServerErrorCustomMessage extends ShapeTag.Companion[ServerErrorCustomMess implicit val schema: Schema[ServerErrorCustomMessage] = struct( string.optional[ServerErrorCustomMessage]("messageField", _.messageField), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/SomeCollections.scala b/modules/bootstrapped/src/generated/smithy4s/example/SomeCollections.scala index 7e0f14ae6..7860ff0d2 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/SomeCollections.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/SomeCollections.scala @@ -23,7 +23,5 @@ object SomeCollections extends ShapeTag.Companion[SomeCollections] { StringList.underlyingSchema.required[SomeCollections]("someList", _.someList), StringSet.underlyingSchema.required[SomeCollections]("someSet", _.someSet), StringMap.underlyingSchema.required[SomeCollections]("someMap", _.someMap), - ){ - make - }.withId(id).addHints(hints)) + )(make).withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/StructureConstrainingEnum.scala b/modules/bootstrapped/src/generated/smithy4s/example/StructureConstrainingEnum.scala index e2befcd3c..96e181f8b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/StructureConstrainingEnum.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/StructureConstrainingEnum.scala @@ -22,7 +22,5 @@ object StructureConstrainingEnum extends ShapeTag.Companion[StructureConstrainin implicit val schema: Schema[StructureConstrainingEnum] = struct( Letters.schema.validated(smithy.api.Length(min = Some(2L), max = None)).validated(smithy.api.Pattern(s"$$aaa$$")).optional[StructureConstrainingEnum]("letter", _.letter), FaceCard.schema.validated(smithy.api.Range(min = None, max = Some(scala.math.BigDecimal(1.0)))).optional[StructureConstrainingEnum]("card", _.card), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedMember.scala b/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedMember.scala index 1871d1e75..46576aa45 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedMember.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedMember.scala @@ -20,7 +20,5 @@ object StructureWithRefinedMember extends ShapeTag.Companion[StructureWithRefine implicit val schema: Schema[StructureWithRefinedMember] = struct( int.refined[smithy4s.refined.Age](smithy4s.example.AgeFormat()).optional[StructureWithRefinedMember]("otherAge", _.otherAge), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedTypes.scala b/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedTypes.scala index 622911680..6de7e3ca7 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedTypes.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/StructureWithRefinedTypes.scala @@ -24,7 +24,5 @@ object StructureWithRefinedTypes extends ShapeTag.Companion[StructureWithRefined UnwrappedFancyList.underlyingSchema.optional[StructureWithRefinedTypes]("unwrappedFancyList", _.unwrappedFancyList), smithy4s.example.Name.schema.optional[StructureWithRefinedTypes]("name", _.name), DogName.underlyingSchema.optional[StructureWithRefinedTypes]("dogName", _.dogName), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestAdt.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestAdt.scala index ef2bfe7fb..42b173c7a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestAdt.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestAdt.scala @@ -53,9 +53,7 @@ object TestAdt extends ShapeTag.Companion[TestAdt] { short.optional[AdtOne]("sht", _.sht), bytes.optional[AdtOne]("blb", _.blb), string.optional[AdtOne]("str", _.str), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) val alt = schema.oneOf[TestAdt]("one") } @@ -75,9 +73,7 @@ object TestAdt extends ShapeTag.Companion[TestAdt] { long.optional[AdtTwo]("lng", _.lng), short.optional[AdtTwo]("sht", _.sht), int.optional[AdtTwo]("int", _.int), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) val alt = schema.oneOf[TestAdt]("two") } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestBody.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestBody.scala index c8c5d5ebe..3a2558b64 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestBody.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestBody.scala @@ -24,7 +24,5 @@ object TestBody extends ShapeTag.Companion[TestBody] { implicit val schema: Schema[TestBody] = struct( string.validated(smithy.api.Length(min = Some(10L), max = None)).optional[TestBody]("data", _.data), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedInput.scala index 45bef9b96..7f4a20a28 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedInput.scala @@ -19,7 +19,5 @@ object TestDiscriminatedInput extends ShapeTag.Companion[TestDiscriminatedInput] implicit val schema: Schema[TestDiscriminatedInput] = struct( string.required[TestDiscriminatedInput]("key", _.key).addHints(smithy.api.HttpLabel()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedOutput.scala index 2dbd3f49b..3c23cd837 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestDiscriminatedOutput.scala @@ -18,7 +18,5 @@ object TestDiscriminatedOutput extends ShapeTag.Companion[TestDiscriminatedOutpu implicit val schema: Schema[TestDiscriminatedOutput] = struct( PayloadData.schema.optional[TestDiscriminatedOutput]("data", _.data).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestEmptyMixin.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestEmptyMixin.scala index 80b97727e..e0430d1a7 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestEmptyMixin.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestEmptyMixin.scala @@ -19,7 +19,5 @@ object TestEmptyMixin extends ShapeTag.Companion[TestEmptyMixin] { implicit val schema: Schema[TestEmptyMixin] = struct( long.optional[TestEmptyMixin]("a", _.a), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestIdRef.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestIdRef.scala index 875914011..1a8193909 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestIdRef.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestIdRef.scala @@ -20,7 +20,5 @@ object TestIdRef extends ShapeTag.Companion[TestIdRef] { implicit val schema: Schema[TestIdRef] = struct( string.refined[ShapeId](smithy.api.IdRef(selector = "*", failWhenMissing = None, errorMessage = None)).optional[TestIdRef]("test", _.test), TestIdRefTwo.schema.optional[TestIdRef]("test2", _.test2), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestInput.scala index 4969f3486..061ef1f3f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestInput.scala @@ -28,7 +28,5 @@ object TestInput extends ShapeTag.Companion[TestInput] { string.validated(smithy.api.Length(min = Some(10L), max = None)).required[TestInput]("pathParam", _.pathParam).addHints(smithy.api.HttpLabel()), string.validated(smithy.api.Length(min = Some(10L), max = None)).optional[TestInput]("queryParam", _.queryParam).addHints(smithy.api.HttpQuery("queryParam")), TestBody.schema.required[TestInput]("body", _.body).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestMixinAdt.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestMixinAdt.scala index 19bcd6699..3bcbf9854 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestMixinAdt.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestMixinAdt.scala @@ -44,9 +44,7 @@ object TestMixinAdt extends ShapeTag.Companion[TestMixinAdt] { val schema: Schema[TestAdtMemberWithMixin] = struct( string.optional[TestAdtMemberWithMixin]("a", _.a), int.optional[TestAdtMemberWithMixin]("b", _.b), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) val alt = schema.oneOf[TestMixinAdt]("test") } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestStructurePatternTarget.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestStructurePatternTarget.scala index 27c3c97da..31a4daa3e 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestStructurePatternTarget.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestStructurePatternTarget.scala @@ -21,7 +21,5 @@ object TestStructurePatternTarget extends ShapeTag.Companion[TestStructurePatter implicit val schema: Schema[TestStructurePatternTarget] = struct( string.required[TestStructurePatternTarget]("one", _.one), int.required[TestStructurePatternTarget]("two", _.two), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/TestTrait.scala b/modules/bootstrapped/src/generated/smithy4s/example/TestTrait.scala index 953f6b191..471b56d6c 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/TestTrait.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/TestTrait.scala @@ -25,7 +25,5 @@ object TestTrait extends ShapeTag.Companion[TestTrait] { implicit val schema: Schema[TestTrait] = recursive(struct( OrderType.schema.optional[TestTrait]("orderType", _.orderType), - ){ - make - }.withId(id).addHints(hints)) + )(make).withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Three.scala b/modules/bootstrapped/src/generated/smithy4s/example/Three.scala index 43ac5163c..e96da6136 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Three.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Three.scala @@ -19,7 +19,5 @@ object Three extends ShapeTag.Companion[Three] { implicit val schema: Schema[Three] = struct( string.required[Three]("three", _.three), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Two.scala b/modules/bootstrapped/src/generated/smithy4s/example/Two.scala index 18d8ba665..35ef4cad8 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Two.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Two.scala @@ -19,7 +19,5 @@ object Two extends ShapeTag.Companion[Two] { implicit val schema: Schema[Two] = struct( int.optional[Two]("value", _.value), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/UnauthorizedError.scala b/modules/bootstrapped/src/generated/smithy4s/example/UnauthorizedError.scala index 2317693b5..a8cc34088 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/UnauthorizedError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/UnauthorizedError.scala @@ -23,7 +23,5 @@ object UnauthorizedError extends ShapeTag.Companion[UnauthorizedError] { implicit val schema: Schema[UnauthorizedError] = struct( string.required[UnauthorizedError]("reason", _.reason), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/UnknownServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/UnknownServerError.scala index 8f4fd5447..96bb7dd97 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/UnknownServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/UnknownServerError.scala @@ -26,7 +26,5 @@ object UnknownServerError extends ShapeTag.Companion[UnknownServerError] { UnknownServerErrorCode.schema.required[UnknownServerError]("errorCode", _.errorCode), string.optional[UnknownServerError]("description", _.description), string.optional[UnknownServerError]("stateHash", _.stateHash), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/ValidationChecks.scala b/modules/bootstrapped/src/generated/smithy4s/example/ValidationChecks.scala index 7484b2228..f8afd2fbf 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/ValidationChecks.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/ValidationChecks.scala @@ -22,7 +22,5 @@ object ValidationChecks extends ShapeTag.Companion[ValidationChecks] { string.validated(smithy.api.Length(min = Some(1L), max = Some(10L))).optional[ValidationChecks]("str", _.str).addHints(smithy.api.HttpQuery("str")), StringList.underlyingSchema.validated(smithy.api.Length(min = Some(1L), max = Some(10L))).optional[ValidationChecks]("lst", _.lst).addHints(smithy.api.HttpQuery("lst")), int.validated(smithy.api.Range(min = Some(scala.math.BigDecimal(1.0)), max = Some(scala.math.BigDecimal(10.0)))).optional[ValidationChecks]("int", _.int).addHints(smithy.api.HttpQuery("int")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/Value.scala b/modules/bootstrapped/src/generated/smithy4s/example/Value.scala index 044cfecee..cefbe6b60 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/Value.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/Value.scala @@ -19,7 +19,5 @@ object Value extends ShapeTag.Companion[Value] { implicit val schema: Schema[Value] = struct( string.required[Value]("value", _.value), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/VersionOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/VersionOutput.scala index 0c672c8f7..63c67100f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/VersionOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/VersionOutput.scala @@ -19,7 +19,5 @@ object VersionOutput extends ShapeTag.Companion[VersionOutput] { implicit val schema: Schema[VersionOutput] = struct( string.required[VersionOutput]("version", _.version).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/ListInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/ListInput.scala index 1367ce127..85ee551af 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/ListInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/ListInput.scala @@ -20,7 +20,5 @@ object ListInput extends ShapeTag.Companion[ListInput] { implicit val schema: Schema[ListInput] = struct( MyList.underlyingSchema.required[ListInput]("list", _.list), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/MapInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/MapInput.scala index b58fc06ca..0eb8fb17b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/MapInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/MapInput.scala @@ -20,7 +20,5 @@ object MapInput extends ShapeTag.Companion[MapInput] { implicit val schema: Schema[MapInput] = struct( MyMap.underlyingSchema.required[MapInput]("value", _.value), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/OptionInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/OptionInput.scala index e0f4d0a4d..d5e208d56 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/OptionInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/OptionInput.scala @@ -20,7 +20,5 @@ object OptionInput extends ShapeTag.Companion[OptionInput] { implicit val schema: Schema[OptionInput] = struct( String.schema.optional[OptionInput]("value", _.value), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/Packagee.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/Packagee.scala index 97b19e2db..f79d96e30 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/Packagee.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/Packagee.scala @@ -19,7 +19,5 @@ object Packagee extends ShapeTag.Companion[Packagee] { implicit val schema: Schema[Packagee] = struct( int.optional[Packagee]("class", _._class), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordStructTrait.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordStructTrait.scala index c33f68ac0..ad1ab6262 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordStructTrait.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordStructTrait.scala @@ -22,7 +22,5 @@ object ReservedKeywordStructTrait extends ShapeTag.Companion[ReservedKeywordStru implicit val schema: Schema[ReservedKeywordStructTrait] = recursive(struct( String.schema.required[ReservedKeywordStructTrait]("implicit", _._implicit), Packagee.schema.optional[ReservedKeywordStructTrait]("package", _._package), - ){ - make - }.withId(id).addHints(hints)) + )(make).withId(id).addHints(hints)) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordTraitExampleStruct.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordTraitExampleStruct.scala index 20228c91c..452e29d2d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordTraitExampleStruct.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/ReservedKeywordTraitExampleStruct.scala @@ -21,7 +21,5 @@ object ReservedKeywordTraitExampleStruct extends ShapeTag.Companion[ReservedKeyw implicit val schema: Schema[ReservedKeywordTraitExampleStruct] = struct( String.schema.optional[ReservedKeywordTraitExampleStruct]("member", _.member).addHints(smithy4s.example.collision.ReservedKeywordStructTrait(_implicit = smithy4s.example.collision.String("demo"), _package = Some(smithy4s.example.collision.Packagee(_class = Some(42)))), smithy4s.example.collision.ReservedKeywordUnionTrait.PackageCase(smithy4s.example.collision.PackageUnion.ClassCase(42).widen).widen), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/Scala3ReservedKeywords.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/Scala3ReservedKeywords.scala index 51f06200d..1983adf50 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/Scala3ReservedKeywords.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/Scala3ReservedKeywords.scala @@ -19,7 +19,5 @@ object Scala3ReservedKeywords extends ShapeTag.Companion[Scala3ReservedKeywords] implicit val schema: Schema[Scala3ReservedKeywords] = struct( String.schema.optional[Scala3ReservedKeywords]("export", _._export), String.schema.optional[Scala3ReservedKeywords]("enum", _._enum), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/SetInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/SetInput.scala index bc8b6c752..0fb3fbb6d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/SetInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/SetInput.scala @@ -20,7 +20,5 @@ object SetInput extends ShapeTag.Companion[SetInput] { implicit val schema: Schema[SetInput] = struct( MySet.underlyingSchema.required[SetInput]("set", _.set), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/collision/TestReservedNamespaceImport.scala b/modules/bootstrapped/src/generated/smithy4s/example/collision/TestReservedNamespaceImport.scala index 18e09d75b..04eeae93b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/collision/TestReservedNamespaceImport.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/collision/TestReservedNamespaceImport.scala @@ -19,7 +19,5 @@ object TestReservedNamespaceImport extends ShapeTag.Companion[TestReservedNamesp implicit val schema: Schema[TestReservedNamespaceImport] = struct( MyPackageString.schema.optional[TestReservedNamespaceImport]("package", _._package), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/error/NotFoundError.scala b/modules/bootstrapped/src/generated/smithy4s/example/error/NotFoundError.scala index f179ca7c9..7cd7bb49b 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/error/NotFoundError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/error/NotFoundError.scala @@ -24,7 +24,5 @@ object NotFoundError extends ShapeTag.Companion[NotFoundError] { implicit val schema: Schema[NotFoundError] = struct( string.optional[NotFoundError]("error", _.error), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetInput.scala index 12867b8eb..cfa7f81e2 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetInput.scala @@ -21,7 +21,5 @@ object GreetInput extends ShapeTag.Companion[GreetInput] { implicit val schema: Schema[GreetInput] = struct( string.required[GreetInput]("name", _.name), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetOutput.scala index b4b99578e..d2f92b7ee 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/greet/GreetOutput.scala @@ -21,7 +21,5 @@ object GreetOutput extends ShapeTag.Companion[GreetOutput] { implicit val schema: Schema[GreetOutput] = struct( string.required[GreetOutput]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/HealthCheckOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/HealthCheckOutput.scala index 3548e39c4..2fde94a38 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/HealthCheckOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/HealthCheckOutput.scala @@ -21,7 +21,5 @@ object HealthCheckOutput extends ShapeTag.Companion[HealthCheckOutput] { implicit val schema: Schema[HealthCheckOutput] = struct( string.required[HealthCheckOutput]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/NotAuthorizedError.scala b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/NotAuthorizedError.scala index a8afaa13d..58f37ff65 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/NotAuthorizedError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/NotAuthorizedError.scala @@ -25,7 +25,5 @@ object NotAuthorizedError extends ShapeTag.Companion[NotAuthorizedError] { implicit val schema: Schema[NotAuthorizedError] = struct( string.required[NotAuthorizedError]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/World.scala b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/World.scala index 9bb897eba..671a28000 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/World.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/guides/auth/World.scala @@ -19,7 +19,5 @@ object World extends ShapeTag.Companion[World] { implicit val schema: Schema[World] = struct( string.field[World]("message", _.message).addHints(smithy.api.Default(smithy4s.Document.fromString("World !"))), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/guides/hello/World.scala b/modules/bootstrapped/src/generated/smithy4s/example/guides/hello/World.scala index 3d3998c02..75c0c72bf 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/guides/hello/World.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/guides/hello/World.scala @@ -19,7 +19,5 @@ object World extends ShapeTag.Companion[World] { implicit val schema: Schema[World] = struct( string.field[World]("message", _.message).addHints(smithy.api.Default(smithy4s.Document.fromString("World !"))), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/hello/GenericServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/hello/GenericServerError.scala index 2e3ccb9c8..930ad03e0 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/hello/GenericServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/hello/GenericServerError.scala @@ -25,7 +25,5 @@ object GenericServerError extends ShapeTag.Companion[GenericServerError] { implicit val schema: Schema[GenericServerError] = struct( string.optional[GenericServerError]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/hello/Greeting.scala b/modules/bootstrapped/src/generated/smithy4s/example/hello/Greeting.scala index 524579048..886fbb7f7 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/hello/Greeting.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/hello/Greeting.scala @@ -19,7 +19,5 @@ object Greeting extends ShapeTag.Companion[Greeting] { implicit val schema: Schema[Greeting] = struct( string.required[Greeting]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/hello/Person.scala b/modules/bootstrapped/src/generated/smithy4s/example/hello/Person.scala index 86d488269..b5e719510 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/hello/Person.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/hello/Person.scala @@ -20,7 +20,5 @@ object Person extends ShapeTag.Companion[Person] { implicit val schema: Schema[Person] = struct( string.required[Person]("name", _.name).addHints(smithy.api.HttpLabel()), string.optional[Person]("town", _.town).addHints(smithy.api.HttpQuery("town")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/hello/SpecificServerError.scala b/modules/bootstrapped/src/generated/smithy4s/example/hello/SpecificServerError.scala index 36b132739..5abcb3bcb 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/hello/SpecificServerError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/hello/SpecificServerError.scala @@ -25,7 +25,5 @@ object SpecificServerError extends ShapeTag.Companion[SpecificServerError] { implicit val schema: Schema[SpecificServerError] = struct( string.optional[SpecificServerError]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/import_test/OpOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/import_test/OpOutput.scala index f92a73133..fab95e56a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/import_test/OpOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/import_test/OpOutput.scala @@ -19,7 +19,5 @@ object OpOutput extends ShapeTag.Companion[OpOutput] { implicit val schema: Schema[OpOutput] = struct( string.required[OpOutput]("output", _.output).addHints(smithy.api.HttpPayload()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationInput.scala index c2ccd10aa..68f1f9ddd 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationInput.scala @@ -21,7 +21,5 @@ object ExampleOperationInput extends ShapeTag.Companion[ExampleOperationInput] { implicit val schema: Schema[ExampleOperationInput] = struct( string.required[ExampleOperationInput]("a", _.a), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationOutput.scala index a0f301f27..90197112a 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/product/ExampleOperationOutput.scala @@ -21,7 +21,5 @@ object ExampleOperationOutput extends ShapeTag.Companion[ExampleOperationOutput] implicit val schema: Schema[ExampleOperationOutput] = struct( string.required[ExampleOperationOutput]("b", _.b), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/Set.scala b/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/Set.scala index db76738c5..6f7143813 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/Set.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/Set.scala @@ -21,7 +21,5 @@ object Set extends ShapeTag.Companion[Set] { implicit val schema: Schema[Set] = struct( string.required[Set]("someField", _.someField), int.required[Set]("otherField", _.otherField), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/SetOpInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/SetOpInput.scala index 66cdf304a..704a2b302 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/SetOpInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/reservedNameOverride/SetOpInput.scala @@ -20,7 +20,5 @@ object SetOpInput extends ShapeTag.Companion[SetOpInput] { implicit val schema: Schema[SetOpInput] = struct( Set.schema.required[SetOpInput]("set", _.set), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/ComplexError.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/ComplexError.scala index d78ef7314..e7c7d4878 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/ComplexError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/ComplexError.scala @@ -29,7 +29,5 @@ object ComplexError extends ShapeTag.Companion[ComplexError] { int.required[ComplexError]("value", _.value), string.required[ComplexError]("message", _.message), ErrorDetails.schema.optional[ComplexError]("details", _.details), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/ErrorDetails.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/ErrorDetails.scala index eca6ecec9..e24e8b178 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/ErrorDetails.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/ErrorDetails.scala @@ -22,7 +22,5 @@ object ErrorDetails extends ShapeTag.Companion[ErrorDetails] { implicit val schema: Schema[ErrorDetails] = struct( timestamp.required[ErrorDetails]("date", _.date).addHints(smithy.api.TimestampFormat.EPOCH_SECONDS.widen), string.required[ErrorDetails]("location", _.location), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/HelloInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/HelloInput.scala index c2325672c..5b392e413 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/HelloInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/HelloInput.scala @@ -21,7 +21,5 @@ object HelloInput extends ShapeTag.Companion[HelloInput] { implicit val schema: Schema[HelloInput] = struct( string.required[HelloInput]("name", _.name).addHints(smithy.api.HttpLabel()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/HelloOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/HelloOutput.scala index eb7f315ba..20756b64f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/HelloOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/HelloOutput.scala @@ -21,7 +21,5 @@ object HelloOutput extends ShapeTag.Companion[HelloOutput] { implicit val schema: Schema[HelloOutput] = struct( string.required[HelloOutput]("message", _.message), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloInput.scala index fd2d67f46..69e0ea9c6 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloInput.scala @@ -23,7 +23,5 @@ object SayHelloInput extends ShapeTag.Companion[SayHelloInput] { string.optional[SayHelloInput]("greeting", _.greeting).addHints(smithy.api.HttpHeader("X-Greeting")), string.optional[SayHelloInput]("query", _.query).addHints(smithy.api.HttpQuery("Hi")), string.optional[SayHelloInput]("name", _.name), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloOutput.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloOutput.scala index 6222023e3..afd583e63 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloOutput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloOutput.scala @@ -20,7 +20,5 @@ object SayHelloOutput extends ShapeTag.Companion[SayHelloOutput] { implicit val schema: Schema[SayHelloOutput] = struct( SayHelloPayload.schema.required[SayHelloOutput]("payload", _.payload).addHints(smithy.api.HttpPayload()), string.required[SayHelloOutput]("header1", _.header1).addHints(smithy.api.HttpHeader("X-H1")), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloPayload.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloPayload.scala index 019f7d02b..20e247d7f 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloPayload.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/SayHelloPayload.scala @@ -19,7 +19,5 @@ object SayHelloPayload extends ShapeTag.Companion[SayHelloPayload] { implicit val schema: Schema[SayHelloPayload] = struct( string.required[SayHelloPayload]("result", _.result), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/SimpleError.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/SimpleError.scala index dce30a68a..75707535d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/SimpleError.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/SimpleError.scala @@ -24,7 +24,5 @@ object SimpleError extends ShapeTag.Companion[SimpleError] { implicit val schema: Schema[SimpleError] = struct( int.required[SimpleError]("expected", _.expected), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/test/TestPathInput.scala b/modules/bootstrapped/src/generated/smithy4s/example/test/TestPathInput.scala index 45adf9349..138a8a504 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/test/TestPathInput.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/test/TestPathInput.scala @@ -21,7 +21,5 @@ object TestPathInput extends ShapeTag.Companion[TestPathInput] { implicit val schema: Schema[TestPathInput] = struct( string.required[TestPathInput]("path", _.path).addHints(smithy.api.HttpLabel()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/weather/Dog.scala b/modules/bootstrapped/src/generated/weather/Dog.scala index 23b1b4157..6a62004ee 100644 --- a/modules/bootstrapped/src/generated/weather/Dog.scala +++ b/modules/bootstrapped/src/generated/weather/Dog.scala @@ -19,7 +19,5 @@ object Dog extends ShapeTag.Companion[Dog] { implicit val schema: Schema[Dog] = struct( string.required[Dog]("name", _.name), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/weather/GetWeatherInput.scala b/modules/bootstrapped/src/generated/weather/GetWeatherInput.scala index 57b06d405..47a90690c 100644 --- a/modules/bootstrapped/src/generated/weather/GetWeatherInput.scala +++ b/modules/bootstrapped/src/generated/weather/GetWeatherInput.scala @@ -21,7 +21,5 @@ object GetWeatherInput extends ShapeTag.Companion[GetWeatherInput] { implicit val schema: Schema[GetWeatherInput] = struct( string.required[GetWeatherInput]("city", _.city).addHints(smithy.api.HttpLabel()), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } diff --git a/modules/bootstrapped/src/generated/weather/GetWeatherOutput.scala b/modules/bootstrapped/src/generated/weather/GetWeatherOutput.scala index bc9f818af..b43989b76 100644 --- a/modules/bootstrapped/src/generated/weather/GetWeatherOutput.scala +++ b/modules/bootstrapped/src/generated/weather/GetWeatherOutput.scala @@ -21,7 +21,5 @@ object GetWeatherOutput extends ShapeTag.Companion[GetWeatherOutput] { implicit val schema: Schema[GetWeatherOutput] = struct( string.required[GetWeatherOutput]("weather", _.weather), - ){ - make - }.withId(id).addHints(hints) + )(make).withId(id).addHints(hints) } From ee999335c3e7abb77e703716cfa7259bd919e5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20M=C3=A9lois?= Date: Mon, 4 Mar 2024 09:58:30 +0100 Subject: [PATCH 6/6] Fix rendering tests --- .../codegen/internals/DefaultRenderModeSpec.scala | 12 +++--------- .../AwsStandardTypesTransformerSpec.scala | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/modules/codegen/test/src/smithy4s/codegen/internals/DefaultRenderModeSpec.scala b/modules/codegen/test/src/smithy4s/codegen/internals/DefaultRenderModeSpec.scala index 75651982c..2ecfaa8c3 100644 --- a/modules/codegen/test/src/smithy4s/codegen/internals/DefaultRenderModeSpec.scala +++ b/modules/codegen/test/src/smithy4s/codegen/internals/DefaultRenderModeSpec.scala @@ -76,9 +76,7 @@ final class DefaultRenderModeSpec extends munit.FunSuite { | string.nullable.field[Test]("six", _.six).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), | string.nullable.field[Test]("seven", _.seven).addHints(smithy.api.Default(smithy4s.Document.nullDoc)), | string.nullable.required[Test]("eight", _.eight), - | ){ - | make - | }.withId(id).addHints(hints) + | )(make).withId(id).addHints(hints) |}""".stripMargin TestUtils.runTest(smithy, scalaCode) @@ -142,9 +140,7 @@ final class DefaultRenderModeSpec extends munit.FunSuite { | string.nullable.field[Test]("six", _.six).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), | string.nullable.field[Test]("seven", _.seven).addHints(smithy.api.Default(smithy4s.Document.nullDoc)), | string.nullable.required[Test]("eight", _.eight), - | ){ - | make - | }.withId(id).addHints(hints) + | )(make).withId(id).addHints(hints) |}""".stripMargin TestUtils.runTest(smithy, scalaCode) @@ -210,9 +206,7 @@ final class DefaultRenderModeSpec extends munit.FunSuite { | string.nullable.field[Test]("six", _.six).addHints(smithy.api.Default(smithy4s.Document.fromString("test"))), | string.nullable.field[Test]("seven", _.seven).addHints(smithy.api.Default(smithy4s.Document.nullDoc)), | string.nullable.required[Test]("eight", _.eight), - | ){ - | make - | }.withId(id).addHints(hints) + | )(make).withId(id).addHints(hints) |} |""".stripMargin diff --git a/modules/codegen/test/src/smithy4s/codegen/transformers/AwsStandardTypesTransformerSpec.scala b/modules/codegen/test/src/smithy4s/codegen/transformers/AwsStandardTypesTransformerSpec.scala index ec5ee9db8..d5cd704a9 100644 --- a/modules/codegen/test/src/smithy4s/codegen/transformers/AwsStandardTypesTransformerSpec.scala +++ b/modules/codegen/test/src/smithy4s/codegen/transformers/AwsStandardTypesTransformerSpec.scala @@ -94,9 +94,7 @@ final class AwsStandardTypesTransformerSpec extends munit.FunSuite { | int.required[TestStructure]("i", _.i), | Date.schema.optional[TestStructure]("d", _.d), | Long.schema.optional[TestStructure]("l", _.l), - | ){ - | make - | }.withId(id).addHints(hints) + | )(make).withId(id).addHints(hints) |}""".stripMargin ) } @@ -157,9 +155,7 @@ final class AwsStandardTypesTransformerSpec extends munit.FunSuite { | | implicit val schema: Schema[TestStructure] = struct( | string.validated(smithy.api.Length(min = Some(5L), max = Some(10L))).optional[TestStructure]("s", _.s), - | ){ - | make - | }.withId(id).addHints(hints) + | )(make).withId(id).addHints(hints) |}""".stripMargin ) } @@ -222,9 +218,7 @@ final class AwsStandardTypesTransformerSpec extends munit.FunSuite { | | implicit val schema: Schema[TestStructure] = struct( | int.field[TestStructure]("i", _.i).addHints(smithy.api.Default(smithy4s.Document.fromDouble(5.0d))), - | ){ - | make - | }.withId(id).addHints(hints) + | )(make).withId(id).addHints(hints) |}""".stripMargin ) }