Class: Ide::SchemasConfigService

Inherits:
BaseConfigService show all
Defined in:
app/services/ide/schemas_config_service.rb

Constant Summary collapse

PREDEFINED_SCHEMAS =
[{
  uri: 'https://json.schemastore.org/gitlab-ci',
  match: ['*.gitlab-ci.yml']
}].freeze

Constants inherited from BaseConfigService

BaseConfigService::ValidationError, BaseConfigService::WEBIDE_CONFIG_FILE

Instance Attribute Summary

Attributes inherited from BaseConfigService

#config, #config_content

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

This class inherits a constructor from BaseService

Instance Method Details

#executeObject



10
11
12
13
14
15
# File 'app/services/ide/schemas_config_service.rb', line 10

def execute
  schema = predefined_schema_for(params[:filename]) || {}
  success(schema: schema)
rescue StandardError => e
  error(e.message)
end