Sha256: 98aa9497603b5735c570e621b3bb23c28f7d471dac9d48b6f5c10dedce3b9b9b

Contents?: true

Size: 1.63 KB

Versions: 7

Compression:

Stored size: 1.63 KB

Contents

require 'bjond-api'

integration_app = BjondApi::BjondAppDefinition.new
integration_app.id           = '[your-guid-here]'
integration_app.author       = 'Bjönd, Inc.'
integration_app.name         = 'Bjönd Pokitdok API'
integration_app.description  = 'Testing API functionality'
integration_app.iconURL      = ''

# Warning: If you change configURL, or rootEndpoint, you will need to manually configure Bjond service routes.
#          We recommend leaving these two variables alone.
integration_app.configURL    = "http://#{Rails.application.config.action_controller.default_url_options[:host] || `hostname`}/bjond-app/services"
integration_app.rootEndpoint = "http://#{Rails.application.config.action_controller.default_url_options[:host] || `hostname`}/bjond-app/services"



config = BjondApi::BjondAppConfig.instance
config.active_definition = integration_app
config.group_configuration_schema = {
  :id => 'urn:jsonschema:com:bjond:persistence:bjondservice:GroupConfiguration',
  :title => 'bjond-[name]-app-schema',
  :type  => 'object',
  :properties => {
    :sample_field => {
      :type => 'string',
      :description => 'Sample field description',
      :title => 'Sample field'
    }
  },
  :required => ['sample_field']
}.to_json

config.encryption_key_name = 'APP_ENCRYPTION_KEY'

def config.configure_group(result, bjond_registration)
  puts '[ App group configuration method not implemented. This can be set via BjondAppConfig.instance.configure_group ]'
end

def config.get_group_configuration(bjond_registration)
  puts '[ get_group_configuration method not implemented. This can be set via BjondAppConfig.instance.get_group_configuration ]'
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bjond-api-1.1.0 lib/generators/templates/initializer.rb
bjond-api-1.0.0 lib/generators/templates/initializer.rb
bjond-api-0.4.0 lib/generators/templates/initializer.rb
bjond-api-0.3.13 lib/generators/templates/initializer.rb
bjond-api-0.3.12 lib/generators/templates/initializer.rb
bjond-api-0.3.11 lib/generators/templates/initializer.rb
bjond-api-0.3.10 lib/generators/templates/initializer.rb