Parse or convert .pb files under .sonar folder - parsing

I'm using sonarqube 5.6.5,everything works well . Now i need to parse the issues.PB file generated under .sonar/batch-report/ folder. i tried using jsonformat but it is not working.

They are "Protobuf" format, which is a format by google for serializing data. You can get started here or find for example a tutorial here on how to use it in Java.
What I don't understand is that your question has a tag "protobuf-net", which github page explains very well how to use it (in .NET).

Related

Where is the swagger json schema located?

The help for swashbuckle mentions that the ui for Swagger is driven by the generated json schema.
Where is this json file located?
I cannot find it in the folder for my asp.net project
When I actually run the application and navigate to http://localhost:51659/swagger/v1/swagger.json
then I see the json
Where is it on disk? Or is it only in memory?
There is no file generated, it is only on memory.
You might want to read a bit the code:
https://github.com/domaindrivendev/Swashbuckle/blob/master/Swashbuckle.Core/Swagger/SwaggerGenerator.cs
If you need a file you could create an IDocumentFilter to generate one. I have an example here generating a Yaml file:
https://github.com/heldersepu/Swagger-Net-Test/blob/master/Swagger_Test/App_Start/SwaggerConfig.cs#L378

Convert Swagger JSON to AsciiDoc markdown

I'm trying to import Swagger JSON into AsciiDoc. To do that I'm trying to convert the Swagger JSON into markdown that can be read by AsciiDoc. I can't figure out how to do it. I've read that I will likely need to use swagger2markup. However, not being a Java programmer it's unclear how to use this. I got some clues from this answer but I can't get very far. It involves using J Unit and I don't know what to do with that and all that is required. Has anyone figured out how to do this?
I got some help from a coworker on how to convert the my Swagger JSON to AsciiDoc markdown. The more complex instructions here were not what I needed. The CLI instructions here were. The simpler conversion process using the CLI as opposed to integrating Swagger2Markdown into a Java app were ideal.

Choose a tools to documents REST API

I actually use Doxygen to document my php REST application and I just discover Apiary & Swagger witch seem to be good tools to document API...I want to know if there is a way to generate documentation automatically using one of this tools (apiary or swagger ) based on the code comments?
Using swagger-php you can generate the documentation automatically from a collection of php scripts documented using annotations.
Swagger-PHP is decently documented here: http://zircote.com/swagger-php/
A working example can be found on github: https://github.com/zircote/swagger-php/tree/master/Examples/Petstore
Regarding the generation of the json file containing the documentation check my answer here: https://stackoverflow.com/a/31178997/2853903

How to read pdf and extract text from pdf in symfony1.1?

I am working on Symfony-1.1 in an existing project. How can I read pdf files and extract text from them?
It's not a Symfony 1.1 related question, actually. It's a PHP one. There several libraries to handle PDFs in PHP. Following are some suggestions.
https://github.com/smalot/pdfparser
http://pastebin.com/dvwySU1a
http://www.pdflib.com/
If you just need to parse pdf in anyway and then process the text in PHP, you can also consider using a java library like the following.
http://pdfbox.apache.org/ (Is there a PDF parser for PHP?)

Troubleshooting "call to undefined function" when adding Markdown to project

I'm trying to add some Markdown capabilities to my Symfony project (Symfony version 1.3.3).
To accomplish that, I had already included the Markdown library into lib/vendor directory. Also, I added the need configuration in the autoload.yml for the previous library.
However, I'm getting a fatal PHP error:
Call to undefined function Markdown()
How can I resolve this problem?
The symfony autoloader loads classes from php files named like <classname>.class.php. If you're using the markdown.php file from mitchelf.com, it does not follow the naming scheme, nor does it contain a class called Markdown, as a matter of fact: it has a function called Markdown.
Symfony isn't even trying to load it, for reasons I described above. You will have to include it manually. I suggest you have a look at http://www.symfony-project.org/plugins/sfEasyMarkdownPlugin.
I do NOT suggest installing a plugin for such a simple feature. It is not hard for you to figure it out if you have some real examples.
There is an open source project based on symfony named Bookeet. It has embedded MarkDowm feature. It uses markitup as the markdown editor. And it uses php markdown to convert markdown code to html code.
To save your time, go directly to changeset 29f0ba1807 of the Bookeet project(I am sorry that I can't post the hyperlink because SO doesn't permit new user to post more than one hyperlink). You could see clearly what should be done in order to add markdown feature to your website.

Resources