Module: ThreeScaleToolbox::Commands::ImportCommand::OpenAPI::Method
- Included in:
- Operation
- Defined in:
- lib/3scale_toolbox/commands/import_command/openapi/method.rb
Instance Method Summary collapse
- #description ⇒ Object
- #friendly_name ⇒ Object
- #method ⇒ Object
- #operation_id ⇒ Object
- #system_name ⇒ Object
Instance Method Details
#description ⇒ Object
26 27 28 |
# File 'lib/3scale_toolbox/commands/import_command/openapi/method.rb', line 26 def description String(operation[:description]) end |
#friendly_name ⇒ Object
14 15 16 |
# File 'lib/3scale_toolbox/commands/import_command/openapi/method.rb', line 14 def friendly_name operation[:operationId] || operation_id end |
#method ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/3scale_toolbox/commands/import_command/openapi/method.rb', line 6 def method { 'friendly_name' => friendly_name, 'description' => description, 'system_name' => system_name } end |
#operation_id ⇒ Object
22 23 24 |
# File 'lib/3scale_toolbox/commands/import_command/openapi/method.rb', line 22 def operation_id "#{operation[:verb]}#{operation[:path].gsub(/[^\w]/, '')}" end |
#system_name ⇒ Object
18 19 20 |
# File 'lib/3scale_toolbox/commands/import_command/openapi/method.rb', line 18 def system_name friendly_name.downcase.gsub(/[^\w]/, '_') end |