fixes CNVS-11056
test plan
- fetch outcome results using the api as usual
- ensure that alignments are not included in the response
- fetch outcome results with "outcomes" include[]'d
- ensure that the included outcomes have a list of alignment id's
- fetch the outcome results with "outcomes" and
"outcomes.alignments" include[]'d
- ensure that the alignments referenced in the included outcomes
are also included
- ensure that the included alignment names and html_urls are valid
Change-Id: I0abf38e0f2125899df606bdbc16ac66b495cb726
Reviewed-on: https://gerrit.instructure.com/30353
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
refs CNVS-6040
This gem will help us output json error responses in the API using error
codes, since by itself ActiveRecord::Errors just deals in human-readable
i18n'd strings, and doesn't store detailed machine-readable information
on the error.
BetterErrors is mostly compatible, there's a few differences that mean I
had to change some unrelated code:
* errors[field_name] always returns an array, even if there's only one
error on the field. This is an improvement IMO.
* errors is indexed by symbol, not by string
* iterating over the errors object now yields
|attr, error_object| rather than |attr, string_message|
This includes a backport of the gem to rails 2.3.
On rails 3, we just use the vanilla gem.
The error codes aren't yet documented in the API docs, support for doing
that will come in a subsequent commit.
test plan: specs, plus you can hit the one api endpoint i've converted
so far -- account authorization configs. try to create an invalid
config, such as adding both cas and ldap configs to the same account,
and verify the error response formatting
Change-Id: Iaadd843ca9ff3f52c64e0256d82b64595c5559fb
Reviewed-on: https://gerrit.instructure.com/26178
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
refs CNVS-10408
test plan
- import enrollments through SIS
- create enrollments manually
- GET /api/v1/courses/:course_id/enrollments
should have sis_import_id if you have
permissions to see it
- check that sis_import_id is in api docs
Change-Id: I2b8e91013858ddef76d07257e9dc38d46466af91
Reviewed-on: https://gerrit.instructure.com/29941
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs CNVS-10408
test plan
- import group memberships through SIS
- create group memberships manually
- GET /api/v1/groups/:group_id/memberships
should have sis_import_id if you have
permissions to see it
- check that sis_import_id is in api docs
Change-Id: I43e3a8e806cf626c99863b467c792c0bb5c529c3
Reviewed-on: https://gerrit.instructure.com/29942
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs CNVS-10408
test plan
- import groups through SIS
- create groups manually
- GET /api/v1/accounts/:account_id/groups
should have sis_import_id if you have
permissions to see it
- check that sis_import_id is in api docs
Change-Id: Ibbd63c076835440b760952343d150ce986a386fd
Reviewed-on: https://gerrit.instructure.com/29943
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs CNVS-10408
test plan
- import sections through SIS
- create sections manually
- GET /api/v1/accounts/:account_id/sections
should have sis_import_id if you have
permissions to see it
- check that sis_import_id is in api docs
Change-Id: I0004bc35064708c6189bcb658e8f6bad7308845e
Reviewed-on: https://gerrit.instructure.com/29944
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs CNVS-10408
test plan
- import users through SIS
- create users manually
- GET /api/v1/accounts/:account_id/users
should have sis_import_id if you have
permissions to see it
- check that sis_import_id is in api docs
Change-Id: Id2f096548651183688d92a6f7e40c1eb2aa30b2b
Reviewed-on: https://gerrit.instructure.com/29945
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
also updates API to send/receive this flag
fixes CNVS-9762
fixes CNVS-9764
test plan:
- turn on differentiated assignments flag in account & course
- request an assignment via api
- it should include this flag
- update this flag on an assignment via api
- it should work
Change-Id: Ibc01a7bc3effef8605c622f3e644ddc4e10effa3
Reviewed-on: https://gerrit.instructure.com/29526
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
in rails 3, .new is analogous to .build for collections, so otherwise
temporary records will be added to the collection (and be autosaved)
Change-Id: I08ce7b4b35ee35646aff3afd237bbe896162a014
Reviewed-on: https://gerrit.instructure.com/30334
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs CNVS-10408
test plan
- import accounts through SIS
- create accounts manually
- /api/v1/accounts/self/sub_accounts should have
sis_import_id if you have permissions to see it
- check that sis_import_id is in api docs
Change-Id: Ib65b3b9c5a943fa0cc134ed8346c732105d08280
Reviewed-on: https://gerrit.instructure.com/29939
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
refs CNVS-10408
test plan
- GET /api/v1/accounts/self
- workflow_state should be included
Change-Id: I5731666c842fea6cdb68a3aa9d5e80eac16d17be
Reviewed-on: https://gerrit.instructure.com/29914
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
test plan:
- with draft state enabled
* create two pages (A & B)
* set page A as the front page
* update page B (using the api)
- update fields (e.g. title, body, etc)
- include wiki_page[front_page]=false
* navigate to ../pages
- page A should still be set as the front page
closes CNVS-11266
closes gh-405
Change-Id: Ifc22c715a36dc069430f6999c41128ea35b32c83
Reviewed-on: https://gerrit.instructure.com/30232
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
most importantly #show, but also for finding accounts and terms
when creating/updating a course via the API
Change-Id: I185219db62ead4dc1d04b5b7e91b945a0d39ecc7
fixes CNVS-10916
test plan:
- in a course with draft state enabled,
- create unpublished assignments, quizzes, and graded
discussions with due dates and points possible
- ensure this information shows up in the modules page
Change-Id: I2674688fd0e66763094aa66192054b7f29d33663
Reviewed-on: https://gerrit.instructure.com/29803
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
Product-Review: Mark Severson <markse@instructure.com>
This commit namespaces the rest of quiz related code into a Quizzes
namespace: controllers, views, models, and classes that previously lived
under lib/ that are Quiz-related.
Test plan:
Full regression test on all quiz related items
refs CNVS-10457
Change-Id: If54b61213945056539e03271a936d233abb66188
Reviewed-on: https://gerrit.instructure.com/29351
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
fixes CNVS-11205
I don't know how we're still getting empty conversations
in people's inboxes, but we can't let it break everything.
See https://gerrit.instructure.com/#/c/27121/
and https://gerrit.instructure.com/#/c/26059/ .
test plan:
* In your Rails console, run something like this:
user = User.where(name: 'banderson@instructure.com').first
deleted = user.all_conversations.where(message_count: 0).limit(1)
deleted.update_all(last_message_at: Time.now)
* Open your user's inbox in old conversations.
* Click on each of the conversations in the inbox and verify that the
corresponding messages load in the right pane.
Change-Id: Ia605ac0b2392ca4b1983bca291d4685a5a818f7a
Reviewed-on: https://gerrit.instructure.com/30159
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
Test plan:
- As a teacher, you should be able to see "speed_grader_url" that
goes to the correct url when you query the quizzes index api and the
quiz show api.
- As a student, you should not see the "speed_grader_url" key when
you query the quizzes index api and the quiz show api.
Change-Id: I9a827846fcf201d031715567e8af1f6ffda4a343
Reviewed-on: https://gerrit.instructure.com/30127
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
fixes CNVS-10049
test-plan:
* clear codecogs.equation_image_link setting
* visit /equation_images/%5Csqrt%5B2%5D%7B900%7D%3Dx
* should be redirected to http://latex.codecogs.com/gif.latex?%5Csqrt%5B2%5D%7B900%7D%3Dx
* set codecogs.equation_image_link setting to "http://example.com/"
* visit /equation_images/%5Csqrt%5B2%5D%7B900%7D%3Dx
* should be redirected to http://example.com/?%5Csqrt%5B2%5D%7B900%7D%3Dx
Change-Id: Ic683111ec4109bacdd5c06c633c70129ab688fcc
Reviewed-on: https://gerrit.instructure.com/30212
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
fixes SIS-160
Test Plan
---------
- Create an enrollment via the api with start_at and end_at parameters
- verify start_at and end_at are poplutated for resulting record in enrollments table
- verify user can only access course during start_at and end_at times
Change-Id: Icfeaded1f43c6b0309d41280d7caa17482b9182e
Reviewed-on: https://gerrit.instructure.com/30136
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ken Romney <kromney@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
fixes CNVS-10549
test plan
- create a discussion topic
- reply to the topic with a user on another shard
- view the discussion as the original topic creator
- ensure that the reply shows the correct author
Change-Id: I5115f6fd3a21f6c8b986e7a9e0c95b5fe4be1587
Reviewed-on: https://gerrit.instructure.com/30080
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
the index and show actions are unused. the index view was
removed awhile ago in 91ce600f.
Change-Id: Ib84fc2e9e524aec3143a4395d15f9c1320798648
Reviewed-on: https://gerrit.instructure.com/29983
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
fixes: CNVS-10982
Test Plan:
Create and then Perminantly Delete a course
Open admin tools and that course should show in the autocomplete for course
activity logs.
Change-Id: I0df432638fd60fe30c6908023551bda4208c9218
Reviewed-on: https://gerrit.instructure.com/29975
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
Contributed by github.com/mcgachey
app/controllers/collaborations_controller.rb
app/controllers/comm_messages_api_controller.rb
app/controllers/communication_channels_controller.rb
app/controllers/conferences_controller.rb
app/controllers/content_exports_api_controller.rb
Fixes SIS-146
Currently, some API objects are documented using the @object tag, and
others are documented using @model. The @model tag is preferred because
it provides more information in the machine-readable Swagger documents
generated by the API documentation build step. For example, the @object
notation does not give a way to specify that a model property contains
an instance of another type. This complete information is necessary in
order to build an SDK generator.
This change converts the @object notations into @model, adding missing
type information and correcting inaccurate data (for example, dates were
typed as "string" in the existing JSON documentation). Embedded types are
also separated out so that their format can also be documented - this
information was previously lost.
The change also makes two minor fixes to the HTML and JSON documentation
generators. The HTML generator is fixed so that a missing documentation
string is ignored rather than being shown as an empty comment, and the
JSON generator is modified so that the Model-level documentation and
required attributes are properly provided.
Note that the JSON generated here is not fully-complient to the Swagger
format. Swagger does not support a Map structure, but the Canvas API
uses (semi-)arbitrary key/value dictionaries in a few places. In those
instances the properties are typed as "map", but this is not a part of the
Swagger spec. Any cleaner alternative approaches here would be welcome.
Change-Id: I92dd48d52cdda123ceb5cfaf9ac98e746b1c9131
Reviewed-on: https://gerrit.instructure.com/30007
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes: CNVS-5004
When generating yard docs we get an @undocumented tag does not
exist error. This fix changes them from @undocumented to
@note which is a valid tag.
Change-Id: I976f96d8d1230eaecc55898884fb3947d664a2d3
Reviewed-on: https://gerrit.instructure.com/29990
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
find the existing policy if there is one, and reset missing ones instead
of destroying them
Change-Id: Iec50b29c5977ac727af1225f6c80260a5ef09d3d
Reviewed-on: https://gerrit.instructure.com/29998
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-11055
No browsers currently include Accept: application/json on requests for
<script> resources. It would be unreasonable for them to do so,
as even JSON-P uses application/javascript. Therefore, I believe
that application/json will remain a credible signal that a request
is not JSON-hijacking CSRF.
https://developer.mozilla.org/en-US/docs/HTTP/Content_negotiation#Values_for.C2.A0_scripts
test plan:
* make an API request with and without the header
Accept: application/json
* verify that while(1) is prepended to the response
iff the header is not present
* smoke test Canvas pages which use Ajax
Change-Id: Iae830a4870175cae2b627227c85a5f1cc7801f69
Reviewed-on: https://gerrit.instructure.com/29882
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
test plan:
- use the API to copy a course referred by sis_source_id
fixes CNVS-10959
Change-Id: I2297e86969dbc630f75a6ce856a3603b919fd62b
Reviewed-on: https://gerrit.instructure.com/29795
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Contributed by github.com/mcgachey
app/controllers/courses_controller.rb
app/controllers/custom_gradebook_column_data_api_controller.rb
app/controllers/custom_gradebook_columns_api_controller.rb
app/controllers/discussion_topics_controller.rb
app/controllers/enrollments_api_controller.rb
app/controllers/external_feeds_controller.rb
Fixes SIS-146
Currently, some API objects are documented using the @object tag, and
others are documented using @model. The @model tag is preferred because
it provides more information in the machine-readable Swagger documents
generated by the API documentation build step. For example, the @object
notation does not give a way to specify that a model property contains
an instance of another type. This complete information is necessary in
order to build an SDK generator.
This change converts the @object notations into @model, adding missing
type information and correcting inaccurate data (for example, dates were
typed as "string" in the existing JSON documentation). Embedded types are
also separated out so that their format can also be documented - this
information was previously lost.
The change also makes two minor fixes to the HTML and JSON documentation
generators. The HTML generator is fixed so that a missing documentation
string is ignored rather than being shown as an empty comment, and the
JSON generator is modified so that the Model-level documentation and
required attributes are properly provided.
Note that the JSON generated here is not fully-complient to the Swagger
format. Swagger does not support a Map structure, but the Canvas API
uses (semi-)arbitrary key/value dictionaries in a few places. In those
instances the properties are typed as "map", but this is not a part of the
Swagger spec. Any cleaner alternative approaches here would be welcome.
Change-Id: I517fe9e0ae7132ffecbf606dec32f08879db43e9
Reviewed-on: https://gerrit.instructure.com/30006
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Contributed by github.com/mcgachey
app/controllers/content_migrations_controller.rb
app/controllers/context_module_items_api_controller.rb
app/controllers/context_modules_api_controller.rb
app/controllers/conversations_controller.rb
app/controllers/course_audit_api_controller.rb
Fixes SIS-146
Currently, some API objects are documented using the @object tag, and
others are documented using @model. The @model tag is preferred because
it provides more information in the machine-readable Swagger documents
generated by the API documentation build step. For example, the @object
notation does not give a way to specify that a model property contains
an instance of another type. This complete information is necessary in
order to build an SDK generator.
This change converts the @object notations into @model, adding missing
type information and correcting inaccurate data (for example, dates were
typed as "string" in the existing JSON documentation). Embedded types are
also separated out so that their format can also be documented - this
information was previously lost.
The change also makes two minor fixes to the HTML and JSON documentation
generators. The HTML generator is fixed so that a missing documentation
string is ignored rather than being shown as an empty comment, and the
JSON generator is modified so that the Model-level documentation and
required attributes are properly provided.
Note that the JSON generated here is not fully-complient to the Swagger
format. Swagger does not support a Map structure, but the Canvas API
uses (semi-)arbitrary key/value dictionaries in a few places. In those
instances the properties are typed as "map", but this is not a part of the
Swagger spec. Any cleaner alternative approaches here would be welcome.
Change-Id: I4b5dc36833cc6899c1b390fa7cf665b5942fe886
Reviewed-on: https://gerrit.instructure.com/29999
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Contributed by github.com/mcgachey
app/controllers/assignment_groups_controller.rb
app/controllers/assignment_overrides_controller.rb
app/controllers/assignments_api_controller.rb
app/controllers/authentication_audit_api_controller.rb
app/controllers/calendar_events_api_controller.rb
Fixes SIS-146
Currently, some API objects are documented using the @object tag, and
others are documented using @model. The @model tag is preferred because
it provides more information in the machine-readable Swagger documents
generated by the API documentation build step. For example, the @object
notation does not give a way to specify that a model property contains
an instance of another type. This complete information is necessary in
order to build an SDK generator.
This change converts the @object notations into @model, adding missing
type information and correcting inaccurate data (for example, dates were
typed as "string" in the existing JSON documentation). Embedded types are
also separated out so that their format can also be documented - this
information was previously lost.
The change also makes two minor fixes to the HTML and JSON documentation
generators. The HTML generator is fixed so that a missing documentation
string is ignored rather than being shown as an empty comment, and the
JSON generator is modified so that the Model-level documentation and
required attributes are properly provided.
Note that the JSON generated here is not fully-complient to the Swagger
format. Swagger does not support a Map structure, but the Canvas API
uses (semi-)arbitrary key/value dictionaries in a few places. In those
instances the properties are typed as "map", but this is not a part of the
Swagger spec. Any cleaner alternative approaches here would be welcome.
Change-Id: I450539cb5311778038c6179dd46ec06aa6c71791
Reviewed-on: https://gerrit.instructure.com/29995
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Contributed by github.com/mcgachey
app/controllers/account_authorization_configs_controller.rb
app/controllers/account_reports_controller.rb
app/controllers/accounts_controller.rb
app/controllers/admins_controller.rb
app/controllers/appointment_groups_controller.rb
Fixes SIS-146
Currently, some API objects are documented using the @object tag, and
others are documented using @model. The @model tag is preferred because
it provides more information in the machine-readable Swagger documents
generated by the API documentation build step. For example, the @object
notation does not give a way to specify that a model property contains
an instance of another type. This complete information is necessary in
order to build an SDK generator.
This change converts the @object notations into @model, adding missing
type information and correcting inaccurate data (for example, dates were
typed as "string" in the existing JSON documentation). Embedded types are
also separated out so that their format can also be documented - this
information was previously lost.
The change also makes two minor fixes to the HTML and JSON documentation
generators. The HTML generator is fixed so that a missing documentation
string is ignored rather than being shown as an empty comment, and the
JSON generator is modified so that the Model-level documentation and
required attributes are properly provided.
Note that the JSON generated here is not fully-complient to the Swagger
format. Swagger does not support a Map structure, but the Canvas API
uses (semi-)arbitrary key/value dictionaries in a few places. In those
instances the properties are typed as "map", but this is not a part of the
Swagger spec. Any cleaner alternative approaches here would be welcome.
Change-Id: I0fc0ffaf06b072ebc9ff1e8644c655712c5c7469
Reviewed-on: https://gerrit.instructure.com/29994
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
converting for:
role overrides controller
sections controller
sis imports api controller
submissions api controller
submissions controller
Contributed by github.com/mcgachey
Fixes SIS-146
Currently, some API objects are documented using the @object tag, and
others are documented using @model. The @model tag is preferred because
it provides more information in the machine-readable Swagger documents
generated by the API documentation build step. For example, the @object
notation does not give a way to specify that a model property contains
an instance of another type. This complete information is necessary in
order to build an SDK generator.
This change converts the @object notations into @model, adding missing
type information and correcting inaccurate data (for example, dates were
typed as "string" in the existing JSON documentation). Embedded types are
also separated out so that their format can also be documented - this
information was previously lost.
The change also makes two minor fixes to the HTML and JSON documentation
generators. The HTML generator is fixed so that a missing documentation
string is ignored rather than being shown as an empty comment, and the
JSON generator is modified so that the Model-level documentation and
required attributes are properly provided.
Note that the JSON generated here is not fully-complient to the Swagger
format. Swagger does not support a Map structure, but the Canvas API
uses (semi-)arbitrary key/value dictionaries in a few places. In those
instances the properties are typed as "map", but this is not a part of the
Swagger spec. Any cleaner alternative approaches here would be welcome.
Change-Id: I6c878eaeab2f41a15a5a323abe35ae6c7d9287dc
Reviewed-on: https://gerrit.instructure.com/30004
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
converting for:
profile controller
progress controller
quiz questions controller
quiz reports controller
quizzes api controller
Contributed by github.com/mcgachey
Fixes SIS-146
Currently, some API objects are documented using the @object tag, and
others are documented using @model. The @model tag is preferred because
it provides more information in the machine-readable Swagger documents
generated by the API documentation build step. For example, the @object
notation does not give a way to specify that a model property contains
an instance of another type. This complete information is necessary in
order to build an SDK generator.
This change converts the @object notations into @model, adding missing
type information and correcting inaccurate data (for example, dates were
typed as "string" in the existing JSON documentation). Embedded types are
also separated out so that their format can also be documented - this
information was previously lost.
The change also makes two minor fixes to the HTML and JSON documentation
generators. The HTML generator is fixed so that a missing documentation
string is ignored rather than being shown as an empty comment, and the
JSON generator is modified so that the Model-level documentation and
required attributes are properly provided.
Note that the JSON generated here is not fully-complient to the Swagger
format. Swagger does not support a Map structure, but the Canvas API
uses (semi-)arbitrary key/value dictionaries in a few places. In those
instances the properties are typed as "map", but this is not a part of the
Swagger spec. Any cleaner alternative approaches here would be welcome.
Change-Id: I0604516bb3d6cad94e99c98309db3ff6d0b2c19c
Reviewed-on: https://gerrit.instructure.com/30003
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>