Skip to content

Commit fc50386

Browse files
committed
Regenerate with some fixes
1 parent ba9d5c9 commit fc50386

File tree

13 files changed

+104
-109
lines changed

13 files changed

+104
-109
lines changed

gems/smithy/lib/smithy/templates/client/protocol_spec.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# This is generated code!
22

3+
require 'smithy-client/protocol_spec_matcher'
4+
35
require_relative '../spec_helper'
46

57
module <%= module_name %>

gems/smithy/lib/smithy/templates/client/spec_helper.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ $LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
77
require '<%= gem_name %>'
88

99
require 'rspec'
10-
require 'smithy-client/protocol_spec_matcher'

gems/smithy/lib/smithy/views/client/auth_resolver.rb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ def auth_rules_code
2323
lines << 'options = []'
2424
auth_operations = operations_with_auth_traits
2525
if auth_operations.empty?
26-
add_service_auth_schemes_to_code(lines)
26+
service_auth_schemes.each do |auth_scheme|
27+
lines << "options << Smithy::Client::AuthOption.new(scheme_id: '#{auth_scheme}')"
28+
end
2729
else
2830
add_operation_case_to_code(lines, auth_operations)
2931
end
@@ -33,12 +35,6 @@ def auth_rules_code
3335

3436
private
3537

36-
def add_service_auth_schemes_to_code(lines)
37-
service_auth_schemes.each do |auth_scheme|
38-
lines << " options << Smithy::Client::AuthOption.new(scheme_id: '#{auth_scheme}')"
39-
end
40-
end
41-
4238
def add_operation_case_to_code(lines, auth_operations)
4339
lines << 'case parameters.operation_name'
4440
auth_operations.each do |id, operation|
@@ -47,7 +43,9 @@ def add_operation_case_to_code(lines, auth_operations)
4743
add_operation_auth_options_to_code(lines, operation)
4844
end
4945
lines << 'else'
50-
add_service_auth_schemes_to_code(lines)
46+
service_auth_schemes.each do |auth_scheme|
47+
lines << " options << Smithy::Client::AuthOption.new(scheme_id: '#{auth_scheme}')"
48+
end
5149
lines << 'end'
5250
end
5351

projections/shapes/lib/shapes/client.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class Client < Smithy::Client::Base
2929
include Smithy::Client::Stubs
3030

3131
self.service = Schema::ShapeService
32+
@identifier = :shapeservice
3233

3334
add_plugin(::ShapeService::Plugins::Endpoint)
3435
add_plugin(Smithy::Client::Plugins::ChecksumRequired)

projections/shapes/lib/shapes/schema.rb

Lines changed: 65 additions & 65 deletions
Large diffs are not rendered by default.

projections/shapes/lib/shapes/waiters.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# This is generated code!
44

55
module ShapeService
6-
76
# @api private
87
module Waiters
8+
99
end
1010
end

projections/shapes/spec/shapes/endpoint_provider_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module ShapeService
2020
expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {})
2121
expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {})
2222
end
23-
2423
end
2524

2625
context "Endpoint not set" do
@@ -34,7 +33,6 @@ module ShapeService
3433
subject.resolve(params)
3534
end.to raise_error(ArgumentError, expected['error'])
3635
end
37-
3836
end
3937
end
4038
end

projections/shapes/spec/spec_helper.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@
77
require 'shapes'
88

99
require 'rspec'
10-
require 'smithy-client/protocol_spec_matcher'

projections/weather/lib/weather/client.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class Client < Smithy::Client::Base
2929
include Smithy::Client::Stubs
3030

3131
self.service = Schema::Weather
32+
@identifier = :weather
3233

3334
add_plugin(::Weather::Plugins::Endpoint)
3435
add_plugin(Smithy::Client::Plugins::ChecksumRequired)

projections/weather/lib/weather/schema.rb

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,44 @@ module Weather
66
# This module contains a schema composed of shapes used by the client.
77
module Schema
88

