1

I am using apiary.io and added all restful endpoints. It looks great, there are code snippets in many languages how to make GET request and get the results.

Now, I want to add a code snippet to the documentation, which is not related to any endpoints (example for the authentication process). I want this code to be shown on the right, without clicking on any link. Can I somehow achieve this? I would like to have the code highlighted and indented as in my IDE. I am using Python, if that is relevant.

Thank you in advance!

giliev
  • 2,938
  • 4
  • 27
  • 47

1 Answers1

2

I assume by "code to be shown on the right" you mean in the machine column (the rightest one) with another code examples. If I am correct, I have to disappoint you - unfortunately it's not possible as machine column is generated from HTTP resources only.

You can put your code example into documentation using standard Markdown syntax, e.g.:

```python

s = "Python syntax highlighting"
print s  

```

informatik01
  • 16,038
  • 10
  • 74
  • 104
miiila
  • 368
  • 3
  • 7
  • 1
    I realized it is not possible to be shown on the right. Thanks for the suggestion! BTW, it would be nice to make the code snippets look a little bit more colorful, like in IDE or notepad/gedit. Like here: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code – giliev Aug 08 '16 at 19:14