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
2
votes
1 answer

Apiary.io different responses without depending on status codes

I was trying to create an API mock using apiary.io. A section of my current API blueprint looks like follows. + Request (application/json) { "key": "secret", } + Response 200 (application/json) { "decision_type" : 1, …
Philip John
  • 5,275
  • 10
  • 43
  • 68
2
votes
1 answer

Omit property of object defined in MSON

How can I ommit property from defined MSON? I have defined one simple entity (object) using MSON: # Data Structures ## Article (object) Represents an article ## Properties + id: 1 (number, optional) + name: My first article (string) ## Articles…
Northys
  • 1,305
  • 3
  • 16
  • 32
2
votes
1 answer

How to synchronize API Blueprint with API source code?

I want to develop an REST Full API using PHP. But before I develop the real API, I wanna create the Blueprint first as a documentation with the API console, let's say I'm using the swagger or raml to do it. As my understanding, the API Blueprint and…
Praditha
  • 1,162
  • 5
  • 24
  • 45
2
votes
1 answer

Reuse of schema / model apiblueprint for repeated requests with other parameters

What I'm trying to do with an API-blueprint (with dredd as testrunner) is calling a backend twice in a row with almost the same (complex) request. What I would like to do is define an input for a certain endpoint and have some placeholders in there,…
2
votes
1 answer

Primitive type as data structure for API Blueprint

I want to use primitive type for describe data structure. Like so: # Data Structures ## Video Delete (enum[number]) + `0` - Successful deletion. + `1` - Error occured. And the output is. { "enum": [ 1, 0 ], "$schema":…
witzawitz
  • 416
  • 1
  • 5
  • 11
2
votes
1 answer

Apiary.io, same route different method

I'm trying to define a simple CRUD routes in Apiary.io but the interactive editor is complaining because some of my routes are called the same: /questions/{question_id} (GET) /questions/{question_id} (PUT) "The resource '/questions/{question_id}'…
fguillen
  • 36,125
  • 23
  • 149
  • 210
2
votes
1 answer

MSON Array Object "undefined" Error in API Blueprint

We are developing a new API using HAL+JSON, leveraging Apiary.io's API Blueprint. We have been using JSON in our responses within the Blueprint itself. I'm testing a shift to using MSON instead, but am having an issue with an array object. Here is…
2
votes
1 answer

More [GET] request-response examples with different URI parameters

I have an URI: /lessons/{language}/{type} I would like to have more mock requests-responses with different parameters {language} and {type} in my blueprint. It seems to me that this is not possible for GET method. My idea is that: GET…
Jirik
  • 1,435
  • 11
  • 18
2
votes
2 answers

Nested array with object in MSON is empty in Apiary.io documentation

I would like to create a nested array with objects in MSON format to use with API Blueprint and Apiary. I code looks correct but when I render it in Apiary I don't get the expected JSON. Example I want to create: A navigation has multiple…
JeroenVdb
  • 798
  • 1
  • 12
  • 21
2
votes
1 answer

apiblueprint structures to achieve desired description

I currently have such an API blueprint, but i can not achieve proper rendering. FORMAT: 1A HOST: http://polls.apiblueprint.org/ # Samwise Web API This document describes Samwise system WebAPI. Developers should refer to [this…
onkami
  • 8,791
  • 17
  • 90
  • 176
2
votes
1 answer

Data abstraction in API Blueprint + Aglio?

Reading the API Blueprint specification, it seems set up to allow one to specify 'Data Structures' like: Address street: 100 Main Str. (string) - street address zip: 77777-7777 (string) - zip / postal code ... Customer: handle: mrchirpy…
zanerock
  • 3,042
  • 3
  • 26
  • 35
2
votes
2 answers

How to model different requests to same resource in api-blueprint/apiary

I'm writing some API definitions with apiary/api blueprint. Is there a way that, for the same resource, I can use the mock endpoint to behave differently depending on input (or failing that, some kind of work around)? For example, say I have an…
user384842
  • 1,946
  • 3
  • 17
  • 24
2
votes
1 answer

Create Mock Service API using Apiary

I'm attempting to create mock api services for testing purposes. We are already using Apiary on another team so I'm starting there. So far, I've noticed that if I want to have two separate calls requires mocking out of both requests. For example to…
2
votes
2 answers

How to create nested schema?

Currently the Schema definition is not documented at all, the only resources i could find are these: http://support.apiary.io/knowledgebase/articles/147279-json-schema-validation https://github.com/apiaryio/api-blueprint/issues/112 but none of those…
gondo
  • 979
  • 1
  • 10
  • 29
2
votes
1 answer

Different request on same action with parameters

I want to search (say) "accounts" based on "name" or "status". So I would like to have two actions : GET /persons/?q=name==Jea* GET /persons/?q=status==locked How can I document that ? I tried an Action with multiples transactions : ### GET…
gervais.b
  • 2,294
  • 2
  • 22
  • 46