index
int64
0
0
repo_id
stringclasses
829 values
file_path
stringlengths
34
254
content
stringlengths
6
5.38M
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/service_history_serializer.rb
# frozen_string_literal: true class ServiceHistorySerializer include JSONAPI::Serializer set_id { '' } attributes :service_history do |object| object[:episodes] end attributes :vet_status_eligibility do |object| object[:vet_status_eligibility] end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/tsa_letter_serializer.rb
# frozen_string_literal: true class TsaLetterSerializer include JSONAPI::Serializer set_id { '' } attribute :document_id, :doc_type, :type_description, :received_at end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/archived_claim_serializer.rb
# frozen_string_literal: true class ArchivedClaimSerializer < SavedClaimSerializer attribute :pdf_url, if: proc { |_record, params| params && params[:pdf_url].present? } do |_record, params| params[:pdf_url] end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/disability_contention_serializer.rb
# frozen_string_literal: true class DisabilityContentionSerializer include JSONAPI::Serializer attribute :code attribute :medical_term attribute :lay_term end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/maintenance_window_serializer.rb
# frozen_string_literal: true class MaintenanceWindowSerializer include JSONAPI::Serializer attributes :id, :external_service, :start_time, :end_time, :description end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/education_benefits_claim_serializer.rb
# frozen_string_literal: true class EducationBenefitsClaimSerializer include JSONAPI::Serializer set_id :token attributes :form, :regional_office, :confirmation_number end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/gi_bill_feedback_serializer.rb
# frozen_string_literal: true class GIBillFeedbackSerializer include JSONAPI::Serializer attributes :guid, :state, :parsed_response end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/submission_status_serializer.rb
# frozen_string_literal: true class SubmissionStatusSerializer include JSONAPI::Serializer attributes :id, :detail, :form_type, :message, :status, :created_at, :updated_at, :pdf_support end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/preferred_name_serializer.rb
# frozen_string_literal: true class PreferredNameSerializer include JSONAPI::Serializer set_id { '' } attributes :preferred_name end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/user_action_event_serializer.rb
# frozen_string_literal: true class UserActionEventSerializer include JSONAPI::Serializer attribute :details, :created_at, :updated_at, :event_type, :identifier end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/evss_claim_base_helper.rb
# frozen_string_literal: true module EVSSClaimBaseHelper PHASE_MAPPING = { 'claim received' => 1, 'under review' => 2, 'gathering of evidence' => 3, 'review of evidence' => 4, 'preparation for decision' => 5, 'pending decision approval' => 6, 'preparation for notification' => 7, 'comp...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/rating_info_serializer.rb
# frozen_string_literal: true class RatingInfoSerializer include JSONAPI::Serializer set_id { '' } attribute :user_percent_of_disability attribute :source_system do |_| 'EVSS' end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/decision_review_evidence_attachment_serializer.rb
# frozen_string_literal: true class DecisionReviewEvidenceAttachmentSerializer include JSONAPI::Serializer set_type :decision_review_evidence_attachments attribute :guid end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/cemetery_serializer.rb
# frozen_string_literal: true class CemeterySerializer include JSONAPI::Serializer set_type :preneeds_cemeteries attribute :name attribute :cemetery_type attribute :num attribute :cemetery_id, &:id end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/intent_to_file_serializer.rb
# frozen_string_literal: true class IntentToFileSerializer include JSONAPI::Serializer set_id { '' } attribute :intent_to_file end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/dependents_serializer.rb
# frozen_string_literal: true START_EVENTS = %w[EMC SCHATTB].freeze LATER_START_EVENTS = %w[SCHATTB].freeze END_EVENTS = %w[T18 SCHATTT].freeze FUTURE_EVENTS = (LATER_START_EVENTS + END_EVENTS).freeze module DependentsHelper def max_time(a, b) a[:award_effective_date] <=> b[:award_effective_date] end def i...
0
code_files/vets-api-private/app/serializers
code_files/vets-api-private/app/serializers/async_transaction/base_serializer.rb
# frozen_string_literal: true module AsyncTransaction class BaseSerializer include JSONAPI::Serializer set_id { '' } attribute :transaction_id attribute :transaction_status attribute :type attribute :metadata, &:parsed_metadata # This is needed to set the correct type based on the obje...
0
code_files/vets-api-private/app/serializers
code_files/vets-api-private/app/serializers/form1010cg/claim_serializer.rb
# frozen_string_literal: true module Form1010cg class ClaimSerializer include JSONAPI::Serializer end end
0
code_files/vets-api-private/app/serializers
code_files/vets-api-private/app/serializers/form1010cg/attachment_serializer.rb
# frozen_string_literal: true module Form1010cg class AttachmentSerializer include JSONAPI::Serializer set_type :form1010cg_attachments attribute :guid end end
0
code_files/vets-api-private/app/serializers
code_files/vets-api-private/app/serializers/form1010cg/submission_serializer.rb
# frozen_string_literal: true module Form1010cg class SubmissionSerializer include JSONAPI::Serializer set_id { '' } attribute :confirmation_number, &:carma_case_id attribute :submitted_at, &:accepted_at end end
0
code_files/vets-api-private/app/serializers/lighthouse
code_files/vets-api-private/app/serializers/lighthouse/hcc/invoice_serializer.rb
# frozen_string_literal: true class Lighthouse::HCC::InvoiceSerializer include JSONAPI::Serializer set_type :medical_copays set_key_transform :camel_lower set_id :external_id attributes :url, :facility, :external_id, :latest_billing_ref, :current_balance,...
0
code_files/vets-api-private/app/serializers/lighthouse
code_files/vets-api-private/app/serializers/lighthouse/hcc/copay_detail_serializer.rb
# frozen_string_literal: true module Lighthouse module HCC class CopayDetailSerializer include JSONAPI::Serializer set_key_transform :camel_lower set_type :medical_copay_details set_id :external_id attributes :external_id, :facility, :bill_number,...
0
code_files/vets-api-private/app/serializers/lighthouse
code_files/vets-api-private/app/serializers/lighthouse/facilities/facility_serializer.rb
# frozen_string_literal: true class Lighthouse::Facilities::FacilitySerializer include JSONAPI::Serializer set_key_transform :camel_lower attribute :access do |obj| obj.access&.deep_stringify_keys&.deep_transform_keys { |key| key.camelize(:lower) } end attribute :active_status attribute :address do |...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/validators/folder_name_convention_validator.rb
# frozen_string_literal: true class FolderNameConventionValidator < ActiveModel::EachValidator def validate_each(record, field, value) unless value.nil? unless value.match?(/^[[:alnum:]\s]+$/) record.errors.add(field, 'is not alphanumeric (letters, numbers, or spaces)') end record.error...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/validators/token_util.rb
# frozen_string_literal: true class TokenUtil def self.validate_token(token) raise error_klass('Invalid audience') unless TokenUtil.valid_audience?(token) # Only static and ssoi tokens utilize this validator at this time token.static? || token.ssoi_token? end # Validates the token audience against ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/controllers/application_controller.rb
# frozen_string_literal: true require 'feature_flipper' require 'aes_256_cbc_encryptor' require 'vets/shared_logging' class ApplicationController < ActionController::API include AuthenticationAndSSOConcerns include ActionController::RequestForgeryProtection include ExceptionHandling include Headers include ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/controllers/claims_base_controller.rb
# frozen_string_literal: true # Abstract base controller for Claims controllers that use the SavedClaim # and optionally, PersistentAttachment models. Subclasses must have: # # * `short_name()`, which returns an identifier that matches the parameter # that the form will be set as in the JSON submission. # * `claim_...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/controllers/preneeds_controller.rb
# frozen_string_literal: true require 'preneeds/service' class PreneedsController < ApplicationController service_tag 'preneed-burial-application' skip_before_action(:authenticate) protected def client @client ||= Preneeds::Service.new end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/controllers/gids_controller.rb
# frozen_string_literal: true class GIDSController < ApplicationController service_tag 'gibill-comparison' skip_before_action :authenticate private def service GIDSRedis.new end def scrubbed_params params.except(:action, :controller, :format) end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/controllers/flipper_controller.rb
# frozen_string_literal: true class FlipperController < ApplicationController service_tag 'feature-flag' skip_before_action :authenticate def login # Swallow auth token and redirect to /flipper/features with a param for redirecting redirect_to "/flipper/features?redirect=#{params[:feature_name]}" end ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/controllers/appeals_base_controller.rb
# frozen_string_literal: true require 'caseflow/service' class AppealsBaseController < ApplicationController include FailedRequestLoggable before_action { authorize :appeals, :access? } private def appeals_service Caseflow::Service.new end def request_body_debug_data { request_body_class_...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v1/medical_copays_controller.rb
# frozen_string_literal: true module V1 class MedicalCopaysController < ApplicationController service_tag 'debt-resolution' def index invoice_bundle = medical_copay_service.list(count: params[:count] || 10, page: params[:page] || 1) render json: Lighthouse::HCC::InvoiceSerializer.new( i...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v1/apidocs_controller.rb
# frozen_string_literal: true module V1 class ApidocsController < ApplicationController include Swagger::Blocks service_tag 'platform-base' skip_before_action :authenticate swagger_root do key :swagger, '2.0' info do key :version, '1.0.0' key :title, 'va.gov API' ...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v1/sessions_controller.rb
# frozen_string_literal: true require 'base64' require 'saml/errors' require 'saml/post_url_service' require 'saml/responses/login' require 'saml/responses/logout' require 'saml/ssoe_settings_service' require 'login/after_login_actions' module V1 class SessionsController < ApplicationController service_tag 'ide...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v1/post911_gi_bill_statuses_controller.rb
# frozen_string_literal: true require 'formatters/date_formatter' require 'lighthouse/benefits_education/service' module V1 class Post911GIBillStatusesController < ApplicationController include IgnoreNotFound service_tag 'gibill-statement' STATSD_KEY_PREFIX = 'api.post911_gi_bill_status' def show...
0
code_files/vets-api-private/app/controllers/v1
code_files/vets-api-private/app/controllers/v1/gids/zipcode_rates_controller.rb
# frozen_string_literal: true module V1 module GIDS class ZipcodeRatesController < GIDSController def show render json: service.get_zipcode_rate_v1(scrubbed_params) end end end end
0
code_files/vets-api-private/app/controllers/v1
code_files/vets-api-private/app/controllers/v1/gids/institution_programs_controller.rb
# frozen_string_literal: true module V1 module GIDS class InstitutionProgramsController < GIDSController def autocomplete render json: service.get_institution_program_autocomplete_suggestions_v1(scrubbed_params) end def search render json: service.get_institution_program_search...
0
code_files/vets-api-private/app/controllers/v1
code_files/vets-api-private/app/controllers/v1/gids/institutions_controller.rb
# frozen_string_literal: true module V1 module GIDS class InstitutionsController < GIDSController def autocomplete render json: service.get_institution_autocomplete_suggestions_v1(scrubbed_params) end def search render json: service.get_institution_search_results_v1(scrubbed_pa...
0
code_files/vets-api-private/app/controllers/v1
code_files/vets-api-private/app/controllers/v1/gids/calculator_constants_controller.rb
# frozen_string_literal: true module V1 module GIDS class CalculatorConstantsController < GIDSController def index render json: service.get_calculator_constants_v1(scrubbed_params) end end end end
0
code_files/vets-api-private/app/controllers/v1
code_files/vets-api-private/app/controllers/v1/gids/yellow_ribbon_programs_controller.rb
# frozen_string_literal: true module V1 module GIDS class YellowRibbonProgramsController < GIDSController def index render json: service.get_yellow_ribbon_programs_v1(scrubbed_params) end end end end
0
code_files/vets-api-private/app/controllers/v1
code_files/vets-api-private/app/controllers/v1/gids/version_public_exports_controller.rb
# frozen_string_literal: true require 'gi/client' module V1 module GIDS class VersionPublicExportsController < GIDSController def show client = ::GI::Client.new client_response = client.get_public_export_v1(scrubbed_params) if client_response.status == 200 send_data( ...
0
code_files/vets-api-private/app/controllers/v1
code_files/vets-api-private/app/controllers/v1/gids/lcpe_controller.rb
# frozen_string_literal: true require 'gi/lcpe/client' module V1 module GIDS class LCPEController < GIDSController rescue_from LCPERedis::ClientCacheStaleError, with: :version_invalid FILTER_PARAMS = %i[edu_lac_type_nm state lac_nm page per_page].freeze private def service ret...
0
code_files/vets-api-private/app/controllers/v1/gids
code_files/vets-api-private/app/controllers/v1/gids/lcpe/exams_controller.rb
# frozen_string_literal: true module V1 module GIDS module LCPE class ExamsController < GIDS::LCPEController def index exams = service.get_exams_v1(scrubbed_params) set_headers(exams[:version]) unless bypass_versioning? render json: exams end def show ...
0
code_files/vets-api-private/app/controllers/v1/gids
code_files/vets-api-private/app/controllers/v1/gids/lcpe/lacs_controller.rb
# frozen_string_literal: true module V1 module GIDS module LCPE class LacsController < GIDS::LCPEController def index lacs = service.get_licenses_and_certs_v1(scrubbed_params) set_headers(lacs[:version]) unless bypass_versioning? render json: lacs end ...
0
code_files/vets-api-private/app/controllers/v1
code_files/vets-api-private/app/controllers/v1/profile/military_infos_controller.rb
# frozen_string_literal: true require 'va_profile/profile/v3/service' module V1 module Profile # NOTE: This controller is used for discovery purposes. # Please contact the Authenticated Experience Profile team before using. class MilitaryInfosController < ApplicationController service_tag 'militar...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/veteran_onboardings_controller.rb
# frozen_string_literal: true module V0 class VeteranOnboardingsController < ApplicationController service_tag 'veteran-onboarding' before_action :set_veteran_onboarding def show render json: @veteran_onboarding, status: :ok end def update if @veteran_onboarding.update(veteran_onboa...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/datadog_action_controller.rb
# frozen_string_literal: true module V0 class DatadogActionController < ApplicationController service_tag 'datadog-metrics' skip_before_action :authenticate def create metric = params[:metric] tags = params[:tags] || [] unless DatadogMetrics::ALLOWLIST.include?(metric) render ...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/caregivers_assistance_claims_controller.rb
# frozen_string_literal: true module V0 # Application for the Program of Comprehensive Assistance for Family Caregivers (Form 10-10CG) class CaregiversAssistanceClaimsController < ApplicationController include RetriableConcern include PdfFilenameGenerator service_tag 'caregiver-application' AUDIT...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/event_bus_gateway_controller.rb
# frozen_string_literal: true module V0 class EventBusGatewayController < SignIn::ServiceAccountApplicationController service_tag 'event_bus_gateway' def send_email EventBusGateway::LetterReadyEmailJob.perform_async( participant_id, send_email_params.require(:template_id) ) ...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/documents_controller.rb
# frozen_string_literal: true # Upload documents associated with a claim in the Claim Status Tool, to be sent to EVSS in a Job module V0 class DocumentsController < ApplicationController before_action { authorize :evss, :access? } service_tag 'claim-status' def create params.require :file cl...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/debt_letters_controller.rb
# frozen_string_literal: true require 'debt_management_center/debt_letter_downloader' module V0 class DebtLettersController < ApplicationController service_tag 'debt-resolution' before_action { authorize :debt_letters, :access? } def index render(json: service.list_letters) end def show ...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/letters_discrepancy_controller.rb
# frozen_string_literal: true # NOTE: extra imports shouldn't be needed in theory, but # they sometimes cause the services to not load if they're not there # imports needed for evss require 'common/exceptions/record_not_found' # this shouldn't be needed require 'evss/letters/download_service' # this shouldn't be need...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/terms_of_use_agreements_controller.rb
# frozen_string_literal: true require 'terms_of_use/exceptions' module V0 class TermsOfUseAgreementsController < ApplicationController service_tag 'terms-of-use' skip_before_action :verify_authenticity_token, only: [:update_provisioning] skip_before_action :authenticate before_action :terms_authent...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/mhv_opt_in_flags_controller.rb
# frozen_string_literal: true module V0 class MHVOptInFlagsController < ApplicationController service_tag 'deprecated' def show opt_in_flag = MHVOptInFlag.find_by(user_account_id: current_user.user_account, feature: params[:feature]) raise Common::Exceptions::RecordNotFound, message: 'Record not ...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/apps_controller.rb
# frozen_string_literal: true require 'apps/client' module V0 class AppsController < ApplicationController include ActionView::Helpers::SanitizeHelper service_tag 'third-party-apps' skip_before_action :authenticate def index response = Apps::Client.new.get_all render json: response.bod...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/upload_supporting_evidences_controller.rb
# frozen_string_literal: true require 'logging/third_party_transaction' module V0 class UploadSupportingEvidencesController < ApplicationController include FormAttachmentCreate extend Logging::ThirdPartyTransaction::MethodWrapper service_tag 'disability-application' FORM_ATTACHMENT_MODEL = Supporti...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/medical_copays_controller.rb
# frozen_string_literal: true module V0 class MedicalCopaysController < ApplicationController service_tag 'debt-resolution' before_action(except: :send_statement_notifications) { authorize :medical_copays, :access? } before_action(only: :send_statement_notifications) { authorize :medical_copays, :access_...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/tsa_letter_controller.rb
# frozen_string_literal: true require 'efolder/service' module V0 class TsaLetterController < ApplicationController service_tag 'tsa_letter' def index letters = service.list_tsa_letters render(json: TsaLetterSerializer.new(letters)) end def show send_data( service.get_tsa...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/sign_in_controller.rb
# frozen_string_literal: true require 'sign_in/logger' module V0 class SignInController < SignIn::ApplicationController include SignIn::SSOAuthorizable skip_before_action :authenticate, only: %i[authorize callback token refresh revoke revoke_all_sessions logout ...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/claim_letters_controller.rb
# frozen_string_literal: true require 'claim_letters/claim_letter_downloader' require 'claim_letters/providers/claim_letters/lighthouse_claim_letters_provider' module V0 class ClaimLettersController < ApplicationController before_action :set_api_provider Sentry.set_tags(feature: 'claim-letters') servic...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/intent_to_files_controller.rb
# frozen_string_literal: true require 'disability_compensation/factories/api_provider_factory' require 'logging/third_party_transaction' require 'lighthouse/benefits_claims/intent_to_file/api_response' require 'lighthouse/benefits_claims/intent_to_file/monitor' module V0 class IntentToFilesController < ApplicationC...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/form1095_bs_controller.rb
# frozen_string_literal: true require_relative '../../../lib/veteran_enrollment_system/form1095_b/service' require_relative '../../../lib/veteran_enrollment_system/enrollment_periods/service' module V0 class Form1095BsController < ApplicationController service_tag 'form-1095b' before_action { authorize :for...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/average_days_for_claim_completion_controller.rb
# frozen_string_literal: true module V0 class AverageDaysForClaimCompletionController < ApplicationController service_tag 'average-days-to-completion' skip_before_action :authenticate, only: :index def index rtn = AverageDaysForClaimCompletion.order('created_at DESC').first render json: { ...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/search_click_tracking_controller.rb
# frozen_string_literal: true require 'search_click_tracking/service' module V0 class SearchClickTrackingController < ApplicationController include ActionView::Helpers::SanitizeHelper service_tag 'search' skip_before_action :authenticate skip_before_action :verify_authenticity_token # Sends cl...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/coe_controller.rb
# frozen_string_literal: true require 'lgy/service' module V0 class CoeController < ApplicationController service_tag 'home-loan-status' def status coe_status = lgy_service.coe_status render json: { data: { attributes: coe_status } }, status: :ok end def download_coe res = lgy_se...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/benefits_documents_controller.rb
# frozen_string_literal: true require 'lighthouse/benefits_documents/service' module V0 class BenefitsDocumentsController < ApplicationController before_action { authorize :lighthouse, :access? } Sentry.set_tags(team: 'benefits-claim-appeal-status', feature: 'benefits-documents') service_tag 'claims-sh...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/veteran_readiness_employment_claims_controller.rb
# frozen_string_literal: true module V0 class VeteranReadinessEmploymentClaimsController < ClaimsBaseController service_tag 'vre-application' before_action :authenticate skip_before_action :load_user def create if claim.save Rails.logger.info "Submitting VR&E claim via #{modular_api_en...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/evss_claims_controller.rb
# frozen_string_literal: true module V0 class EVSSClaimsController < ApplicationController include IgnoreNotFound service_tag 'claim-status' before_action { authorize :evss, :access? } def index claims, synchronized = service.all options = { meta: { successful_sync: synchronized } } ...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/dependents_applications_controller.rb
# frozen_string_literal: true require 'dependents/monitor' module V0 class DependentsApplicationsController < ApplicationController service_tag 'dependent-change' def show dependents = create_dependent_service.get_dependents dependents[:diaries] = dependency_verification_service.read_diaries ...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/feature_toggles_controller.rb
# frozen_string_literal: true module V0 class FeatureTogglesController < ApplicationController service_tag 'feature-flag' # the feature toggle does not require authentication, but if a user is logged we might use @current_user skip_before_action :authenticate before_action :load_user def index ...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/claim_documents_controller.rb
# frozen_string_literal: true require 'lgy/tag_sentry' require 'claim_documents/monitor' require 'lighthouse/benefits_intake/service' require 'pdf_utilities/datestamp_pdf' module V0 class ClaimDocumentsController < ApplicationController service_tag 'claims-shared' skip_before_action(:authenticate) befor...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/example_controller.rb
# frozen_string_literal: true # example controller to show use of logging in with sessions controller module V0 class ExampleController < ApplicationController service_tag 'platform-base' before_action :authenticate, only: [:welcome] def index render json: { message: 'Welcome to the va.gov API' }...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/education_career_counseling_claims_controller.rb
# frozen_string_literal: true module V0 class EducationCareerCounselingClaimsController < ClaimsBaseController service_tag 'career-guidance-application' def create claim = SavedClaim::EducationCareerCounselingClaim.new(form: filtered_params[:form]) unless claim.save StatsD.increment("#{...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/form210779_controller.rb
# frozen_string_literal: true module V0 class Form210779Controller < ApplicationController include RetriableConcern service_tag 'nursing-home-information' skip_before_action :authenticate before_action :load_user before_action :check_feature_enabled def create claim = saved_claim_class...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/disability_compensation_forms_controller.rb
# frozen_string_literal: true require 'evss/common_service' require 'evss/disability_compensation_auth_headers' require 'evss/disability_compensation_form/form4142' require 'evss/disability_compensation_form/service' require 'lighthouse/benefits_reference_data/response_strategy' require 'disability_compensation/factor...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/id_card_attributes_controller.rb
# frozen_string_literal: true require 'vic/url_helper' require 'vic/id_card_attribute_error' module V0 class IdCardAttributesController < ApplicationController service_tag 'veteran-id-card' before_action :authorize def show id_attributes = IdCardAttributes.for_user(current_user) signed_attr...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/map_services_controller.rb
# frozen_string_literal: true require 'map/security_token/service' module V0 class MapServicesController < SignIn::ServiceAccountApplicationController service_tag 'identity' # POST /v0/map_services/:application/token def token icn = @service_account_access_token.user_attributes['icn'] result...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/form21p530a_controller.rb
# frozen_string_literal: true module V0 class Form21p530aController < ApplicationController include RetriableConcern include PdfFill::Forms::FormHelper service_tag 'state-tribal-interment-allowance' skip_before_action :authenticate, only: %i[create download_pdf] before_action :load_user, :check_...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/hca_attachments_controller.rb
# frozen_string_literal: true module V0 class HCAAttachmentsController < ApplicationController include FormAttachmentCreate service_tag 'healthcare-application' skip_before_action(:authenticate, raise: false) FORM_ATTACHMENT_MODEL = HCAAttachment private def serializer_klass HCAAtta...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/maintenance_windows_controller.rb
# frozen_string_literal: true module V0 class MaintenanceWindowsController < ApplicationController service_tag 'maintenance-windows' skip_before_action :authenticate def index @maintenance_windows = MaintenanceWindow.end_after(Time.zone.now) render json: MaintenanceWindowSerializer.new(@mai...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/apidocs_controller.rb
# frozen_string_literal: true module V0 class ApidocsController < ApplicationController include Swagger::Blocks service_tag 'platform-base' skip_before_action :authenticate swagger_root do key :swagger, '2.0' info do key :version, '1.0.0' key :title, 'va.gov API' ...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/health_care_applications_controller.rb
# frozen_string_literal: true require 'hca/service' require 'bgs/service' require 'pdf_fill/filler' require 'lighthouse/facilities/v1/client' module V0 class HealthCareApplicationsController < ApplicationController include IgnoreNotFound include RetriableConcern include PdfFilenameGenerator service...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/disability_compensation_in_progress_forms_controller.rb
# frozen_string_literal: true module V0 class DisabilityCompensationInProgressFormsController < InProgressFormsController service_tag 'disability-application' def show if form_for_user # get IPF data = data_and_metadata_with_updated_rated_disabilities log_started_form_version(d...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/form1010_ezrs_controller.rb
# frozen_string_literal: true require 'form1010_ezr/service' require 'pdf_fill/filler' module V0 class Form1010EzrsController < ApplicationController include RetriableConcern include PdfFilenameGenerator service_tag 'health-information-update' before_action :record_submission_attempt, only: :creat...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/debts_controller.rb
# frozen_string_literal: true require 'debt_management_center/debts_service' module V0 class DebtsController < ApplicationController service_tag 'debt-resolution' before_action { authorize :debt, :access? } rescue_from ::DebtManagementCenter::DebtsService::DebtNotFound, with: :render_not_found def...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/open_api_controller.rb
# frozen_string_literal: true module V0 class OpenApiController < ApplicationController service_tag 'platform-base' skip_before_action :authenticate def index spec = openapi_spec if spec # Clone the spec so we can modify servers without affecting the cached version response_...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/test_account_user_emails_controller.rb
# frozen_string_literal: true module V0 class TestAccountUserEmailsController < ApplicationController service_tag 'identity' skip_before_action :authenticate NAMESPACE = 'test_account_user_email' TTL = 2_592_000 def create email_redis_key = Digest::SHA256.hexdigest(create_params) Ra...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/dependents_verifications_controller.rb
# frozen_string_literal: true module V0 class DependentsVerificationsController < ApplicationController service_tag 'dependency-verification' def index dependents = dependency_verification_service.read_diaries render json: DependentsVerificationsSerializer.new(dependents) end def creat...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/benefits_reference_data_controller.rb
# frozen_string_literal: true require 'lighthouse/benefits_reference_data/service' module V0 class BenefitsReferenceDataController < ApplicationController service_tag 'disability-application' def get_data render json: benefits_reference_data_service .get_data(path: params[:path], params: reque...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/users_controller.rb
# frozen_string_literal: true require 'logging/third_party_transaction' module V0 class UsersController < ApplicationController service_tag 'identity' def show pre_serialized_profile = Users::Profile.new(current_user, @session_object).pre_serialize options = { meta: { errors: pre_serialized_p...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/benefits_claims_controller.rb
# frozen_string_literal: true require 'benefits_claims/title_generator' require 'lighthouse/benefits_claims/service' require 'lighthouse/benefits_claims/constants' require 'lighthouse/benefits_documents/constants' require 'lighthouse/benefits_claims/utilities/helpers' require 'lighthouse/benefits_documents/documents_s...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/form1010_ezr_attachments_controller.rb
# frozen_string_literal: true require 'form1010_ezr/service' require 'benchmark' module V0 class Form1010EzrAttachmentsController < ApplicationController include FormAttachmentCreate service_tag 'health-information-update' FORM_ATTACHMENT_MODEL = Form1010EzrAttachment def create validate_fil...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/enrollment_periods_controller.rb
# frozen_string_literal: true require 'veteran_enrollment_system/enrollment_periods/service' module V0 class EnrollmentPeriodsController < ApplicationController service_tag 'enrollment-periods' before_action { authorize :enrollment_periods, :access? } def index service = VeteranEnrollmentSystem::...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/search_controller.rb
# frozen_string_literal: true require 'search/service' require 'search_gsa/service' module V0 class SearchController < ApplicationController include ActionView::Helpers::SanitizeHelper service_tag 'search' skip_before_action :authenticate # Returns a page of search results from the Search.gov API,...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/banners_controller.rb
# frozen_string_literal: true module V0 class BannersController < ApplicationController service_tag 'banners' skip_before_action :authenticate def by_path # Default to 'full_width_banner_alert' banner (bundle) type. banner_type = params.fetch(:type, 'full_width_banner_alert') return re...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/form214192_controller.rb
# frozen_string_literal: true module V0 class Form214192Controller < ApplicationController include RetriableConcern service_tag 'employment-information' skip_before_action :authenticate, only: %i[create download_pdf] before_action :load_user, :check_feature_enabled def create # Body parse...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/letters_generator_controller.rb
# frozen_string_literal: true require 'lighthouse/letters_generator/service' require 'lighthouse/letters_generator/service_error' module V0 class LettersGeneratorController < ApplicationController service_tag 'letters' before_action { authorize :lighthouse, :access? } before_action :validate_letter_type...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/evss_benefits_claims_controller.rb
# frozen_string_literal: true module V0 class EVSSBenefitsClaimsController < ApplicationController include IgnoreNotFound service_tag 'claim-status' before_action { authorize :evss, :access? } def index claims = get_claims render json: claims end def show claim = get_cla...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/rated_disabilities_controller.rb
# frozen_string_literal: true require 'lighthouse/veteran_verification/service' module V0 class RatedDisabilitiesController < ApplicationController service_tag 'disability-rating' before_action { authorize :lighthouse, :access? } def show response = service.get_rated_disabilities(@current_user.ic...
0
code_files/vets-api-private/app/controllers
code_files/vets-api-private/app/controllers/v0/admin_controller.rb
# frozen_string_literal: true require 'admin/postgres_check' require 'admin/redis_health_checker' module V0 class AdminController < ApplicationController service_tag 'platform-base' skip_before_action :authenticate, only: :status def status app_status = { git_revision: AppInfo::GIT_REVISI...