Skip to content

Commit

Permalink
Pull shared http config to a mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
JordonPhillips committed Apr 28, 2022
1 parent fa416c5 commit f5feca4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ structure IntegrationResponse {
responseParameters: ResponseParameters
}

@private
list StringList {
member: String
}
Expand Down Expand Up @@ -262,6 +263,7 @@ map Templates {
@private
string Arn

@private
enum ConnectionType {
/// Connections through the public routable internet.
INTERNET
Expand Down Expand Up @@ -294,6 +296,7 @@ enum ContentHandling {
@private
string IamRoleArn

@private
enum IntegrationType {
/// An integration with AWS Lambda functions or other AWS services such as
/// Amazon DynamoDB, Amazon Simple Notification Service or Amazon Simple
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,19 @@ namespace aws.protocols
/// HTTP binding traits.
@protocolDefinition(
traits: [
jsonName
timestampFormat
cors
endpoint
hostLabel
]
)
@trait(selector: "service")
structure awsJson1_0 {
/// The priority ordered list of supported HTTP protocol versions.
http: StringList

/// The priority ordered list of supported HTTP protocol versions that
/// are required when using event streams with the service. If not set,
/// this value defaults to the value of the `http` member. Any entry in
/// `eventStreamHttp` MUST also appear in `http`.
eventStreamHttp: StringList
}
structure awsJson1_0 with [HttpConfiguration] {}

/// An RPC-based protocol that sends JSON payloads. This protocol does not use
/// HTTP binding traits.
@protocolDefinition(
traits: [
jsonName
timestampFormat
cors
endpoint
Expand All @@ -39,7 +28,12 @@ structure awsJson1_0 {
@trait(
selector: "service"
)
structure awsJson1_1 {
structure awsJson1_1 with [HttpConfiguration] {}

/// Contains HTTP protocol configuration for HTTP-based protocols.
@private
@mixin
structure HttpConfiguration {
/// The priority ordered list of supported HTTP protocol versions.
http: StringList

Expand Down Expand Up @@ -154,16 +148,7 @@ structure httpChecksum {
]
)
@trait(selector: "service")
structure restJson1 {
/// The priority ordered list of supported HTTP protocol versions.
http: StringList

/// The priority ordered list of supported HTTP protocol versions that
/// are required when using event streams with the service. If not set,
/// this value defaults to the value of the `http` member. Any entry in
/// `eventStreamHttp` MUST also appear in `http`.
eventStreamHttp: StringList
}
structure restJson1 with [HttpConfiguration] {}

/// A RESTful protocol that sends XML in structured payloads.
@deprecated
Expand All @@ -189,16 +174,7 @@ structure restJson1 {
]
)
@trait(selector: "service")
structure restXml {
/// The priority ordered list of supported HTTP protocol versions.
http: StringList

/// The priority ordered list of supported HTTP protocol versions that
/// are required when using event streams with the service. If not set,
/// this value defaults to the value of the `http` member. Any entry in
/// `eventStreamHttp` MUST also appear in `http`.
eventStreamHttp: StringList

structure restXml with [HttpConfiguration] {
/// Disables the serialization wrapping of error properties in an 'Error'
/// XML element.
@deprecated
Expand Down

0 comments on commit f5feca4

Please sign in to comment.