Skip to content

Commit

Permalink
Merge pull request #1224 from disneystreaming/branch-sync-29-09-2023
Browse files Browse the repository at this point in the history
  • Loading branch information
kubukoz authored Sep 29, 2023
2 parents 4ef1f61 + ebf582a commit cc332a3
Show file tree
Hide file tree
Showing 180 changed files with 217 additions and 27 deletions.
16 changes: 10 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,29 @@ Added convenient methods for working with unions including projectors for each u

See https://github.com/disneystreaming/smithy4s/pull/1144

# 0.17.20

* Add empty line separating generated case classes from their companion objects in [#1175](https://github.com/disneystreaming/smithy4s/pull/1175)

# 0.17.19

This release brings in a smithy-model update, which resolves some issues that would've prevented code generation from succeeding. #1164
This release brings in a smithy-model update, which resolves some issues that would've prevented code generation from succeeding. [#1164](https://github.com/disneystreaming/smithy4s/pull/1164)

# 0.17.18

Fixes a `ClassCastException` in document encoding in #1161
Fixes a `ClassCastException` in document encoding in [#1161](https://github.com/disneystreaming/smithy4s/pull/1161)

# 0.17.17

More permissive test for HEAD requests in #1157
More permissive test for HEAD requests in [#1157](https://github.com/disneystreaming/smithy4s/pull/1157)

# 0.17.16

Fixes a bug where HEAD responses contained an empty {} in the body (where there should be no body present). #1149
Fixes a bug where HEAD responses contained an empty {} in the body (where there should be no body present). [#1149](https://github.com/disneystreaming/smithy4s/pull/1149)

# 0.17.15

Updates to fix compile errors when intEnum shapes are used as traits. #1139
Updates to fix compile errors when intEnum shapes are used as traits. [#1139](https://github.com/disneystreaming/smithy4s/pull/1139)

# 0.17.14

Expand All @@ -88,7 +92,7 @@ Updates to fix compile errors when intEnum shapes are used as traits. #1139

* Remove reserved types in https://github.com/disneystreaming/smithy4s/pull/1052

Remove a legacy mechanism of dealing with name conflicts in generated types. Fixes #1051
Remove a legacy mechanism of dealing with name conflicts in generated types. Fixes [#1051](https://github.com/disneystreaming/smithy4s/issues/1051)

* Flatten AWS newtypes in https://github.com/disneystreaming/smithy4s/pull/1110

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import smithy4s.ShapeTag
import smithy4s.schema.Schema.constant

final case class DescribeEndpointsRequest()

object DescribeEndpointsRequest extends ShapeTag.Companion[DescribeEndpointsRequest] {
val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "DescribeEndpointsRequest")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import smithy4s.schema.Schema.struct
* <p>List of endpoints.</p>
*/
final case class DescribeEndpointsResponse(endpoints: List[Endpoint])

object DescribeEndpointsResponse extends ShapeTag.Companion[DescribeEndpointsResponse] {
val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "DescribeEndpointsResponse")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import smithy4s.schema.Schema.struct
* <p>Endpoint cache time to live (TTL) value.</p>
*/
final case class Endpoint(address: String, cachePeriodInMinutes: Long = 0L)

object Endpoint extends ShapeTag.Companion[Endpoint] {
val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "Endpoint")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import smithy4s.schema.Schema.struct
final case class InternalServerError(message: Option[ErrorMessage] = None) extends Throwable {
override def getMessage(): String = message.map(_.value).orNull
}

object InternalServerError extends ShapeTag.Companion[InternalServerError] {
val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "InternalServerError")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import smithy4s.schema.Schema.struct
final case class InvalidEndpointException(message: Option[String] = None) extends Throwable {
override def getMessage(): String = message.orNull
}

object InvalidEndpointException extends ShapeTag.Companion[InvalidEndpointException] {
val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "InvalidEndpointException")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import smithy4s.schema.Schema.struct
* <p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>
*/
final case class ListTablesInput(exclusiveStartTableName: Option[TableName] = None, limit: Option[ListTablesInputLimit] = None)

object ListTablesInput extends ShapeTag.Companion[ListTablesInput] {
val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "ListTablesInput")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import smithy4s.schema.Schema.struct
* there are no more table names to be retrieved.</p>
*/
final case class ListTablesOutput(tableNames: Option[List[TableName]] = None, lastEvaluatedTableName: Option[TableName] = None)

object ListTablesOutput extends ShapeTag.Companion[ListTablesOutput] {
val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "ListTablesOutput")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import smithy4s.schema.Schema.struct
import smithy4s.schema.Schema.timestamp

final case class Attributes(user: String, public: Boolean, size: Long, creationDate: Timestamp, region: String, queryable: Option[Boolean] = None, queryableLastChange: Option[Timestamp] = None, blockPublicAccess: Option[Boolean] = None, permissions: Option[List[Permission]] = None, tags: Option[List[String]] = None, backedUp: Option[Boolean] = None, metadata: Option[List[Metadata]] = None, encryption: Option[Encryption] = None)

object Attributes extends ShapeTag.Companion[Attributes] {
val id: ShapeId = ShapeId("smithy4s.benchmark", "Attributes")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class CreateObjectInput(key: String, bucketName: String, payload: S3Object)

object CreateObjectInput extends ShapeTag.Companion[CreateObjectInput] {
val id: ShapeId = ShapeId("smithy4s.benchmark", "CreateObjectInput")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class Creds(user: Option[String] = None, key: Option[String] = None)

object Creds extends ShapeTag.Companion[Creds] {
val id: ShapeId = ShapeId("smithy4s.benchmark", "Creds")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import smithy4s.schema.Schema.struct
import smithy4s.schema.Schema.timestamp

final case class Encryption(user: Option[String] = None, date: Option[Timestamp] = None, metadata: Option[EncryptionMetadata] = None)

object Encryption extends ShapeTag.Companion[Encryption] {
val id: ShapeId = ShapeId("smithy4s.benchmark", "Encryption")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class EncryptionMetadata(system: Option[String] = None, credentials: Option[Creds] = None, partial: Option[Boolean] = None)

object EncryptionMetadata extends ShapeTag.Companion[EncryptionMetadata] {
val id: ShapeId = ShapeId("smithy4s.benchmark", "EncryptionMetadata")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import smithy4s.schema.Schema.struct
import smithy4s.schema.Schema.timestamp

final case class Metadata(contentType: Option[String] = None, lastModified: Option[Timestamp] = None, checkSum: Option[String] = None, pendingDeletion: Option[Boolean] = None, etag: Option[String] = None)

object Metadata extends ShapeTag.Companion[Metadata] {
val id: ShapeId = ShapeId("smithy4s.benchmark", "Metadata")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.boolean
import smithy4s.schema.Schema.struct

final case class Permission(read: Option[Boolean] = None, write: Option[Boolean] = None, directory: Option[Boolean] = None)

object Permission extends ShapeTag.Companion[Permission] {
val id: ShapeId = ShapeId("smithy4s.benchmark", "Permission")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class S3Object(id: String, owner: String, attributes: Attributes, data: Blob)

object S3Object extends ShapeTag.Companion[S3Object] {
val id: ShapeId = ShapeId("smithy4s.benchmark", "S3Object")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class SendStringInput(key: String, bucketName: String, body: String)

object SendStringInput extends ShapeTag.Companion[SendStringInput] {
val id: ShapeId = ShapeId("smithy4s.benchmark", "SendStringInput")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import smithy4s.schema.Schema.struct
* This is a simple example of a "quoted string"
*/
final case class AStructure(astring: AString = smithy4s.example.AString("\"Hello World\" with \"quotes\""))

object AStructure extends ShapeTag.Companion[AStructure] {
val id: ShapeId = ShapeId("smithy4s.example", "AStructure")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.example.common.BrandList
import smithy4s.schema.Schema.struct

final case class AddBrandsInput(brands: Option[List[String]] = None)

object AddBrandsInput extends ShapeTag.Companion[AddBrandsInput] {
val id: ShapeId = ShapeId("smithy4s.example", "AddBrandsInput")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class AddMenuItemRequest(restaurant: String, menuItem: MenuItem)

object AddMenuItemRequest extends ShapeTag.Companion[AddMenuItemRequest] {
val id: ShapeId = ShapeId("smithy4s.example", "AddMenuItemRequest")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import smithy4s.schema.Schema.struct
import smithy4s.schema.Schema.timestamp

final case class AddMenuItemResult(itemId: String, added: Timestamp)

object AddMenuItemResult extends ShapeTag.Companion[AddMenuItemResult] {
val id: ShapeId = ShapeId("smithy4s.example", "AddMenuItemResult")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import smithy4s.ShapeTag
import smithy4s.schema.Schema.constant

final case class AgeFormat()

object AgeFormat extends ShapeTag.Companion[AgeFormat] {
val id: ShapeId = ShapeId("smithy4s.example", "ageFormat")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import smithy4s.ShapeTag
import smithy4s.schema.Schema.constant

final case class ArbitraryDataTest()

object ArbitraryDataTest extends ShapeTag.Companion[ArbitraryDataTest] {
val id: ShapeId = ShapeId("smithy4s.example", "ArbitraryDataTest")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.int
import smithy4s.schema.Schema.struct

final case class BigStruct(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)

object BigStruct extends ShapeTag.Companion[BigStruct] {
val id: ShapeId = ShapeId("smithy4s.example", "BigStruct")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class Candy(name: Option[String] = None)

object Candy extends ShapeTag.Companion[Candy] {
val id: ShapeId = ShapeId("smithy4s.example", "Candy")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.float
import smithy4s.schema.Schema.struct

final case class CityCoordinates(latitude: Float, longitude: Float)

object CityCoordinates extends ShapeTag.Companion[CityCoordinates] {
val id: ShapeId = ShapeId("smithy4s.example", "CityCoordinates")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class CitySummary(cityId: CityId, name: String)

object CitySummary extends ShapeTag.Companion[CitySummary] {
val id: ShapeId = ShapeId("smithy4s.example", "CitySummary")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.int
import smithy4s.schema.Schema.struct

final case class CustomCodeInput(code: Int)

object CustomCodeInput extends ShapeTag.Companion[CustomCodeInput] {
val id: ShapeId = ShapeId("smithy4s.example", "CustomCodeInput")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.int
import smithy4s.schema.Schema.struct

final case class CustomCodeOutput(code: Option[Int] = None)

object CustomCodeOutput extends ShapeTag.Companion[CustomCodeOutput] {
val id: ShapeId = ShapeId("smithy4s.example", "CustomCodeOutput")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class DefaultInMixinUsageTest(one: String = "test") extends DefaultInMixinTest

object DefaultInMixinUsageTest extends ShapeTag.Companion[DefaultInMixinUsageTest] {
val id: ShapeId = ShapeId("smithy4s.example", "DefaultInMixinUsageTest")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class DefaultOrderingTest(three: String, one: Int = 1, two: Option[String] = None)

object DefaultOrderingTest extends ShapeTag.Companion[DefaultOrderingTest] {
val id: ShapeId = ShapeId("smithy4s.example", "DefaultOrderingTest")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import smithy4s.schema.Schema.struct
import smithy4s.schema.Schema.timestamp

final case class DefaultTest(one: Int = 1, two: String = "test", three: List[String] = List(), four: List[String] = List(), five: String = "", six: Int = 0, seven: Document = smithy4s.Document.nullDoc, eight: Map[String, String] = Map(), nine: Short = 0, ten: Double = 0.0d, eleven: Float = 0.0f, twelve: Long = 0L, thirteen: Timestamp = Timestamp(0, 0), fourteen: Timestamp = Timestamp(0, 0), fifteen: Timestamp = Timestamp(0, 0), sixteen: Byte = 0, seventeen: Blob = Blob.empty, eighteen: Boolean = false)

object DefaultTest extends ShapeTag.Companion[DefaultTest] {
val id: ShapeId = ShapeId("smithy4s.example", "DefaultTest")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import smithy4s.schema.Schema.struct

@deprecated(message = "A compelling reason", since = "0.0.1")
final case class DeprecatedStructure(@deprecated(message = "N/A", since = "N/A") strings: Option[List[String]] = None, other: Option[List[String]] = None, @deprecated(message = "N/A", since = "N/A") name: Option[String] = None, nameV2: Option[String] = None) extends DeprecatedMixin

object DeprecatedStructure extends ShapeTag.Companion[DeprecatedStructure] {
val id: ShapeId = ShapeId("smithy4s.example", "DeprecatedStructure")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ object DeprecatedUnion extends ShapeTag.Companion[DeprecatedUnion] {
final case class DeprecatedUnionProductCase() extends DeprecatedUnion {
def $ordinal: Int = 2
}

object DeprecatedUnionProductCase extends ShapeTag.Companion[DeprecatedUnionProductCase] {
val id: ShapeId = ShapeId("smithy4s.example", "DeprecatedUnionProductCase")

Expand All @@ -65,6 +66,7 @@ object DeprecatedUnion extends ShapeTag.Companion[DeprecatedUnion] {
final case class UnionProductCaseDeprecatedAtCallSite() extends DeprecatedUnion {
def $ordinal: Int = 3
}

object UnionProductCaseDeprecatedAtCallSite extends ShapeTag.Companion[UnionProductCaseDeprecatedAtCallSite] {
val id: ShapeId = ShapeId("smithy4s.example", "UnionProductCaseDeprecatedAtCallSite")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import smithy4s.schema.Schema.constant
* {@literal @}test
*/
final case class DocTest()

object DocTest extends ShapeTag.Companion[DocTest] {
val id: ShapeId = ShapeId("smithy4s.example", "DocTest")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import smithy4s.schema.Schema.struct
final case class EHFallbackClientError(message: Option[String] = None) extends NoStackTrace {
override def getMessage(): String = message.orNull
}

object EHFallbackClientError extends ShapeTag.Companion[EHFallbackClientError] {
val id: ShapeId = ShapeId("smithy4s.example", "EHFallbackClientError")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import smithy4s.schema.Schema.struct
final case class EHFallbackServerError(message: Option[String] = None) extends Throwable {
override def getMessage(): String = message.orNull
}

object EHFallbackServerError extends ShapeTag.Companion[EHFallbackServerError] {
val id: ShapeId = ShapeId("smithy4s.example", "EHFallbackServerError")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import smithy4s.schema.Schema.struct
final case class EHNotFound(message: Option[String] = None) extends NoStackTrace {
override def getMessage(): String = message.orNull
}

object EHNotFound extends ShapeTag.Companion[EHNotFound] {
val id: ShapeId = ShapeId("smithy4s.example", "EHNotFound")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import smithy4s.schema.Schema.struct
final case class EHServiceUnavailable(message: Option[String] = None) extends NoStackTrace {
override def getMessage(): String = message.orNull
}

object EHServiceUnavailable extends ShapeTag.Companion[EHServiceUnavailable] {
val id: ShapeId = ShapeId("smithy4s.example", "EHServiceUnavailable")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class EchoBody(data: Option[String] = None)

object EchoBody extends ShapeTag.Companion[EchoBody] {
val id: ShapeId = ShapeId("smithy4s.example", "EchoBody")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class EchoInput(pathParam: String, body: EchoBody, queryParam: Option[String] = None)

object EchoInput extends ShapeTag.Companion[EchoInput] {
val id: ShapeId = ShapeId("smithy4s.example", "EchoInput")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class ErrorHandlingOperationInput(in: Option[String] = None)

object ErrorHandlingOperationInput extends ShapeTag.Companion[ErrorHandlingOperationInput] {
val id: ShapeId = ShapeId("smithy4s.example", "ErrorHandlingOperationInput")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class ErrorHandlingOperationOutput(out: Option[String] = None)

object ErrorHandlingOperationOutput extends ShapeTag.Companion[ErrorHandlingOperationOutput] {
val id: ShapeId = ShapeId("smithy4s.example", "ErrorHandlingOperationOutput")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct

final case class ExtraErrorOperationInput(in: Option[String] = None)

object ExtraErrorOperationInput extends ShapeTag.Companion[ExtraErrorOperationInput] {
val id: ShapeId = ShapeId("smithy4s.example", "ExtraErrorOperationInput")

Expand Down
Loading

0 comments on commit cc332a3

Please sign in to comment.