Skip to content
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

Is this the definitive Xero model generator? #1

Open
gtod opened this issue Feb 26, 2017 · 5 comments
Open

Is this the definitive Xero model generator? #1

gtod opened this issue Feb 26, 2017 · 5 comments

Comments

@gtod
Copy link

gtod commented Feb 26, 2017

Hi Michael, thanks so much for your work on this. I was just looking at https://github.com/XeroAPI/Xero-Java and wondering if it was as good at it gets on the JVM and now I'm wondering about generating my own (Kotlin) bindings using the swagger output from this library.

I note you also have https://github.com/calcinai/xero-php which has it's own generator, making a PHP model. Are they both under active development? I'm just wondering which one to start playing with. Obviously this one would be more convenient, although I was once employed to program PHP... ;)

@calcinai
Copy link
Owner

Hey, you're right - there are currently two versions of it. The one in the php library became this one, and the 2.0 branch of xero-php feeds from these swagger schemas.

Very recently though, Xero updated the document format, so neither generator currently work. I'm about to sit down and fix this one and will probably not bother with the one in xero-php 1.x

Feel free to use these ones and let me know anything you see that doesn't look quite right. I'll do my best to get these all in line.

@gtod
Copy link
Author

gtod commented Feb 27, 2017

Just to let the Internet know, I got the Swagger Java codegen to run against the accounting.json as a proof of concept. All good.

But digging a little deeper it seems I'd need to add OAuth 1 headers to each request to the Xero endpoint. And Swagger does not support OAuth 1 as yet: OAI/OpenAPI-Specification#61

I note in xero-php @calcinai is doing his own OAuth 1. I though about doing it manually too but it seems the proper thing is just to add OAuth 1 support to swagger. But that's too much of a tangent for me just now so I'm putting this to one side and will persevere with https://github.com/XeroAPI/Xero-Java.

Thanks again Michael for your efforts to do things the right way... ;)

@calcinai
Copy link
Owner

Nice work! Yeah, I ran into that OAuth thing already, maybe the little note in the readme isn't quite obvious enough...

@securityvoid
Copy link

Any luck with fixing this for the new doc format?

@calcinai
Copy link
Owner

Not as of yet, unfortunately I've been a bit caught up with work lately. I have made progress, just not there yet!

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

No branches or pull requests

3 participants