Newest apiblueprint Questions

Q&A for professional and enthusiast programmers

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

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

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.

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

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

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: [ {...}, // ...

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

Data structure with string only

I'm trying to create a Data Structure # Data Structures ## Incorrect Credentials (string) - `Insufficient privileges.` This is where it will be used: + Response 401 (application/vnd.api+json) ...

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

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

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

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

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

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

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

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

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

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

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

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?

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

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

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

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

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

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

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

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

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

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.

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.

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

In Aglio is it possible to run server from Node.js library?

When you are working with binary - you have such option: aglio -i input.apib -s But what if I need to do the same from js library? I checked the code and it looks for me that there is no such ...

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

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

array containing an object without using a data structure

I'm currently using the following. It works, but I'd like to bake it into one data structure. This means moving the status and title into the array somehow. Is this possible? ## Invalid Credentials ...

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

Adding root to API blueprint when using data structures

i have been trying for hours in trying to get this to work, been reading up on all the docs. I need e array to have a root (as per the json specification), while using the data structures i have ...

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

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

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

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

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

Can an API schema be a protocol?

With an API schema, I mean this: http://petstore.swagger.io/ The above is a schema for a pet store. But let's say that this schema becomes the go-to document for creating pet store APIs, would it be ...

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