How do you convert an OpenAPI Spec (Swagger 2.0) to proto3? - protocol-buffers

I've done extensive Google searching but couldn't find a good tool to do this. The closest I could find was https://github.com/googleapis/gnostic, which allows converting an OpenAPI description (swagger.yaml) into a .pb file or a .json file. I'm wondering if there are any tools to convert this .pb file into a .proto proto3 file?
I also tried https://github.com/NYTimes/openapi2proto but unfortunately there are a few cases that aren't handled correctly.
Thanks in advance for your help!

I know this question is old, but I was wandering the same and it seems that things have changed in meantime. So I will post an answer for others, lazy enough to search :)
Currently there are several options to convert OpenApi 2/3 to Protobuf:
OpenAPITools/openapi-generator supports this from version 4.1.2, find more here.
googleapis/gnostic can do this as well, find more here.
nytimes/openapi2proto a tool written in go for this, find more here.
maybe some more...? add if i missed any.

Related

Is it possible to copy comments and suggestions when copying a Google Doc using Drive API?

I noticed that comments and suggestions are not by default copied when using drive.files.copy. This is imperative to my project, so I did some googling and it seems like this feature may not even exist? I thought about copying and applying the comments manually using the Docs API, but I can't seem to find anything helpful about this on SO or the Google API documentation for Drive and Docs. Does anyone know if this is possible and how to do this?
Thanks
edit: the comments.list method returns comments, but not suggestions. I think I would be able to insert these comments manually into the copied document. What about suggestions? Is there a way to retrieve these?
It would be really nice if I could easily copy both without a lot of leg work.
Unfortunately it's not possible to copy a Google Docs file with comments and suggestions
As for comments, you can copy-paste them manually like done here.
However, suggestions are different from comments (at least as the Google APIs go) - see here for information.
In order to retrieve suggestions, you can use the documents.get method
Yet, inserting suggestions programmatically is currently not possible - see here for more details

Thunderbird gFolderTreeView documentation?

I'm struggling to learn how Thunderbird extension works but I'm stuck by the lack of documentation.
Inside an extension I found:
gFolderTreeView._modeNames...
...
gFolderTreeView.getFolderTreeMode(viewName);
Google gives no help in trying to understand something more about gFolderTreeView. I can only find examples where it is used but no API description. Where can I find the list of its methods, properties and a description of what they do ?
The only way I know would be to take a closer look at the Thunderbird source code.
gFolderTreeView is defined at https://dxr.mozilla.org/comm-central/source/mail/base/content/folderPane.js#129. The nsITreeView interface, which seems to be one of the thinks gFolderTreeView implements, is defined in https://dxr.mozilla.org/comm-central/source/mozilla/layout/xul/tree/nsITreeView.idl.
I found it by searching at https://dxr.mozilla.org/comm-central/ for id:gFolderTreeView and file:nsITreeView
Note that the links are to the latest sources. If you need to look at the sources for older Thunderbird versions, you need to switch the tree from comm-central to e.g. comm-esr45.
The Code that is used by both Thunderbird and Firefox is in the mozilla-central tree

Dart tag and syntax reference?

This is a very noobie question. I hope I still can get some help. I normally use references for the languages I use. Like Tag and Syntax references so I know what they do. A example would be If I was doing HTML I would have this site open http://www.w3schools.com/tags/default.asp
I do this because I can't remember anything. It seems like w3school does not have dart yet so I was wondering if any other Dart coders found something similar?
If there is none what do you guys do to know all the syntaxes/tags? Do you remember everything?
Dartlang.org only has the API reference and some code samples which is good but not enough for me
https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/home
Dart cheat sheet is a concise and clearly arranged summary of the Dart language.
Try Chapter 2. A Tour of the Dart Language from the web version of Dart Up and Running.
It's concise but quite useful, and published as a single we page so it can be searched with the browser search function.

Itextsharp documentation for xml

I am looking for documentation on the XML parser in ItextSharp, I heard there was a dtd years ago but this seems to be defunt. Does anyone know where I can find out all the valid tags and references?
I am using ItextSharp with Spark
Thanks
When in doubt, use the source. Poking around in my copy of the current iText source, I see that the only SimpleXMLDocHandler available is HTMLWorker.
And if you look at the source for HtmlTags.cs, you'll see all the tag and attribute constants HTMLWorker uses.
It's not exactly comprehensive, but is going to be getting some Enhancement in the immediate future.
I don't see a 4.1.2 tag, but there's one for 4.1.6 in the iTextSharp project on SF. It shows ITextHandler using a bunch of constants from ElementTag in HandleStartingTags(). It also uses ElementFactory to build the various supported tags. Looking at the source for each function will tell you which attributes it supports.

Where can I get SCAYT documentation, or algorithm?

I am using CK editor, now I want to understand SCAYT, but the scayt plug-in provided by SPellchecker.net is minified, and not well documented but I need to understand some of the features.
Can anyone provide me with such type of document or any algorithm related to this.
thanks in advance.
Download CKEditor 3.0.2 from http://ckeditor.com/download.
Decompress the file, and look for the directory _source/plugins/scayt, which will contain a file named plugin.js.
That file is not minified.

Resources