fix the api docs generation
Every time that we run `rake canvas:compile_assets` task, the file data_service_canvas_logged.md changes, where the brake line is removed from the body attribute. This behavior does not occurs while using the `rake doc:api` task. After some investigation, we notice that to solve this issue we need to: * load the json initializer (config/initializers/json) at the `doc:api` task; * format the JSON file properly; * fix the data_service_canvas_logged.md file to the correct version; closes INTEROP-6346 flag=none test plan: * checkout this patch; * run rake canvas:compile_assets and check that the file data_service_canvas_logged.md doesn't change anymore; * run rake doc:api and check that the file data_service_canvas_logged.md doesn't change anymore; Change-Id: I8cb1e3cb5d9527205827fa25b74e6da3319f65ab Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253036 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Robin Kuss <rkuss@instructure.com> Reviewed-by: Xander Moffatt <xmoffatt@instructure.com> QA-Review: Robin Kuss <rkuss@instructure.com> Product-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
This commit is contained in:
parent
3a785a5280
commit
4d661df4f4
|
@ -2,8 +2,7 @@
|
|||
"name": "logged_out",
|
||||
"definition": "The event is emitted anytime an end user logs out of Canvas",
|
||||
"trigger": "Triggered when a user has logged out.",
|
||||
"schema": {
|
||||
},
|
||||
"schema": {},
|
||||
"examples": [
|
||||
{
|
||||
"payload": {
|
||||
|
@ -28,9 +27,8 @@
|
|||
"user_login": "oxana@example.com",
|
||||
"user_sis_id": "456-T45"
|
||||
},
|
||||
"body": {
|
||||
}
|
||||
"body": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,8 +85,7 @@ Logged
|
|||
"user_login": "oxana@example.com",
|
||||
"user_sis_id": "456-T45"
|
||||
},
|
||||
"body": {
|
||||
}
|
||||
"body": {}
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
begin
|
||||
require 'yard'
|
||||
require 'yard-appendix'
|
||||
require 'config/initializers/json'
|
||||
|
||||
namespace :doc do
|
||||
DOC_DIR = File.join(%w[public doc api])
|
||||
|
|
Loading…
Reference in New Issue