- The OpenAPI Specification defines a standard interface to RESTful APIs which allows both humans and computers to understand service capabilities without access to source code, documentation,.
- Set to true to enable ExtraMode, which enables the same set of features as implemented by PHP Markdown Extra.
Openapi 3 Markdown
A properly structured and well-written documentation explaining how to use an API effectively and integrate it easily can help developers big time.

I’ve been sketching some ideas, pondering the ethics of doing an F1 review style book blending (openly licensed) content from Wikipedia race reports with some of my own f1datajunkie charts, and also wondering about the extent to which I could automatically generate Wikipedia style race report sentences from the data; I think the sentence generation, in general should be quite easy – the harder part would be identifying the “interesting” sentences (that is, the ones that make it into the report, rather than than the totality of ones that could be generated).
So far, my sketches have been based around just grabbing the content from Wikipedia, and transforming to markdown, the markup language used in the Leanpub workflow:

- the wikipedia Python package;
- pandoc and the pypandoc thin Python wrapper.
In Python 3.x at least, I came across some encoding issues, and couldn’t seem to identify Wikipedia page sections. For what it’s worth, a minimal scribble looks something like this:
Openapi Spec Markdown
If the Formula One race report pages follow similar templates and use similar headings, then it should be straightforward enough to pull down sections of the reports and interleave them with charts and tables. (As well as issues parsing out section headers to fill the sections list, the tables on the page don’t appear to be grabbed into the .content field (assuming the API wrapper does manage to grab that content down? However, I can easily recreate those from things like the ergast API).
Looking at the construction of sentences in the race reports, many of them are formulaic. However, as noted above, generating sentences is one thing, but generating interesting sentences is another. For that, I think we need to identify sets of rules that mark data features out as interesting or not before generating sentences from them.
Markdown — see Wikipedia — is becoming really well supported, with loads of tools to convert to (and in some cases from) HTML, PDF, LaTeX, DocBook, groff etc etc. This makes it a great choice as a standard doc format, much easier to write than an XML dialect, and also a good choice as a simple wiki format.
You can see some of the available engines in action at
http://babelmark.bobtfish.net/?markdown=++*+foo%0D%0A%0D%0Abar ,
or have a look at the converter at http://johnmacfarlane.net/pandoc/try

The PHP implementation is one of the most solid. Is there any interest in adding an option to use the portable Markdown syntax instead of the (probably more powerful) Wikidot syntax?
Open Api Markdown Example

— Thomas.
