-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
API proxy struct codegen #5854
API proxy struct codegen #5854
Conversation
Ah, openrpc was getting param names from the struct, which is why those files are now smaller - diff from master:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good to me and it's definitely an improvement over having to do it by hand.
I suppose the v1 scaffolding will come at a later pr or is it planned for here?
It was also my mistake re OpenRPC files, I through the 99% meant 99% smaller, it probably means 99% different. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's squash as it doesn't build in the middle.
* mostly working api proxy gen * api: Consistent api names * fix docsgen * regenerate api struct * api: expand external interfaces * Add missing gen files * apigen: fix perm detection * api: Move perm tags to the interface * gofmt * worker perms * docsgen * docsgen: ignore tag comments * apigen: add codegen warning * gofmt * missing actor type * docsgen * make linter happy * fix lint * apigen: use directives for tags * docsgen * regen openrpc docs
Includes #5844
The main part is just 300LOC in
gen/api/proxygen.go
, rest of the diff is moving permissions and codegenLike docsgen, for now it's hardcoded for the
api/
package, that will get fixed when porting to the versioned api