Skip to content

Instantly share code, notes, and snippets.

View ossobuffo's full-sized avatar

Daniel Johnson ossobuffo

View GitHub Profile
@ossobuffo
ossobuffo / SmartDocs2OpenAPI.php
Last active June 25, 2019 15:25
Script to convert SmartDocs export JSON to OpenAPI JSON
<?php
/**
* SmartDocs2OpenAPI
*
* @author danielejohnson@google.com
*
* IMPORTANT: Apigee and Google do not offer support for this script. It is
* only provided to customers as a courtesy.
*
* This script takes the output of a SmartDocs model export, and attempts to
@ossobuffo
ossobuffo / build-aliases.php
Last active August 29, 2015 14:06
Workaround for Pantheon site-aliases timeouts
<?php
/*
* Solves the timeout problem when the user is a "Team" member of too many
* Pantheon sites. In that case, when running
* drush pantheon-aliases
* you may encounter a timeout on the Terminus server, and your aliases file
* will not be updated.
*
* In this workaround, we leverage Terminus's API to fetch this info in smaller
* chunks. A side benefit is that we can now get aliases for all sites in our