Add exception to some Rubocop offenses
This commit is contained in:
		
							parent
							
								
									27c7feebee
								
							
						
					
					
						commit
						c15d0806a8
					
				@ -1,3 +1,5 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
# Copyright (C) 2024 Manuel Bustillo
 | 
			
		||||
 | 
			
		||||
module Swagger
 | 
			
		||||
@ -7,13 +9,13 @@ module Swagger
 | 
			
		||||
      email: { type: :string, format: :email },
 | 
			
		||||
      created_at: SwaggerResponseHelper::TIMESTAMP,
 | 
			
		||||
      updated_at: SwaggerResponseHelper::TIMESTAMP
 | 
			
		||||
    }
 | 
			
		||||
    }.freeze
 | 
			
		||||
 | 
			
		||||
    ID = {
 | 
			
		||||
    ID = { # rubocop:disable Style/MutableConstant -- rswag modifies in: :path parameters
 | 
			
		||||
      name: 'id',
 | 
			
		||||
      in: :path,
 | 
			
		||||
      type: :string,
 | 
			
		||||
      format: :uuid,
 | 
			
		||||
      format: :uuid
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    GROUP = {
 | 
			
		||||
@ -21,18 +23,18 @@ module Swagger
 | 
			
		||||
      icon: { type: :string, example: 'pi pi-crown', description: 'The CSS classes used by the icon' },
 | 
			
		||||
      parent_id: { type: :string, format: :uuid },
 | 
			
		||||
      color: { type: :string, pattern: '^#(?:[0-9a-fA-F]{3}){1,2}$' }
 | 
			
		||||
    }
 | 
			
		||||
    }.freeze
 | 
			
		||||
 | 
			
		||||
    EXPENSE = {
 | 
			
		||||
      name: { type: :string },
 | 
			
		||||
      amount: { type: :number, minimum: 0 },
 | 
			
		||||
      pricing_type: { type: :string, enum: Expense.pricing_types.keys }
 | 
			
		||||
    }
 | 
			
		||||
    }.freeze
 | 
			
		||||
 | 
			
		||||
    SLUG = {
 | 
			
		||||
    SLUG = { # rubocop:disable Style/MutableConstant -- rswag modifies in: :path parameters
 | 
			
		||||
      name: 'slug',
 | 
			
		||||
      in: :path,
 | 
			
		||||
      type: :string, 
 | 
			
		||||
      type: :string,
 | 
			
		||||
      pattern: Wedding::SLUG_REGEX,
 | 
			
		||||
      example: :default,
 | 
			
		||||
      description: 'Wedding slug'
 | 
			
		||||
@ -47,6 +49,6 @@ module Swagger
 | 
			
		||||
          answer: { type: :string }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    } 
 | 
			
		||||
    }.freeze
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user