Questions tagged [apiblueprint]

API Blueprint is a Markdown-based DSL for describing HTTP APIs.

API Blueprint is a Markdown-based DSL for describing HTTP APIs.

Documentation, opensourced parser and other utilities available at http://apiblueprint.org/

250 questions
66
votes
6 answers

Is it possible to center tables in a markdown file?

I have a table: | This | Is | A | Table | | :--- | -- | - | ----: | | foo | ba | r | elbaT | I'd like the table to display in the center of my Markdown file instead of left-aligned. I am not trying to align text, but the entire table…
Meredith
  • 3,928
  • 4
  • 33
  • 58
30
votes
1 answer

How do I document a multipart request with apiary?

I want to document a multipart request like the following: Content-Length: 477 Content-Type: multipart/form-data; boundary=---BOUNDARY -----BOUNDARY Content-Disposition: form-data; name="image[file]"; filename="image.jpg" Content-Type:…
terje
  • 4,164
  • 2
  • 28
  • 28
22
votes
2 answers

How can I have multiple responses from a single endpoint with different parameters?

We are looking at using the API Blueprint. There are cases where we would like one request to return a proper response and another request to return an 'error' response such as a 400 bad request so that other developers can work against the mock…
Mendhak
  • 8,194
  • 5
  • 47
  • 64
18
votes
2 answers

Documenting query parameters with API Blueprint

I'm trying to document a query parameter in API Blueprint, but I'm not entirely sure if I have done it correctly. The resource looks like this: DELETE http://baasar.apiary-mock.com/user/{appId}/{userId} That request would deactivate the user while…
Sebastian Dahlgren
  • 957
  • 2
  • 11
  • 20
16
votes
4 answers

Good rest code generation and documentation tool

I have been considering a documentation tool for building a backend for a web service to be used in multiple clients along with OAuth and possibility of multiple revisions. I already knew about apiary but doing a little research I found other…
Pinser
  • 1,898
  • 3
  • 29
  • 43
14
votes
1 answer

What is the correct format for denoting that an input parameter is a date/time in Apiary?

I am editing some Apiary documentation on a project I am working on, and need to denote that a parameter to one of my API calls is a datetime string. Apiary seems to be choking on the formatting of this parameter, so I'm wondering what the…
Chris
  • 4,663
  • 5
  • 24
  • 33
12
votes
1 answer

Trying to describe the request and response using Data Structures in API Blueprint

I'm trying to document an endpoint with API Blueprint, using the new Attributes and DataStructures sections of the spec. My request payload looks like this: { "url": "http://requestb.in/11v7i7e1", "active": true, "types": [ { …
Piotr Zurek
  • 2,800
  • 2
  • 24
  • 32
11
votes
2 answers

Apiary.io - multiple responses (200) with different parameters

I am trying to get different responses passing different parameters but something is not working. This is my API: ## Question [/questions/{question_id}] A Question object has the following attributes: + Parameters + question_id: `1` (number,…
MeV
  • 3,761
  • 11
  • 45
  • 78
11
votes
1 answer

Exposing RESTful endpoints for a one to many relationships

Consider the following relationship between two resources College has many Faculties Faculty belong to a College Obviously a Faculty is not a first class resource here. Now I need endpoints for following operations. Create a new faculty in this…
Samiron
  • 5,169
  • 2
  • 28
  • 55
11
votes
2 answers

How to specify error codes in Apiary Documentation?

I want to specify the various exceptions/errors that have to be returned while making an API call. How do I achieve this with Apiary.
Harshit
  • 711
  • 1
  • 9
  • 29
10
votes
2 answers

What is a 2-dimensional key-value format that Api Blueprint can understand?

I'm developing api documentation for a RESTful search API using Api Blueprint. I would like to be able to pass filters to the API so I can assemble: filter[filtername1]=filtervalue1 filter[filtername2]=filtervalue2 Per this question, I'm using…
danieltalsky
  • 7,752
  • 5
  • 39
  • 60
9
votes
2 answers

How To Show Nested Attribute Definition In Apiary.io

I have a data structure defined as follows: # Data Structures ## PlayerRank (object) Represents the minimum amount of data the the client needs to send to give rank information about a particular Player in a particular Played Game. + playerId…
jakejgordon
  • 4,008
  • 7
  • 36
  • 45
9
votes
1 answer

Response description and POST parameters in API Blueprint

I am trying out API Blueprint and found some things, which are not quite clear to me. 1. How can I document POST body parameters? There is + Parameters but it just documents query parameters. If I now want to describe a POST API I can't document…
apfelbox
  • 2,625
  • 2
  • 24
  • 26
9
votes
1 answer

Apiary: Export API as JSON, to generate client code

We all know that apiary rocks (or not.. I think it does), and I was wondering what would it take to take it a step further allow users to export a JSON description of the API? (So developers can script client code generation) This should…
Mazyod
  • 22,319
  • 10
  • 92
  • 157
9
votes
2 answers

Apiary: Is it possible to document what JSON response fields are?

I would like to document what the actual JSON fields themselves represent. I have documented the GET statement, and parameters but this does not make a complete documentation to give to users. So, in the example below how would I add a comment about…
Menelaos
  • 23,508
  • 18
  • 90
  • 155
1
2 3
16 17