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
1
vote
1 answer

How do I add documentation / description to a Header parameter?

For the Headers section, I need to describe what each header parameter / field / entry is. How would I go about doing that? Currently, my Headers section looks like this: + Headers Access-Token: access_token # Server-generated Access Token…
Daksh
  • 1,177
  • 2
  • 18
  • 28
1
vote
0 answers

How to add file attribute in request body?

I'm trying to document API through apiary.io and I want to add the following request body where there is a file in the form of key-value pair: How can I add this file in request body in apiary?
S.Dan
  • 1,826
  • 5
  • 28
  • 55
1
vote
1 answer

How to document optional parameters in path in API Blueprint?

Assume there is an API that has an optional parameter in in the URL path: ## Get FooBar [/foo/bar/{type}] + Parameters + type (optional, string, `widget`) ... Filter for a specific bar type Of course the type parameter should really be a…
janpio
  • 10,645
  • 16
  • 64
  • 107
1
vote
0 answers

How can I support arbitrary querystring params? (explode modifier?)

My API allows users to filter a database table using query string params (ie. ?age=30&location=Philadelphia). These params are different for each database table. How can I express that in API Blueprint? The API Blueprint spec says it supports the…
Tobias Fünke
  • 2,034
  • 3
  • 24
  • 38
1
vote
1 answer

How to specify a JSON object with string values in MSON / API Blueprint?

I have been looking through the examples a lot but I didn't find a way to specify a property whose value is a JSON object with strings as values. I have an object like this: { id: 123, title: "I am a title", dynamic_attributes: { "key1":…
user1915201
  • 103
  • 1
  • 9
1
vote
0 answers

Describing object's keys with MSON

I have API that looks like this. The products object contains Product IDs (keys) and their amount in basket (values). { "id": "0a4d44aa-2ace-11e7-93ae-92361f002671", "products": { 4 => 3, // product with ID 4 is 3x in basket …
Grez
  • 306
  • 3
  • 8
1
vote
1 answer

How can I make enums in API Blueprint be DRY

I'm documenting an API using API Blueprint and I've got several endpoints that use the same enum type with the same values. Rather than repeat all of the values at every point where this enum is used I'd like to put it in the Data Structures section…
neuronaut
  • 2,689
  • 18
  • 24
1
vote
3 answers

API Blueprint: Semantic Issue "no value(s) specified"

In my blueprint I'm defining a data structure and try to use it like so + Attributes + error: (Error Details, required) Data structure definition at the end of the document: # Data Structures ## Error Details + code : 1234 (number, required)…
Marcus Ilgner
  • 6,935
  • 2
  • 30
  • 44
1
vote
2 answers

How to override MSON Sample values

If I define a resource type with sample values, how can I override them for specific examples? I tried this, but the rendered output ignores the Body and uses the global Sample instead. ### Read item [GET] + Response 200 + Attributes (A,…
OrangeDog
  • 36,653
  • 12
  • 122
  • 207
1
vote
0 answers

How to extend rather than replace parent Parameters?

I've got a resource with multiple parameters, and a single action with one extra. How can I write this with the minimal repeats? Something like this, but that actually works: ## Items [/item{?type}] + Parameters + type (enum[string], optional) …
OrangeDog
  • 36,653
  • 12
  • 122
  • 207
1
vote
1 answer

Aglio Render Markdown after Request / Response section

Here's a snippet of my apib document. Essentially, I want to be able to put additional descriptive information after the Request and Response sections, however this information is not rendered. Instead any further text under a new heading is…
1
vote
1 answer

API Blueprint and Dredd - Required field missing from response, but tests still pass

I am using a combination of API Blueprint and Dredd to test an API my application is dependent on. I am using attributes in API blueprint to define the structure of the response's body. Apparently I'm missing something though because the tests…
Alex Seifert
  • 113
  • 3
  • 14
1
vote
1 answer

What does Include mean in API Blueprint files?

I can't see any mention of it in the API Blueprint spec, although there was a feature request to add an include directive for including other files.
Robin Green
  • 32,079
  • 16
  • 104
  • 187
1
vote
1 answer

Unable to fetch apiary.apib using the apiary CLI fetch command (even though i am using my apiary access token)

I am trying to fetch my apiary documentation (on the apiary server) to my local drive. I am the owner of the API and have access to the Settings button (I thought maybe this is important since i get a 403 forbidden response in the end, see below).…
Shachar R
  • 311
  • 1
  • 2
  • 8
1
vote
1 answer

Have Dynamical values for my parameters in the Request payload (POST x-www-form-urlencoded)

Is there a way (and does it make sense even) to have dynamical values for my request parameters (in my case POST application/x-www-form-urlencoded that has two parameters username and password) which can be altered based on some function or a…
Shachar R
  • 311
  • 1
  • 2
  • 8