Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
schedules
Commits
cb6416d6
Commit
cb6416d6
authored
Sep 04, 2018
by
Zac Wood
Browse files
Linting fixes
parent
ff7fe3f4
Pipeline
#2837
passed with stage
in 2 minutes and 57 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
schedules_api/app/controllers/course_sections_controller.rb
View file @
cb6416d6
...
...
@@ -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"
...
...
schedules_api/app/controllers/courses_controller.rb
View file @
cb6416d6
# 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"'
...
...
schedules_api/config/initializers/apipie.rb
View file @
cb6416d6
...
...
@@ -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
schedules_api/config/initializers/apipie_validators.rb
View file @
cb6416d6
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment