-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exceptions getting started #291
Comments
Hmm. I think maybe that init is expected to have an argument always, though that is certainly not a very helpful error message. I'm less certain about the encoding issue, do you have non-ascii in that schema? Could you share the schema that is causing the issue so I can work on debugging against it? Thanks! |
@geemus Yah I guessed there should be some validation on the Here's a breaking JSON schema: I used https://gist.github.com/mafrosis/edb462ad16d05ce695c7c8018a2d1971 |
It may be a ruby version thing. I'm seeing an error as well, but not the same one. I think one key thing to note is that the schema you doc is expected to have gone through combine (which makes a sort of uber-schema). If you haven't combined the individual schema, doc gets confused because things are not in the places it would expect. So, I think for you it will work better if you for instance do something like: prmd combine /schema/approve_schema.json | prmd doc (you can also pipe the output to a file and then doc that instead of piping). That gives me:
You can clear up the meta part by init-ing a meta file (which has top level info like the host for the API and name). Hope that clears some things up, the error you were getting was definitely not helpful whatsoever (as unfortunately many erubis/template errors tend to be). I also got an error there, but it was at least nominally clearer (it was a no split method on nil error, guessing your error also results from a nil where a character string is expected). Anyway, I'm not sure about how to make that error better in particular, but hopefully this can help you workaround it. |
Calling
prmd init
without an argument causes an exception:Then trying to generate docs from a schema, it seems that character encoding is not being handled correctly:
The text was updated successfully, but these errors were encountered: