gRPC documentation generator - documentation-generation

Does gRPC support generating documentation for services like Swagger?

protoc-gen-doc is a protoc plugin which generates HTML docs using Go HTML templates. Although it isn't being used by the original sponsor company anymore, it looks like a good starting point.

Your protofiles are the documentation.
You can put comments there to clarify meaning of parameters or service methods.

Related

Documenting a gRPC API

One can document a REST API with OpenAPI. Is there a similarly clean and standardized way of documenting gRPC APIs? E.g. specify what values an endpoint is expecting, what the return values mean, etc. The service definitions in a .proto file do not suffice as documentation.
I just found this: https://gendocu.com/
which let you try your APIs and document the fields. Also generates code for different languages. The project looks promising.

What do protofiles represent for googles API Linter?

since google did not create extensive documentation for their API Linter and I cannot find anything from other sources, i wanted to ask here.
From what exactly am i supposed to create protofiles and what do they represent?
As I understood, these protofiles get checked for compliance to their AIPs.
I'm interested in creating a automatic prototype (Java) to check for customized API Rules and am thinking about using Protobufer for this goal. Would this be a pragmatic solution?
Thank you!
As I now understand, Googles API Linter isn't supposed to check a API or a different API specification for compliance.
It checks proto files because they are themself the API specification and can be converted to Code. But before converting them they can be checked against rules they have to comply with.
These rules are not in the protofiles (as I initially thought) but in the many GO-files under rules/ .
Please correct me if you read this and find mistakes! Thanks!

JavaScript rule extension

I am trying to extend Sonarqube with custom Javascript rules. I find that the documentation is fairly limited on this subject. The extension tutorials on sonarqube website show only the most basic stuff.
The only javadoc I could find is this one: http://javadocs.sonarsource.org/latest/apidocs/ and it doesn't cover anything about extending Javascript.
What I ultimately want to do is add a JS rule that will check for hardcoded secrets (such as passwords, api keys, etc). I already created one for Java, and that was a lot easier as I could take an already pre-made plugin and complete it with my custom regex.
The problematic spot that made me post here was actually this one:
cannot find symbol
symbol: class VariableTree
location: package org.sonar.plugins.javascript.api.tree.expression
I was following the same scheme as with Java and used
import org.sonar.plugins.javascript.api.tree.expression.VariableTree;
which is obviously wrong. I was not able to find the source code for this either... if anybody can point me to some secret doc stash or at least where I can find a javadoc for org.sonar.plugins.javascript.api that would be amazing!
Thanks very much for any help

What methods exist to auto-generate ruby client stubs from WSDL files?

I'm using Ruby and the Savon gem to interact with SOAP/WS and would like to auto-generate the client request methods from the WSDL in Ruby.
Before I do this, I'd like to know if there's any other Ruby/SOAP library that does this?
Edit: Please note, I already know this isn't available in Savon out the box, in fact my intention is to add in the feature, I'm in the process checking if this exists somewhere else written in Ruby.
Since it's only few days since you asked this question, and I've run into same problem I've decided to create small script to do that.
Download - save as objects.rb for example and run with _bunde exec objects.rb path_to.wsdl_
https://gist.github.com/4622792
Let me know if it works ^^
Take a look at Savon's spec, it has pretty rich testing environment
I think ads_common by Google is relevant to you.
google-api-ads-ruby/ads_common at master ยท googleads/google-api-ads-ruby
rake generate can create the client libraries automatically from WSDL.
It is specialized for Google Ads, but this notion would be helpful to create a versatile client library automatically from WSDL in Ruby.

How do I use WSDL and implement a SOAP server in Ruby?

I have WSDL and XSD files and want implement a webservice based on this WSDL.
I've successfully installed the Action Web Service gem and it's worked without problem for me, but I really need it to use my custom WSDL and not one generated by ActionWebService.
I don't have an answer for you, but it sounds like you need a code generator like wsdl2ruby available in the SOAP4R gem.
Here is a recent fork/update to SOAP4R: https://github.com/mumboe/soap4r
And there are a couple of examples of using SOAP4R to generate web service clients:
http://www.winstonyw.com/2008/09/02/howto-use-ruby-soap4r/
http://mrfrosti.com/tag/wsdl2ruby/
I haven't easily found any examples of generating server-side code, but wsdl2ruby seems to have a switch to perform that function.
Good luck.

Resources