Commit cb6416d6 authored by Zac Wood's avatar Zac Wood

Linting fixes

parent ff7fe3f4
Pipeline #2837 passed with stage
in 2 minutes and 57 seconds
......@@ -2,9 +2,9 @@
# This is a nested controller -- see +config/routes.rb+ for details
class CourseSectionsController < ApplicationController
resource_description do
short 'Working with course sections, e.g. CS 112 001'
short 'Working with course sections, e.g. CS 112 001'
end
api :GET, '/courses_sections', 'Get a list of course sections'
param :course_id, Integer, desc: "Only get the course sections belonging to the course with this ID"
param :crn, String, desc: "Get the course section with this CRN"
......
# Contains all actions having to do with Courses.
class CoursesController < ApplicationController
resource_description do
short 'Working with courses, e.g. CS 112'
short 'Working with courses, e.g. CS 112'
end
api :GET, '/courses', "Get a list of courses."
param :subject, String, desc: 'Course subject, e.g. "CS" or "ACCT"'
param :course_number, Integer, desc: 'Course number, e.g. "112"'
......
......@@ -12,6 +12,6 @@ Apipie.configure do |config|
# Fixes annoying "can't find resource" bug, see https://github.com/Apipie/apipie-rails/issues/549
config.translate = false
config.default_locale = nil
config.app_info["1.0"] = "The SRCT Schedules API provides data about courses, sections, and professors offered at GMU."
end
......@@ -9,10 +9,8 @@ class IntegerValidator < Apipie::Validator::BaseValidator
!!(value.to_s =~ /^[-+]?[0-9]+$/)
end
def self.build(param_description, argument, options, block)
if argument == Integer
self.new(param_description, argument)
end
def self.build(param_description, argument, _options, _block)
new(param_description, argument) if argument == Integer
end
def description
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment