-
Notifications
You must be signed in to change notification settings - Fork 71
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
Generate failed for Xero Accounting OpenAPI spec #955
Comments
I've looked at this again with |
I'll need to look more closely, but I suspect it might be constructs such as this: HasAttachments:
description: boolean to indicate if an account has an attachment (read only)
readOnly: true
type: boolean
default: "false"
example: "false" In particular, the default value is a string |
Thanks! Yeah, that was it. Now there also appears to be an invalid schema for
I'll open an issue on Xero's side once I figure the final bits out if there's nothing else related to EDIT: Seems unhappy with application/octet-stream:
schema:
type: string
format: byte
|
This would be a good one to add. Per https://spec.openapis.org/registry/format/, My inclination is to model it as something like struct ByteString(pub Vec<u8>); Where the It does seem potentially odd to have I see this in the progenitor code: BodyContentType::OctetStream => {
// For an octet stream, we expect a simple, specific schema:
// "schema": {
// "type": "string",
// "format": "binary"
// } Are you currently seeing |
Yeah that sounds great! I'd be happy to open a PR but I might only be able to get to it later this week. Yip, I currently get |
Can you confirm empirically that the API in question is indeed responding with an octet stream that contains base64 encoded data? |
Sorry for the late reply. Seems they went and changed all So for this specific API it's not an issue anymore so it can be closed. This could change into a general tracking issue for |
Hey, thanks for the awesome tool! 💚
It seems that
cargo-progenitor
(as of 2f32cde, but probably all prior versions 🤷) fails to generate a crate for the Xero Accounting OpenAPI spec.After downloading the above spec to reproduce, run:
RUST_BACKTRACE="full" cargo progenitor -i xero_accounting.yaml -o xero-client -n xero-client -v 6.3.0
The output is as follows:
There are no errors for the same spec in the Swagger editor.
The text was updated successfully, but these errors were encountered: