Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add images/diagrams to API Blueprint?

We would like to integrate images into our API documentation on Apiary, as a way of documenting the underlying application architecture or to illustrate sample workflows/sequence diagrams. However, a search through Apiary documentation and the API Blueprint Specification don't seem to yield any results on how this can be done.

Is it possible to add images to API Blueprint? Or do these images have to be hosted externally and referenced by URL?

like image 285
David Avatar asked Dec 14 '15 18:12

David


2 Answers

David - API Blueprint is based on Markdown syntax (as are many other places including GitHub comments). You can use the following syntax to insert an image into Markdown (and API Blueprint):

![name](/url)

These images indeed need to be hosted externally and referenced via URL.

like image 120
zzen Avatar answered Nov 02 '22 10:11

zzen


As described in another answer:

![alternative text](/url)

Or on linux for a local image:

![alternative text](./image.png)

but if you want to specify the image size, use html directly

<img src="image.png" alt="image alternative text" width="500"/>
like image 44
Mark Teese Avatar answered Nov 02 '22 10:11

Mark Teese