You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: json_rest_api.rb
    path of file: ./repos/geoengineer/lib/geoengineer/templates
    
    the code of the file until where you have to start completion: # This template will create basic JSON REST API gateway resources
# It is recommended due to difficulties managing API_Gateway resources
# to use such a template
# This resource will also delete any resource on the API that is not defined
# within this template as a means of managing the resources
# Beta Template
class GeoEngineer::Templates::JsonRestApi < GeoEngineer::Template
  attr_reader :rest_api

  def create_rest_resources(params)
    rest_api = @rest_api
    api_resources = {}
    params[:methods].each do |method_name
    
  def create_api_integrations_responses(api_resources, api_integrations, params)
    rest_api = @rest_api
    api_integration_responses = []

    http_method_response_mappings(api_resources, params) do |api_resource, name, mapping|
      http_method = mapping[:method]
      status = mapping[:status]
      selection_pattern = mapping[:selection_pattern]

      api_integration_response = parent.resource(
        "aws_api_gateway_integration_response",
        "ir_#{api_resource.id}_#{name}"
      ) {
        _rest_api rest_api
        _resource api_resource
        http_method http_method
        status_code status
        selection_pattern selection_pattern if selection_pattern
        depends_on [api_integrations.values].flatten.map(&:terraform_name)
        depends_on api_integration_responses.map(&:terraform_name) # force order
      }

      api_integration_responses << api_integration_response
    end

    api_integration_responses
  end