Newest apiblueprint Questions

Q&A for professional and enthusiast programmers

How can I set environment variables for dredd testing in a dredd.yml file?

I'm trying to run a number of api calls using dredd and api blueprint to test a site. I would like to run the tests on circleCI, as there are Selenium tests running in the same place. Each transaction ...

What is the best way to maintain API change-logs using API Blueprint?

Can anyone tell me what is the best way to maintain and communicate change-log to api consumer using api-blueprint? Preferably I don't want to use another 3rd party service like apichangelog to ...

How can I specify a shared Headers section across all Apiary/Blueprint API requests?

I have a large API document and each request has the same request headers like Accept: application/json and Cookies: SessionID. Is there a way I can declare these globally to avoid the duplication?

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 (...

Conditional parameters based on another parameter's value

What is the format for parameters if I have condition where some parameters can be changed based on another param's value. Eg: I have payment methods: paypal, bank transfer, etc. + amount (required, ...

Using generic named type in API Blueprint on Apiary.io

How can I use generic named type in my API Blueprint definition? I try like this: FORMAT: 1A HOST: http://test.com/ # API Blueprint testing. ## Resource [/resources] ### Action [GET] + Response ...

ApI blueprint Date format

I have problem understanding the following date formate from apiblueprint tutorial 2016-02-05T08:40:51.620Z I now 2016 is the year 02 is the month 05 is the date and 40:51 is the time but I dont ...

sailsjs waterline joins model many to many relationship issue

I am using sailjs and default localDiskDb. I have two models one is User and another one is Course. //api/models/User.js module.exports = { attributes: require('waterlock').models.user.attributes(...

Required parameters in apiary is not required

I'm triing to create my api with apiary (apiblueprint) but I always get 201 response when I send a post data to my endpoint. But endpoint requires some parameter, so when I send empty post I should ...

How to generate API html documentation from mocha BDD tests?

I worked on a project with Spring Boot java framework where guys automated API docs generation. Every time you run BDD/Integration style tests, there was api blue print file created out from mocha ...

How to import a file using apiary?

I want to browse a file from my system and want import it using apiray so how I can do that please help me into this.

Is there any way to send empty optional query parameters?

I'm writing documentation for API, and got problem. Here is link definition: ### Get hotels availability [GET /agent/v1/hotel/availability{?regions,hotels,from,to,limit,offset}] Parameters: + ...

Can I live reload styles, templates, and variables with Aglio?

I am unable to live-reload LESS and Jade files using Aglio's --server option or gulp paired with connect's livereload option and the gulp-aglio plugin. Is this due to caching? Or a limitation of ...

API Blueprint - Avoid repeating authorization blocks

In API Blueprint, how do I avoid using the same request Authorization header block over and over for every endpoint? + Request (application/json) + Headers Authorization: Bearer ...

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 ...

How to prohibit access to the API for non authorized users?

I'm using sails.js and I can use API to modify data in mongodb, for example create new user, modify users etc. How to prohibit access to the API for non authorized users?

API blueprint MSON to define valid Attribute values?

Consider this excerpt from https://github.com/apiaryio/mson#example-1 ... Example 1 A simple object structure and its associated JSON expression. MSON - id: 1 - name: A green door - price: 12.50 - ...

How to specify Content-Type of all responses once in API Blueprint?

In order to satisfy Dredd, I have to write this for every response in my API Blueprint document: + Response 201 (application/json; charset=utf-8) Is there a way to specify the media type ((...

Atom-Package atom-api-blueprint-preview fails to start

The package atom-api-blueprint-preview from https://github.com/danielgtaylor/atom-api-blueprint-preview fails to start. The installation works fine, aglio is installed globally. Every time I open ...

Create an API blueprint from entity specification

I'm building an API and I have modeled the entities I need inside it. By example User Name Email City Company Name Website I'm using Blueprint to specify the API itself and I need to create ...

API Blueprint - Use Data Strucutres in response, without Attributes

I'm using Apiary to mock out a new API. I'm trying to avoid having to write out all the JSON responses over and over again. If I do that using a + Attributes(user) then it will auto generate a bunch ...

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 ...

Mix Request/Response Body and Data Structures

I would like use aglio/api blueprint to create a nice documentation for our new API. The JSON might be quite big (with lots of optional values), so I'd like to give a proper use case in the body, but ...

Documenting Mutually Exclusive Query Parameters in API Blueprint

I'm documenting a public API that has a method named /findGuild that takes a mandatory key parameter and one of the following parameters: byPlayer byName It must have either byPlayer or byName; My ...

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 ...

How to reference an externally defined JSON Schema from a Apirary MSON file?

We are very interested in using Apiary and API Blueprints to define our system's APIs. All of our domain objects are already defined in external JSON-Schema files. Is there any way to refer to these ...

what are the advantages and dis-advantages of using swagger, RAML and API-blueprint [closed]

Swagger, RAML and API Blueprint all three are top specification formats for REST API's. I want to know which one is the best. I have gone through many blog posts, i am really confused which one i ...

Aglio generated documentation schema

Is there a way to pull the schema from aglio documentation into a seperate file? I want to use the schema generated by the documentation.

Describing an object with arbitrary keys and fixed-type values

How can I describe in MSON format a seasons object which has arbitrary keys, but its values are always of type array[Episode]? A sample of this object is: ... seasons: { 1: [ {...}, // ...

Nesting groups with apiblueprint

Hi I am trying to nest groups using api blueprint documentation does anyone know if there is a way that this is possible? I tried # group test ## group inner test and had no success.

Adding multiple parameters of the same name - apiary

Am I able to specify multiple query parameters with the same name? In the example below, I wish to register a domain with two different name servers. "## Register a domain [/domain/register{?...

How can I hit a local dev server from UI generated by apiary command line tool

I am using apiary preview --server to watch a file while editing it and have a UI generated. I would like to hit a local dev server in the "Try" section of the UI, but when I hit "Call Resource", a ...

How to specify an example for an object type in api-blueprint

Is it possible to specify an example value for 'bar' in type Baz in the following data structure? # Data Structures ## Foo (object) + arg0 (number, required) - the arg0 + arg1 (number, optional)...

Accept any value in POST JSON using API Blueprint

Is there any way to make POST request of API Blueprint to accept any value? Right now I have: ### Google [POST] Login with Google + token (string) - google token + Request (application/json) ...

Dredd can't find my API documentation, how do i tell it where it is if it's not on my local drive (it's on apiary.io server)

I am using the Dredd tool to test my API (which resides on apiary.io). Question I would like to provide dredd with a path to my documentation (it even asks for it), however my API doc is on apiary....

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 ...

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'...

How to document Webhooks in Apiary/API Blueprint

I'm just starting with api blueprint, using apiary to generate the docs for our api. We have both a REST api and a number of webhooks. The REST api is easy enough to create, but I can't figure out how ...

Explode / Collapse Data Structure for API Blueprint

Follow data structure # Data Structures ## Error (object) + code: E123 (required, string) - error code + message: User friendly description (optional, string) - User friendly description is ...

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.

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. ...

Mixed API Blueprint / MSON property

I'm trying to create a data structure object. There are two possible values to one of its properties but they are of mixed type. Some of the time, it may be a number, but some of the time it may be an ...

Is it a good/right practice to include large response in API Blueprint?

I am documenting my API and I want to include all the possible request and response body. But it is making my .md file too large. Is it a good practice?

How to Convert/rendered Blueprint doc to API

Is there any good tool available for rendering the blueprint document and showing in the API format? I even tried the Drafer ,Sublime Text Editor but no luck(very less/poor documents are available to ...

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)...

unable to render JSON/JSONSchema. Invalid member type of object in MSON definition

I have API documentation and suddenly without any changes it started throwing validation alert unable to render JSON/JSONSchema. Invalid member type of object in MSON definition at Response 200 (...

APIB - Always responding to a POST request, regardless of the request payload.

I'm trying to mock an API with the combination of Api Blueprint and Drakov. However, for one particular endpoint, I don't know beforehand what the request payload will be. See the below code. # Group ...

“Unknown visitor type” in npm package, protagonist

I am trying to convert my API Blueprints to a Postman collection through protagonist (and then through blueman), but when I use protagonist, I am getting the following result, no matter what I do. { ...

how can I describe a geojson with apiblueprint?

I want to add a MultiPoint as attribute in apiblueprint. this is an example: http://geojson.org/geojson-spec.html#id5 [[102.0, 0.0], [103.0, 1.0], [104.0, 0.0]] How can I describe this in ...

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 ...
Translating... 0%