Closed dallas closed 10 years ago
Hey dallas, yes this is still being "maintained" however, I would say the word is "developed"--as in, we know parts of it aren't working and as we discover which parts, we fix them (i.e. alpha software). Also, I just realized we haven't been pushing our changes to github! Sorry about that. I'll push our latest from our CI repo.
We recently ran in to the same missing Account issue you found as well. The problem is that the YARD code generating the swagger JSON files is tripped up by classes that are re-opened in Ruby. Specifically, the AccountsController class is first defined in app/controllers/accounts_controller.rb and then re-opened in one of the Instructure-specific plugins we use. We're trying to find a solution for that issue since if we correct it downstream (i.e. by modifying JSON files) then the problem will crop up again each time we run "rake doc:api" to regenerate the JSON files.
Thanks for the quick reply, @canadaduane! It's good to know that it is still being looked after. It'll be good to get all your latest and greatest pulled down to see if that fixes some of the issues we're running into. Thanks! :smiley:
In regards to the Account issue, that sounds like an interesting, albeit complicated, problem. Is there any way to temporarily include a manual generation of the Account model in the meantime? Or would it be best for us at this time to simply maintain our own fork of the Pandarus project so that we can manually fix any issues we find directly in the generated API wrapping code?
In just browsing the Canvas repository on GitHub, I see how to fix the issue with create_new_sub_account
trying to return an array of Account objects rather than a single Account object: it says # @returns [Account]
(should be # @returns Account
instead) right at the end of @API
comment. I could submit a patch for that, I suppose, but it's such a simple fix you guys could probably take care of it quicker :wink:
At any rate, it would be great to know how we should proceed. We're planning on having Phase 1 of our application's development done sometime around the New Year and that includes some fairly heavy dependency on the API being stable enough for our purposes. Thanks again for the quick and thorough reply!
BTW, the Pandarus gem is more up to date than this repo. Hopefully I'll be able to fix that soon. But just wanted to get that out there.
We've found a work-around for this issue, and will update soon. Thanks for catching the create_new_sub_account issue, too.
BTW, this is coming along. We've had to make a few patches, but it will be here soon.
Cool! Thanks for the update, @canadaduane!
Updated in master.
Sweet, sweet nectar!
Hey guys,
We're currently working on integrating our own install of Canvas with our own Rails application and I'm running into quite a few issues while using the Pandarus gem. Firstly, there is no Account model in Pandarus, but there are several places in the V1_api.rb file that try to instantiate one. Should there be an Account model provided or should our app be responsible for providing that? Also, in the
create_new_sub_account
method it ends by returningresponse.map {|response|Account.new(response)}
but the response there is for only one account, presumably the newly created sub-account.If the project is still active and maintained, I'd like to know how to best go about fixing those issues. Should the API that swagger is reading from be updated (and the whole code generation rerun) or should they just be fixed in those files directly?
Thanks!