Questions tagged [apiary]

Next generation platform for building and using REST APIs.

136 questions
298
votes
7 answers

How do I send a JSON string in a POST request in Go

I tried working with Apiary and made a universal template to send JSON to mock server and have this code: package main import ( "encoding/json" "fmt" "github.com/jmcvetta/napping" "log" "net/http" ) func main() { url :=…
Ladislav Prskavec
  • 3,421
  • 2
  • 15
  • 15
12
votes
1 answer

Trying to describe the request and response using Data Structures in API Blueprint

I'm trying to document an endpoint with API Blueprint, using the new Attributes and DataStructures sections of the spec. My request payload looks like this: { "url": "http://requestb.in/11v7i7e1", "active": true, "types": [ { …
Piotr Zurek
  • 2,583
  • 1
  • 23
  • 32
11
votes
1 answer

What is the correct format for denoting that an input parameter is a date/time in Apiary?

I am editing some Apiary documentation on a project I am working on, and need to denote that a parameter to one of my API calls is a datetime string. Apiary seems to be choking on the formatting of this parameter, so I'm wondering what the…
Chris
  • 3,693
  • 4
  • 21
  • 30
11
votes
2 answers

Apiary.io - multiple responses (200) with different parameters

I am trying to get different responses passing different parameters but something is not working. This is my API: ## Question [/questions/{question_id}] A Question object has the following attributes: + Parameters + question_id: `1` (number,…
MeV
  • 3,337
  • 8
  • 33
  • 74
9
votes
2 answers

How To Show Nested Attribute Definition In Apiary.io

I have a data structure defined as follows: # Data Structures ## PlayerRank (object) Represents the minimum amount of data the the client needs to send to give rank information about a particular Player in a particular Played Game. + playerId…
jakejgordon
  • 3,778
  • 6
  • 31
  • 43
9
votes
1 answer

Apiary multiple blueprint file into one api

Hi I am using Apiary to maintain a documentation for my REST API, as our code base is growing our API documentation is getting bigger and bigger. It is becoming very difficult to put all our API inside the single blueprint file, is there any way we…
Muhammad Raihan Muhaimin
  • 4,923
  • 7
  • 39
  • 61
9
votes
2 answers

How can I change the ownership of an API Doc in apiary.io?

What I want is change the main email associated with an API Doc, so when I share the doc with others people they see that new email and not the mine. That new email have an apiary.io, that is why I'm talking about ownership transferring.
user1785721
9
votes
2 answers

Apiary: Is it possible to document what JSON response fields are?

I would like to document what the actual JSON fields themselves represent. I have documented the GET statement, and parameters but this does not make a complete documentation to give to users. So, in the example below how would I add a comment about…
Menelaos
  • 20,773
  • 14
  • 71
  • 130
8
votes
2 answers

How to provide example value to a Response Body of content-type: text/html in Swagger (to test with dredd)

I have an API call which responds 200 OK and returns an HTML. I would like to add this to my API documentation (especially since i validate it using dredd and unless i provide it with the expected response body the test fails). How would i do this…
Shachar R
  • 261
  • 2
  • 7
8
votes
1 answer

Apiary: Export API as JSON, to generate client code

We all know that apiary rocks (or not.. I think it does), and I was wondering what would it take to take it a step further allow users to export a JSON description of the API? (So developers can script client code generation) This should…
Mazyod
  • 21,361
  • 9
  • 86
  • 147
6
votes
2 answers

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 search through Apiary documentation and the API…
David
  • 1,959
  • 20
  • 22
6
votes
1 answer

Use pattern in API Blueprint / MSON

I'm investigating the possibilities of the new Data Structures syntax in API Blueprint, especially MSON. Is it possible to attach or rather specify something like a pattern (regex)? Don't found anything on this topic.
loxy
  • 283
  • 2
  • 9
6
votes
2 answers

How to depict sessions in api blueprint format?

I am currently trying to depict a existing API with apiary.io. The system implements authentication via a login request that returns a http-cookie containing a session-id. As far as I know it is standard that a browser sends all http-cookies he…
Florian Loch
  • 789
  • 5
  • 12
5
votes
2 answers

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 jsonWebToken Is there a way to template this in a…
Drew Baker
  • 13,308
  • 12
  • 50
  • 90
5
votes
1 answer

Does Apiary.io and/or API Blueprint support api versioning?

Does api blueprint or Apiary.io support the notion of versioning your API? In particular, I'm versioning my API via the URI like this: GET /api/v2/SomeResource/ In the example above, this means I'm calling version 2 ("v2") of the API. Does api…
jakejgordon
  • 3,778
  • 6
  • 31
  • 43
1
2 3
9 10