aip-dev / google.aip.dev

API Improvement Proposals. https://aip.dev/
Other
1.1k stars 501 forks source link

Create toolkit list for users who want to follow the AIP #738

Open devkanro opened 3 years ago

devkanro commented 3 years ago

Description

We should have a toolkit list for uses who want to follow the AIP documentation and creating the AIP spec API.

AIP defined many rules for API designing, but it is not easy to follow some rules for users, etc AIP-127 AIP-160.

Manifest

I will list some toolkit that I known, main for our use case

  1. AIP-122 needs a library to parse and verify the ResourceName
  2. AIP-127 needs a gateway implementation to translate HTTP/JSON request to gRPC request
  3. AIP-132 needs a library to parse the ordering expression
  4. AIP-160 needs a filter parser implementation
  5. AIP-161 needs a toolkit for apply FieldMask to Protobuf message
  6. IDE support for AIP spec
lukesneeringer commented 3 years ago

This is a great idea, thanks for putting this list together. I am definitely willing to add this to the site.

odsod commented 3 years ago

For Go, we at Einride are developing an open source toolkit here:

https://github.com/einride/aip-go

It's a work in progress, it's not yet well-documented, and we're gradually migrating functionality from an internal repo. Some stuff is still unstable and will receive breaking changes (filtering and reflection most likely) - and we have an internal code generator for resource names that we are going to be putting out there.

Since we also use Cloud Spanner, we are developing an optional additional toolkit for Spanner persistance here:

https://github.com/einride/spanner-aip-go

The same goes for this one. Still experimental, slightly undocumented and will receive breaking changes. :smile_cat:

odsod commented 3 years ago

@lukesneeringer Please keep us posted if you add links to the site! I'll make sure we improve the READMEs a bit at the same time. :smile:

SanjayVas commented 3 years ago

I'd add that AIP-192 needs a tool for generating documentation (e.g. HTML or Markdown) from a protocol buffer API definition.

I don't know of any available tool that understands things like cross-references to fully-qualified protocol buffer messages/fields.

devkanro commented 3 years ago

@SanjayVas

I don't know of any available tool that understands things like cross-references to fully-qualified protocol buffer messages/fields.

Just use the protoc, it can generate FileDescriptorSet from protos, and it is just a normal proto message. All type names will be resolved as fully qualified names.

If you want to resolve those references by syntax struct or something like AST. The ProtobufSymbolResolver in Intellij Protobuf Plugin maybe can inspire you. resolveRelatively method can resolve type names relatively.

ccarmona1 commented 1 year ago

is there any AIP-160 parser for JS?

toumorokoshi commented 1 year ago

There's no official public implementation, unfortunately. If there's interest please explain it here: it might eventually help with prioritization.