Newest apiblueprint Questions

Q&A for professional and enthusiast programmers

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

Wrapping Data Structure in a data key API Blueprint / Apiary

So let's say I have a 200 response which body should be: { "data": [ { "id": 1, "title": "Activity 1" }, { "id": 1, "title": "Activity 2" } ] } I have ...

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

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

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

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

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

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

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

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

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

Is there any json schema like a excel table in Api Blueprint MSON?

Is there any json schema like a excel table in Api Blueprint MSON ? I am designing some api between several clients. So I need api documentation tool that can present as easy readable format. I ...

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.

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?

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

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.

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

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

Generating Spring Boot app from APIBlueprint

Are there any tools you guys recommend to generate SpringBoot application from an API blueprint? Thanks, Ram

Rendering attributes on aglio?

I'm new to aglio I was trying to render attributes for my documentation, but it does not work. ## Modify User [/users/{id}.json?{token}=API_TOKEN] Modify any accessible fields if authorized ### ...

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

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

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

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

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?

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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