Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/resolvers/ci_configuration/sast_resolver.rb')
-rw-r--r--app/graphql/resolvers/ci_configuration/sast_resolver.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/graphql/resolvers/ci_configuration/sast_resolver.rb b/app/graphql/resolvers/ci_configuration/sast_resolver.rb
new file mode 100644
index 00000000000..e8c42076ea2
--- /dev/null
+++ b/app/graphql/resolvers/ci_configuration/sast_resolver.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require "json"
+
+module Resolvers
+ module CiConfiguration
+ class SastResolver < BaseResolver
+ SAST_UI_SCHEMA_PATH = 'app/validators/json_schemas/security_ci_configuration_schemas/sast_ui_schema.json'
+
+ type ::Types::CiConfiguration::Sast::Type, null: true
+
+ def resolve(**args)
+ Gitlab::Json.parse(File.read(Rails.root.join(SAST_UI_SCHEMA_PATH)))
+ end
+ end
+ end
+end