9-
CityCoordinates = ::Smithy::Schema::Shapes::StructureShape.new(id: 'example.weather#CityCoordinates', name: 'CityCoordinates')
10-
CityId = ::Smithy::Schema::Shapes::StringShape.new(id: 'example.weather#CityId', name: 'CityId', traits: {"smithy.api#pattern" => "^[A-Za-z0-9 ]+$"})
11-
CitySummaries = ::Smithy::Schema::Shapes::ListShape.new(id: 'example.weather#CitySummaries', name: 'CitySummaries')
12-
CitySummary = ::Smithy::Schema::Shapes::StructureShape.new(id: 'example.weather#CitySummary', name: 'CitySummary', traits: {"smithy.api#references" => [{"resource" => "example.weather#City"}]})
13-
GetCityInput = ::Smithy::Schema::Shapes::StructureShape.new(id: 'example.weather#GetCityInput', name: 'GetCityInput')
14-
GetCityOutput = ::Smithy::Schema::Shapes::StructureShape.new(id: 'example.weather#GetCityOutput', name: 'GetCityOutput')
15-
GetCurrentTimeOutput = ::Smithy::Schema::Shapes::StructureShape.new(id: 'example.weather#GetCurrentTimeOutput', name: 'GetCurrentTimeOutput')
16-
GetForecastInput = ::Smithy::Schema::Shapes::StructureShape.new(id: 'example.weather#GetForecastInput', name: 'GetForecastInput')
17-
GetForecastOutput = ::Smithy::Schema::Shapes::StructureShape.new(id: 'example.weather#GetForecastOutput', name: 'GetForecastOutput')
18-
ListCitiesInput = ::Smithy::Schema::Shapes::StructureShape.new(id: 'example.weather#ListCitiesInput', name: 'ListCitiesInput')
19-
ListCitiesOutput = ::Smithy::Schema::Shapes::StructureShape.new(id: 'example.weather#ListCitiesOutput', name: 'ListCitiesOutput')
20-
NoSuchResource = ::Smithy::Schema::Shapes::StructureShape.new(id: 'example.weather#NoSuchResource', name: 'NoSuchResource', traits: {"smithy.api#error" => "client"})
9+
CityCoordinates = ::Smithy::Schema::Shapes::StructureShape.new(id: "example.weather#CityCoordinates", name: "CityCoordinates")
10+
CityId = ::Smithy::Schema::Shapes::StringShape.new(id: "example.weather#CityId", name: "CityId", traits: {"smithy.api#pattern" => "^[A-Za-z0-9 ]+$"})
11+
CitySummaries = ::Smithy::Schema::Shapes::ListShape.new(id: "example.weather#CitySummaries", name: "CitySummaries")
12+
CitySummary = ::Smithy::Schema::Shapes::StructureShape.new(id: "example.weather#CitySummary", name: "CitySummary", traits: {"smithy.api#references" => [{"resource" => "example.weather#City"}]})
13+
GetCityInput = ::Smithy::Schema::Shapes::StructureShape.new(id: "example.weather#GetCityInput", name: "GetCityInput")
14+
GetCityOutput = ::Smithy::Schema::Shapes::StructureShape.new(id: "example.weather#GetCityOutput", name: "GetCityOutput")
15+
GetCurrentTimeOutput = ::Smithy::Schema::Shapes::StructureShape.new(id: "example.weather#GetCurrentTimeOutput", name: "GetCurrentTimeOutput")
16+
GetForecastInput = ::Smithy::Schema::Shapes::StructureShape.new(id: "example.weather#GetForecastInput", name: "GetForecastInput")
17+
GetForecastOutput = ::Smithy::Schema::Shapes::StructureShape.new(id: "example.weather#GetForecastOutput", name: "GetForecastOutput")
18+
ListCitiesInput = ::Smithy::Schema::Shapes::StructureShape.new(id: "example.weather#ListCitiesInput", name: "ListCitiesInput")
19+
ListCitiesOutput = ::Smithy::Schema::Shapes::StructureShape.new(id: "example.weather#ListCitiesOutput", name: "ListCitiesOutput")
20+
NoSuchResource = ::Smithy::Schema::Shapes::StructureShape.new(id: "example.weather#NoSuchResource", name: "NoSuchResource", traits: {"smithy.api#error" => "client"})
2121

