Skip to content

Update AssignmentCalendar and Rubric docs for cleaner OpenAPI doc generation#2593

Open
battis wants to merge 3 commits intoinstructure:masterfrom
battis:fix/openapi-docs
Open

Update AssignmentCalendar and Rubric docs for cleaner OpenAPI doc generation#2593
battis wants to merge 3 commits intoinstructure:masterfrom
battis:fix/openapi-docs

Conversation

@battis
Copy link

@battis battis commented Feb 28, 2026

I have an extensive list of places where the Canvas LMS API documentation includes text or values that that don't parse into clean OpenAPI specifications. Not a huge deal, but if the OpenAPI spec were cleaner, it would be easier to automate building a more complete, capable client. So this is my first test pass at tweaking the documentation.

I have tweaked three specific things:

  1. List available account calendars says that it returns an array of AccountCalendars. It does not -- it returns an object containing that list and a total. I created a new model AccountCalendarList to describe this result and updated the documentation.
  2. Creates a rubric using a CSV file in the JSON spec file incorrectly stated the model name. It is now correct.
  3. The Outcomes model references a RubricRating, but does not define it, again creating problems parsing the JSON spec file. RubricRating had already been duplicated once into the Assignments API, so I duplicated it again.

Test Plan:

Generate parseable OpenAPI docs using new AccountCalendar model, rather
than an arbitrary string
True, the result is generated by RubricImport, but the OpenAPI Model is
named Rubric. Update should result in more parseable OpenAPI docs.
It is referenced in the Outcome model, but does not exist locally,
which breaks documentation links and hinders parsing. It is already
duplicated from RubricsApiController in AssignmentsApiController, and
this improves consistency.

(In an ideal world, we would be able to non-local models so RubricRating
would only be defined once in RubricsApiController.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants