Convert Swagger JSON to AsciiDoc markdown - swagger

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.

Related

Parse or convert .pb files under .sonar folder

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).

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?)

Parsing XSD using Xerces

I need to parse a generic XSD and create sample XMLs conforming to the XSD. I am using Xerces for Java.
Does Xerces provide support for parsing XSD or do i have to parse it as a regular XML ? If theres support in Xerces, how do i do it?
Also could someone point to way/technique by which i can create all possible XMLs conforming to an XSD.
if possible please share code link or code snippet.
Thanks.
I am not sure which programming language you want to use but assuming Java, you can use XSOM or JaxMe to parse XSD's. You can extract the schema information and then generate the xml's based on the parsed meta data. Or check if XIG: Xml Instance Generator meets your requirement.

Resources for learning to output xml from rails?

I would like to use rails to output xml on a request from a client (Android device). I have gleaned from web searches that .builder.xml files are the way to go for this, but I cannot find a single tutorial or guide to get me started that is newer that 2006.. does anyone know of a good resource for xml and rails?
It's probably best to look at the official XML Builder homepage and follow/try the examples there: http://builder.rubyforge.org/
You can use XML Builder in both your controller or in your views, the code is the same. However, inside an .builder view you already have access to a builder instance via the "xml" variable. See: http://danengle.us/2009/05/generating-custom-xml-for-your-rails-app/
Take a look at this article about XML Builder.
I also highly recommend you to use Nokogiri to generate XML.

Resources