What do protofiles represent for googles API Linter? - go

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!

Related

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 is the "annotate" method in Google Vision API?

I am reading the Google Vision API documentation:
(https://cloud.google.com/vision/docs/requests-and-responses)
It says something like the follwing:
Currently, the Vision API consists of one collection (images) which supports one HTTP Request method (annotate):
POST https://vision.googleapis.com/v1/images:annotate
My question is what does it mean by the method "annotate"? Also, how do I read this syntax with the colon ":"? Is this just a notation that Google uses or some kind of industry standard where you use the colon and calling the stuff after a "method"?
I am a financial Java developer but noob to Web/HTTP technology (I have read some basic of GET/POST but that did not seem to help me with this question). If it seems to you that I am totally lacking in some fundamentals, is there any pointer for me to read up some related books/website/tutorial/documentation that can help me understand this better? Any help is appreciated!

Katharsis security + API versioning

I am currently evaluating possibilities, how to write/generate level2+ rest API. I came across karharis and i pretty like the concept and the whole idea how its done seems sound to me. But I have not found answers to these questions:
How to handle security properly. I can imagine that it might get tricky, as JSON api supports traversing to some extent. (out app will run in spring environment, so I suppose that we might use spring-security, but I do not know, if we will encounter some hidden traps)
API versioning. I havent found any clues how to handle API evolution. Are there any already supported options (content negotiation, path variable, query parameter...?) or do we need to hack it ourselves?
Thanks in advance!

gRPC documentation generator

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.

Legacy exchange MAPI help?

I'm working with some legacy exchange code and I am having trouble finding information about some methods/constants. A google search reveals others using similar code, but with no explanations. Does anyone have any ideas where I can find proper docs? One constant I am looking for is: SYNC_ASSOCIATED.
Exchange is a Microsoft protocol, so the best place to look is usually MSDN.
The MSDN library, however, seems curiously lacking on Exchange documentation, but an MSDN search looks in a few other places too.
In this case, it's led me to this blog post which gives you a number of constants as they would be defined in a C header file. SYNC_ASSOCIATED is defined as 0x10.
This is part of ICS, Exchange's mechanism for monitoring and tracking changes in a mailbox. See the ICS section of the bulk data transfer protocol spec.

Resources