Class: AWSCDK::APIGateway::InlineAPIDefinition
- Inherits:
-
APIDefinition
- Object
- APIDefinition
- AWSCDK::APIGateway::InlineAPIDefinition
- Defined in:
- api_gateway/inline_api_definition.rb
Overview
OpenAPI specification from an inline JSON object.
Class Method Summary collapse
Instance Method Summary collapse
-
#bind(_scope) ⇒ AWSCDK::APIGateway::APIDefinitionConfig
Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
-
#bind_after_create(_scope, _rest_api) ⇒ void
Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.
-
#initialize(definition) ⇒ InlineAPIDefinition
constructor
A new instance of InlineAPIDefinition.
Constructor Details
#initialize(definition) ⇒ InlineAPIDefinition
Returns a new instance of InlineAPIDefinition.
9 10 11 12 |
# File 'api_gateway/inline_api_definition.rb', line 9 def initialize(definition) Jsii::Type.check_type(definition, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "definition") Jsii::Object.instance_method(:initialize).bind(self).call(definition) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
14 15 16 17 18 19 |
# File 'api_gateway/inline_api_definition.rb', line 14 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, :bind_after_create => { kind: :method, name: "bindAfterCreate", is_optional: false }, } end |
Instance Method Details
#bind(_scope) ⇒ AWSCDK::APIGateway::APIDefinitionConfig
Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
25 26 27 28 |
# File 'api_gateway/inline_api_definition.rb', line 25 def bind(_scope) Jsii::Type.check_type(_scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "_scope") jsii_call_method("bind", [_scope]) end |
#bind_after_create(_scope, _rest_api) ⇒ void
This method returns an undefined value.
Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.
Specifically it's required to allow assets to add metadata for tooling like SAM CLI to be able to find their origins.
38 39 40 41 42 |
# File 'api_gateway/inline_api_definition.rb', line 38 def bind_after_create(_scope, _rest_api) Jsii::Type.check_type(_scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "_scope") Jsii::Type.check_type(_rest_api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5LklSZXN0QXBpUmVmIn0=")), "_restApi") jsii_call_method("bindAfterCreate", [_scope, _rest_api]) end |