Instantly share code, notes, and snippets.

View http2-comparison.md
View stuff.md
  1. Retrieve WeatherReport where address is Anchorage, Alaska
  2. Send Payment where the recipient is https://keybase.io/phil and currency is USD and amount is 40
  3. Send Message where the recipient is https://keybase.io/phil and text is Hey Phil ...
View schemaUtils.js
'use strict';
/**
* This module extends the graphql.js schema and types by adding diff and merge functions.
*/
(function () {
const GraphQLSchema = require('graphql/type/schema').GraphQLSchema,
GraphQLObjectType = require('graphql/type/definition').GraphQLObjectType,
GraphQLScalarType = require('graphql/type/definition').GraphQLScalarType,
GraphQLUnionType = require('graphql/type/definition').GraphQLUnionType,
View client.rb
# Using a terms from schema.org dictionary,
# find services that offers WeatherForecast.
services = apiRegistry.find(WeatherForecast, { vocabulary: "http://schema.org"})
# Query a service for WeatherForecast at GeoCoordinates.
forecast = service.retrieve(WeatherForecast, { GeoCoordinates: … })
# Display Temperature
print forecast(Temperature)
View keybase.md

Keybase proof

I hereby claim:

  • I am zdne on github.
  • I am zdenek (https://keybase.io/zdenek) on keybase.
  • I have a public key whose fingerprint is AAB0 458B 4299 95C4 5C9F 0CE0 1205 3F7F C8E6 F7A4

To claim this, I am signing this object:

View fizzbuzz.apib
# Fizz Buzz Solving API Blueprint
## Data Structures
## Main (array)
This only does 1 through 15.
### Members
- !map
- (array)
View collection.apib
# User [/users/{id}]
- Attributes (object)
- name: John
- email: john@apiary.io
## Retrieve [GET]
- Response 200 (application/json)
- Attributes (User)
## Remove [DELETE]
View version.apib
# API
## Globals Parameters
- version: 1.0 (string) - Version of the API
# Resource A [/{version}/some/path/to/a]
# Resource B [/{version}/some/path/to/b]
View MSON.apib
# Data Document
This document contains a description of a data.
# Data Structures
## Some Data (object)
- name: Z (string) - Good old name.
View gist:5f8295642af18aff27ec

Working with multiple blueprint files

This document describes 4 different solutions to work APIs that consist of multiple blueprint files. Every of this solution work with all Apiary.io features but editing. To edit a blueprint you have to do it outside of Apiary as Apiary editor does not support working with multiple files. In other words if you are using one of the solutions below avoid editing the blueprint in Apiary.

1. Hercule

Hercule is a CLI tool written in Node.js – available as an NPM package. It uses markdown referencing and linking syntax to transclude other files into a blueprint file. This solution is universal and would work with any Markdown files not just API Blueprint.

The major benefit – unlike any other solutions here – is also that the references are rendered as HTML links in any Markdown editor so the result is HTML that can be browsed!