22-
CityCoordinates.add_member(:latitude, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::Float, location_name: 'latitude', traits: {"smithy.api#required" => {}}))
23-
CityCoordinates.add_member(:longitude, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::Float, location_name: 'longitude', traits: {"smithy.api#required" => {}}))
22+
CityCoordinates.add_member(:latitude, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::Float, location_name: "latitude", traits: {"smithy.api#required" => {}}))
23+
CityCoordinates.add_member(:longitude, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::Float, location_name: "longitude", traits: {"smithy.api#required" => {}}))
2424
CityCoordinates.type = Types::CityCoordinates
2525
CitySummaries.member = ::Smithy::Schema::Shapes::ShapeRef.new(shape: CitySummary)
26-
CitySummary.add_member(:city_id, ::Smithy::Schema::Shapes::ShapeRef.new(shape: CityId, location_name: 'cityId', traits: {"smithy.api#required" => {}}))
27-
CitySummary.add_member(:name, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::String, location_name: 'name', traits: {"smithy.api#required" => {}}))
26+
CitySummary.add_member(:city_id, ::Smithy::Schema::Shapes::ShapeRef.new(shape: CityId, location_name: "cityId", traits: {"smithy.api#required" => {}}))
27+
CitySummary.add_member(:name, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::String, location_name: "name", traits: {"smithy.api#required" => {}}))
2828
CitySummary.type = Types::CitySummary
29-
GetCityInput.add_member(:city_id, ::Smithy::Schema::Shapes::ShapeRef.new(shape: CityId, location_name: 'cityId', traits: {"smithy.api#required" => {}}))
29+
GetCityInput.add_member(:city_id, ::Smithy::Schema::Shapes::ShapeRef.new(shape: CityId, location_name: "cityId", traits: {"smithy.api#required" => {}}))
3030
GetCityInput.type = Types::GetCityInput
31-
GetCityOutput.add_member(:name, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::String, location_name: 'name', traits: {"smithy.api#notProperty" => {}, "smithy.api#required" => {}}))
32-
GetCityOutput.add_member(:coordinates, ::Smithy::Schema::Shapes::ShapeRef.new(shape: CityCoordinates, location_name: 'coordinates', traits: {"smithy.api#required" => {}}))
31+
GetCityOutput.add_member(:name, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::String, location_name: "name", traits: {"smithy.api#notProperty" => {}, "smithy.api#required" => {}}))
32+
GetCityOutput.add_member(:coordinates, ::Smithy::Schema::Shapes::ShapeRef.new(shape: CityCoordinates, location_name: "coordinates", traits: {"smithy.api#required" => {}}))
3333
GetCityOutput.type = Types::GetCityOutput
34-
GetCurrentTimeOutput.add_member(:time, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::Timestamp, location_name: 'time', traits: {"smithy.api#required" => {}}))
34+
GetCurrentTimeOutput.add_member(:time, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::Timestamp, location_name: "time", traits: {"smithy.api#required" => {}}))
3535
GetCurrentTimeOutput.type = Types::GetCurrentTimeOutput
36-
GetForecastInput.add_member(:city_id, ::Smithy::Schema::Shapes::ShapeRef.new(shape: CityId, location_name: 'cityId', traits: {"smithy.api#required" => {}}))
36+
GetForecastInput.add_member(:city_id, ::Smithy::Schema::Shapes::ShapeRef.new(shape: CityId, location_name: "cityId", traits: {"smithy.api#required" => {}}))
3737
GetForecastInput.type = Types::GetForecastInput
38-
GetForecastOutput.add_member(:chance_of_rain, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::Float, location_name: 'chanceOfRain'))
38+
GetForecastOutput.add_member(:chance_of_rain, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::Float, location_name: "chanceOfRain"))
3939
GetForecastOutput.type = Types::GetForecastOutput
40-
ListCitiesInput.add_member(:next_token, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::String, location_name: 'nextToken'))
41-
ListCitiesInput.add_member(:page_size, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::Integer, location_name: 'pageSize'))
40+
ListCitiesInput.add_member(:next_token, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::String, location_name: "nextToken"))
41+
ListCitiesInput.add_member(:page_size, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::Integer, location_name: "pageSize"))
4242
ListCitiesInput.type = Types::ListCitiesInput
43-
ListCitiesOutput.add_member(:next_token, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::String, location_name: 'nextToken'))
44-
ListCitiesOutput.add_member(:items, ::Smithy::Schema::Shapes::ShapeRef.new(shape: CitySummaries, location_name: 'items', traits: {"smithy.api#required" => {}}))
43+
ListCitiesOutput.add_member(:next_token, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::String, location_name: "nextToken"))
44+
ListCitiesOutput.add_member(:items, ::Smithy::Schema::Shapes::ShapeRef.new(shape: CitySummaries, location_name: "items", traits: {"smithy.api#required" => {}}))
4545
ListCitiesOutput.type = Types::ListCitiesOutput
46-
NoSuchResource.add_member(:resource_type, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::String, location_name: 'resourceType', traits: {"smithy.api#required" => {}}))
46+
NoSuchResource.add_member(:resource_type, ::Smithy::Schema::Shapes::ShapeRef.new(shape: ::Smithy::Schema::Shapes::Prelude::String, location_name: "resourceType", traits: {"smithy.api#required" => {}}))
4747
NoSuchResource.type = Types::NoSuchResource
4848

4949
Weather = ::Smithy::Schema::Shapes::ServiceShape.new do |service|

0 commit comments

Comments
 (0)