apiary.io

Represent File Uploads in API Blueprints

喜你入骨 提交于 2020-01-04 03:53:13
问题 We have an API end point where an image file can be uploaded along with the name of the file (a string) as well as a description (string). Apiary / API Blueprints won't allow me to have something like: + Request (multipart/form-data) + Headers Authorization: [key] + Attributes + name (string, required) - A human-readable name of the Catalog Item + description (string, optional) - A human readable description of the Catalog Item + image (file, optional) - An image file corresponding to the

Apiary: Export API as JSON, to generate client code

拜拜、爱过 提交于 2020-01-03 09:12:22
问题 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 help: http://ttezel.github.io/blog/2013/02/23/stop-writing-rest-api-clients/ 回答1: There are two directions you can explore: you can use Alpaca to generate client SDKs. Alpaca accepts API Blueprint as one of it's input formats for more flexibility, you can use

MSON to describe object attributes in blueprint

女生的网名这么多〃 提交于 2019-12-23 02:31:20
问题 I have an issue similar to what is described here. I have a JSON that looks like this: { "photos": [ { "key": "y37dmj10jkwof/moOIUB8912JKVgh", "caption": "A world of gamers.", "tags": [ "game", "japan" ], "attributes": { "copyright": true, "use": [ "public", "private" ] } } ] } and I am trying to describe the attributes using MSON, to render the blueprint. However, I am not successful at it. Here is my attempt: + Attributes (required, object) + photos (required, array) + (object) + key

AngularJS and Apiary.IO - can't read any response headers?

给你一囗甜甜゛ 提交于 2019-12-21 19:57:19
问题 I mocking my API using Apiary.io. But somehow I cannot read any headers from response object using angularJS. And I am sure i have at least Content-Type: application/json correctly set-up by checking in firebug. Code in Angular should read headers correctly too as i can print them when sending request to somewhere else than apiary.io... $http.get('http://ies.apiary.io/some').then(function(response) { console.log("ok",response.headers('Content-Type')); },function(response){console.log("err"

Adding headers when using httpClient.GetAsync

為{幸葍}努か 提交于 2019-12-17 06:31:14
问题 I'm implementing an API made by other colleagues with Apiary.io, in a Windows Store app project. They show this example of a method I have to implement: var baseAddress = new Uri("https://private-a8014-xxxxxx.apiary-mock.com/"); using (var httpClient = new HttpClient{ BaseAddress = baseAddress }) { using (var response = await httpClient.GetAsync("user/list{?organizationId}")) { string responseData = await response.Content.ReadAsStringAsync(); } } In this and some other methods, I need to have

Unable to update a Power BI table schema through the API with or without ApiaryIO

ε祈祈猫儿з 提交于 2019-12-13 07:44:16
问题 I am using Power BI API. I've got a dataset with some tables and rows. From Power BI API Console I don't have any issue when retrieving datasets or tables. However the PUT verb on a table resource to update its schema always returns a 504 - Proxy request timed out It's the first time I use Apiary IO so it might be its problem and not Power BI update, but that leads me to some questions: Is there any workaround to test Power BI with, for example, Fiddler? I can type the url and body but I will

How to add API version to Apiary Mock Server

与世无争的帅哥 提交于 2019-12-12 21:29:42
问题 Is there any way to add API version to Apiary Mock Server? Ex.: http://private-XXXXX-apiname.apiary-mock.com/ v1 /mocks/1?school_id=1 回答1: Yes, when declaring HOST , you can append suffix to it and that is then propagated as prefix to all resources: FORMAT: 1A HOST: http://api.example.tld/v1/ 来源: https://stackoverflow.com/questions/30245487/how-to-add-api-version-to-apiary-mock-server

Repeating a MSON data structure with different values

☆樱花仙子☆ 提交于 2019-12-10 11:44:06
问题 I have many places in my API where I will need to describe a list of objects. Each object has the same keys / structure but different values. How can I tweak the values of each instance of some data structure while retaining all the original type, description, etc of the original structure? for example if I had the following data structure Restaurant # Data Structures ## Restaurant (object) + restaurant_name: McDonald's (string, required) - The name of this restaurant + years_of_operation: 54

Is it possible to center tables in a markdown file?

做~自己de王妃 提交于 2019-12-09 02:13:45
问题 I have a table: | This | Is | A | Table | | :--- | -- | - | ----: | | foo | ba | r | elbaT | I'd like the table to display in the center of my Markdown file instead of left-aligned. I am not trying to align text, but the entire table itself. Do I need to resort to HTML/CSS to achieve what I want? This is for an Apiary.io project. 回答1: If you use the standard documentation, use the <center> tag like so. Blueprint FORMAT: 1A HOST: http://www.google.com # Tables Notes API is a *short texts

Specify description for every response we have in Apiary.io

谁都会走 提交于 2019-12-07 03:01:31
问题 Is it possible to specify description for every response to some request? Suppose, we have a request ### Retrieve resource [GET] + Headers If-None-Match: "Version1" And 2 responses + Response 200 (application/xml) + Headers ETag: "Version2" + Body <Xml> <A> <B /> <C /> </A> </Xml> + Response 304 (application/xml) What I would like is to specify description like here (please note comments right under + Response lines): + Response 200 (application/xml) In case if the resource hasn't changed +