Byron / google-apis-rs

A binding and CLI generator for all Google APIs
http://byron.github.io/google-apis-rs
Other
1.02k stars 136 forks source link

Slides api support #268

Closed LegNeato closed 3 years ago

LegNeato commented 3 years ago

There does not appear to be google slides support, though when I use the Google discovery service it exists in the json.

Byron commented 3 years ago

The slides API is currently deactivated as the generated code is invalid.

https://github.com/Byron/google-apis-rs/blob/5dc84bd041a0385b1d5100a4c4a07df3d81bbc1a/etc/api/shared.yaml#L36:L37

As of now, this is still the case:

cd gen/slides1 && cargo check
    Checking google-slides1 v2.0.2+20210322 (/Users/byron/dev/github.com/Byron/google-apis-rs/gen/slides1)
error[E0072]: recursive type `Page` has infinite size
    --> src/api.rs:1255:1
     |
1255 | pub struct Page {
     | ^^^^^^^^^^^^^^^ recursive type has infinite size
...
1282 |     pub slide_properties: Option<SlideProperties>,
     |                           ----------------------- recursive without indirection
     |
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Page` representable
     |
1282 |     pub slide_properties: Box<Option<SlideProperties>>,
     |                           ^^^^                       ^

error[E0072]: recursive type `SlideProperties` has infinite size
    --> src/api.rs:2050:1
     |
2050 | pub struct SlideProperties {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive type has infinite size
...
2059 |     pub notes_page: Option<Page>,
     |                     ------------ recursive without indirection
     |
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `SlideProperties` representable
     |
2059 |     pub notes_page: Box<Option<Page>>,
     |                     ^^^^            ^

error: aborting due to 2 previous errors
Byron commented 3 years ago

As it's unlikely this will get fixed outside of contributions now that this repository is in maintenance mode, I may also point you to alternative implementations which probably provide a version of this API already.