Closed htdvisser closed 5 years ago
Seems like this has been forgotten? The main work is now merged in pseudomuto/protokit @htdvisser @pseudomuto
It's not forgotten, I see it every time when I click on "Pull Requests" in Github's top bar :wink:
This PR is just waiting for @pseudomuto, and I suspect he's been a bit busy. From his Github activity I suspect that he just returned from a holiday, so maybe he'll find time for it soon.
Everything is basically done, so moving forward, we need to:
The ability to emit field/service/method/enum options in json output would be fantastically useful to us (currently using a forked protobuf.js to achieve this). Looking forward to progress!
My apologies for the long-delayed response here. Between vacation, conferences, and work I haven't had enough free time to review this.
Good news is, I've got time this week. I'll make sure I've got this reviewed by the end of the week.
It didn't look like @pseudomuto reviewed this yet, so I took the liberty of adding support for the validate.rules
option from github.com/lyft/protoc-gen-validate as well.
Released! - https://github.com/pseudomuto/protoc-gen-doc/releases/tag/v1.3.0
Thanks again for the PR @htdvisser!
This is a great addition thanks!... Sadly only outputs for the HTML template. Need to add the changes to the other templates... selfishly the Markdown template :D
@rogchap if you want to submit a pull request, feel free to get inspired by the markdown template I wrote for TheThingsNetwork/lorawan-stack
ping @pseudomuto
This pull request builds on top of https://github.com/pseudomuto/protokit/pull/2 and https://github.com/pseudomuto/protokit/pull/4 to add support for options and extended options in files, services, methods, enums, enum values, messages and fields.
It supports two builtin protobuf options:
deprecated
(as asked in https://github.com/pseudomuto/protoc-gen-doc/issues/233#issuecomment-432961525)idempotency_level
(available on Methods)and three external extensions:
validator.field
for go-proto-validators.validate.rules
for protoc-gen-validate.google.api.http
for grpc-gateway.Notes
Right now for
validator.field
we use reflection to transform the field validation rules, but it could be nice to generate the code for that fromvendor/github.com/mwitkow/go-proto-validators/validator.proto
.I'm currently importing
github.com/pseudomuto/protokit/fixtures/extend.proto
, maybe it's cleaner to copy it.