Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Blob request builder generators #250

Open
adeschamps opened this issue Mar 15, 2020 · 1 comment
Open

Blob request builder generators #250

adeschamps opened this issue Mar 15, 2020 · 1 comment

Comments

@adeschamps
Copy link

I'd like to add support for a few more APIs (in particular, Get/Set Blob Metadata). It looks to me like the request builder .rs files are generated code from the corresponding .json files, but I can't find a codegen script anywhere. Is it in the repository?

@MindFlavor
Copy link
Owner

MindFlavor commented Mar 16, 2020

Ah yes, I use this executable https://github.com/MindFlavor/bpb to convert the .json files in the skeleton corresponding .rs.
I should have documented this better but since the code quality of the bpb tool is abysmal I had hoped to keep it under wraps 🤷‍♂ ...

I generally use it like this:

bpb class.json | rustfmt > class.rs

It will create the skeleton class with all the builder functions in place (enforcing the mandatory fields). That is if you specify a valid json (and I'm sorry but my error messages and documentation are, ehm, absent...). I will try to at least document the json schema ASAP (MindFlavor/bpb#2).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants