oxidecomputer / typify

JSON Schema -> Rust type converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use &[T] as parameter_ident for arrays

bjorn3 opened this issue · comments

commented

Currently &Vec<T> is used which still requires heap allocation. For strings &str is already used.

That would be an improvement; are there particular scenarios you have in mind or a particular JSON schema?

commented

In the Zulip api several api calls have a list as parameter. For example https://github.com/zulip/zulip/blob/113ac6eb98ffe192580ba0e25a7958346daeebf8/zerver/openapi/zulip.yaml#L5767

I see. Can you show an example of the code you'd hope to write that would consume the generated interface?