Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #154 from vimeo/v4-dev
Browse files Browse the repository at this point in the history
v4
  • Loading branch information
erunion authored Jun 17, 2018
2 parents c92029e + 9f66ce0 commit b5a1c4e
Show file tree
Hide file tree
Showing 241 changed files with 16,877 additions and 6,854 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Packagist](https://img.shields.io/packagist/v/vimeo/mill.svg)](https://packagist.org/packages/vimeo/mill)
[![Travis CI](http://img.shields.io/travis/vimeo/mill.svg?style=flat)](https://travis-ci.org/vimeo/mill)

Mill is a PHP library for documenting a REST API with a small annotation DSL.
Mill is an annotation-based DSL for documenting a REST API.

It was built for automatically generating the [Vimeo API](https://developer.vimeo.com/api/endpoints) documentation
microsite, and can be compiled down into [API Blueprint](https://apiblueprint.org/) files.
Expand Down
4 changes: 3 additions & 1 deletion bin/mill
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// Ignore any user application issues with classes that they have that aren't strictly handled.
error_reporting(E_ALL & ~E_STRICT & ~E_WARNING);

ini_set('memory_limit', '4096M');

foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) {
if (file_exists($file)) {
require $file;
Expand All @@ -17,7 +19,7 @@ $version = PackageVersions\Versions::getVersion('ocramius/package-versions');

$application = new Application('Mill', $version);
$application->add(new Mill\Command\Changelog);
$application->add(new Mill\Command\Compile);
$application->add(new Mill\Command\ErrorMap);
$application->add(new Mill\Command\Generate);

$application->run();
72 changes: 39 additions & 33 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vimeo/mill",
"description": "A PHP library for documenting a REST API with a small annotation DSL.",
"description": "☴ An annotation-based DSL for documenting a REST API.",
"license": "MIT",
"authors": [
{
Expand All @@ -12,7 +12,7 @@
"email": "[email protected]"
}
],
"minimum-stability": "stable",
"minimum-stability": "RC",
"bin": ["bin/mill"],
"require": {
"php": ">=7.1.0",
Expand All @@ -24,13 +24,15 @@
"gossi/docblock": "^1.5",
"nicmart/string-template": "^0.1.1",
"ocramius/package-versions": "^1.1",
"symfony/console": "^3.2 || ^4.0"
"symfony/console": "^3.2 || ^4.0",
"symfony/yaml": "^2.0",
"cocur/slugify": "^3.1"
},
"require-dev": {
"league/flysystem-memory": "^1.0",
"squizlabs/php_codesniffer": "^3.0",
"vimeo/psalm": "^1.0",
"phpunit/phpunit": "^7.0"
"phpunit/phpunit": "^7.0",
"vimeo/psalm": "^2.0"
},
"suggest": {
"ext-xml": "Required for config file processing."
Expand All @@ -51,46 +53,50 @@
}
},
"scripts": {
"build-blueprints": [
"rm -rf resources/examples/Showtimes/blueprints",
"mkdir resources/examples/Showtimes/blueprints",
"./bin/mill generate --config=resources/examples/mill.xml resources/examples/Showtimes/blueprints/"
"build-docs-apiblueprint": [
"./bin/mill compile --config=resources/examples/mill.xml --format=apiblueprint resources/examples/Showtimes/compiled/"
],
"build-docs-openapi": [
"./bin/mill compile --config=resources/examples/mill.xml --format=openapi resources/examples/Showtimes/compiled/"
],
"build-changelogs": [
"./bin/mill changelog --config=resources/examples/mill.xml --private=false resources/examples/Showtimes/blueprints/",
"mv resources/examples/Showtimes/blueprints/changelog.md resources/examples/Showtimes/blueprints/changelog-public-only-all-capabilities.md",
"./bin/mill changelog --config=resources/examples/mill.xml --private=false resources/examples/Showtimes/compiled/",
"mv resources/examples/Showtimes/compiled/changelog.md resources/examples/Showtimes/compiled/changelog-public-only-all-vendor-tags.md",

"./bin/mill changelog --config=resources/examples/mill.xml --private=false --capability=BUY_TICKETS --capability=FEATURE_FLAG resources/examples/Showtimes/blueprints/",
"mv resources/examples/Showtimes/blueprints/changelog.md resources/examples/Showtimes/blueprints/changelog-public-only-matched-with-tickets-and-feature-capabilities.md",
"./bin/mill changelog --config=resources/examples/mill.xml --private=false --vendor_tag='tag:BUY_TICKETS' --vendor_tag='tag:FEATURE_FLAG' resources/examples/Showtimes/compiled/",
"mv resources/examples/Showtimes/compiled/changelog.md resources/examples/Showtimes/compiled/changelog-public-only-matched-with-tickets-and-feature-vendor-tags.md",

"./bin/mill changelog --config=resources/examples/mill.xml --private=false --capability=DELETE_CONTENT resources/examples/Showtimes/blueprints/",
"mv resources/examples/Showtimes/blueprints/changelog.md resources/examples/Showtimes/blueprints/changelog-public-only-matched-with-delete-capabilities.md",
"./bin/mill changelog --config=resources/examples/mill.xml --private=false --vendor_tag='tag:DELETE_CONTENT' resources/examples/Showtimes/compiled/",
"mv resources/examples/Showtimes/compiled/changelog.md resources/examples/Showtimes/compiled/changelog-public-only-matched-with-delete-vendor-tags.md",

"./bin/mill changelog --config=resources/examples/mill.xml resources/examples/Showtimes/blueprints/"
"./bin/mill changelog --config=resources/examples/mill.xml resources/examples/Showtimes/compiled/"
],
"build-errors": [
"./bin/mill errors --config=resources/examples/mill.xml --private=false resources/examples/Showtimes/blueprints/",
"mv resources/examples/Showtimes/blueprints/1.0/errors.md resources/examples/Showtimes/blueprints/1.0/errors-public-only-all-capabilities.md",
"mv resources/examples/Showtimes/blueprints/1.1/errors.md resources/examples/Showtimes/blueprints/1.1/errors-public-only-all-capabilities.md",
"mv resources/examples/Showtimes/blueprints/1.1.1/errors.md resources/examples/Showtimes/blueprints/1.1.1/errors-public-only-all-capabilities.md",
"mv resources/examples/Showtimes/blueprints/1.1.3/errors.md resources/examples/Showtimes/blueprints/1.1.3/errors-public-only-all-capabilities.md",
"./bin/mill errors --config=resources/examples/mill.xml --private=false resources/examples/Showtimes/compiled/",
"mv resources/examples/Showtimes/compiled/1.0/errors.md resources/examples/Showtimes/compiled/1.0/errors-public-only-all-vendor-tags.md",
"mv resources/examples/Showtimes/compiled/1.1/errors.md resources/examples/Showtimes/compiled/1.1/errors-public-only-all-vendor-tags.md",
"mv resources/examples/Showtimes/compiled/1.1.1/errors.md resources/examples/Showtimes/compiled/1.1.1/errors-public-only-all-vendor-tags.md",
"mv resources/examples/Showtimes/compiled/1.1.3/errors.md resources/examples/Showtimes/compiled/1.1.3/errors-public-only-all-vendor-tags.md",

"./bin/mill errors --config=resources/examples/mill.xml --private=false --capability=BUY_TICKETS --capability=FEATURE_FLAG resources/examples/Showtimes/blueprints/",
"mv resources/examples/Showtimes/blueprints/1.0/errors.md resources/examples/Showtimes/blueprints/1.0/errors-public-only-unmatched-capabilities.md",
"mv resources/examples/Showtimes/blueprints/1.1/errors.md resources/examples/Showtimes/blueprints/1.1/errors-public-only-unmatched-capabilities.md",
"mv resources/examples/Showtimes/blueprints/1.1.1/errors.md resources/examples/Showtimes/blueprints/1.1.1/errors-public-only-unmatched-capabilities.md",
"mv resources/examples/Showtimes/blueprints/1.1.3/errors.md resources/examples/Showtimes/blueprints/1.1.3/errors-public-only-unmatched-capabilities.md",
"./bin/mill errors --config=resources/examples/mill.xml --private=false --vendor_tag='tag:BUY_TICKETS' --vendor_tag='tag:FEATURE_FLAG' resources/examples/Showtimes/compiled/",
"mv resources/examples/Showtimes/compiled/1.0/errors.md resources/examples/Showtimes/compiled/1.0/errors-public-only-unmatched-vendor-tags.md",
"mv resources/examples/Showtimes/compiled/1.1/errors.md resources/examples/Showtimes/compiled/1.1/errors-public-only-unmatched-vendor-tags.md",
"mv resources/examples/Showtimes/compiled/1.1.1/errors.md resources/examples/Showtimes/compiled/1.1.1/errors-public-only-unmatched-vendor-tags.md",
"mv resources/examples/Showtimes/compiled/1.1.3/errors.md resources/examples/Showtimes/compiled/1.1.3/errors-public-only-unmatched-vendor-tags.md",

"./bin/mill errors --config=resources/examples/mill.xml --private=false --capability=DELETE_CONTENT resources/examples/Showtimes/blueprints/",
"mv resources/examples/Showtimes/blueprints/1.0/errors.md resources/examples/Showtimes/blueprints/1.0/errors-public-only-matched-capabilities.md",
"mv resources/examples/Showtimes/blueprints/1.1/errors.md resources/examples/Showtimes/blueprints/1.1/errors-public-only-matched-capabilities.md",
"mv resources/examples/Showtimes/blueprints/1.1.1/errors.md resources/examples/Showtimes/blueprints/1.1.1/errors-public-only-matched-capabilities.md",
"mv resources/examples/Showtimes/blueprints/1.1.3/errors.md resources/examples/Showtimes/blueprints/1.1.3/errors-public-only-matched-capabilities.md",
"./bin/mill errors --config=resources/examples/mill.xml --private=false --vendor_tag='tag:DELETE_CONTENT' resources/examples/Showtimes/compiled/",
"mv resources/examples/Showtimes/compiled/1.0/errors.md resources/examples/Showtimes/compiled/1.0/errors-public-only-matched-vendor-tags.md",
"mv resources/examples/Showtimes/compiled/1.1/errors.md resources/examples/Showtimes/compiled/1.1/errors-public-only-matched-vendor-tags.md",
"mv resources/examples/Showtimes/compiled/1.1.1/errors.md resources/examples/Showtimes/compiled/1.1.1/errors-public-only-matched-vendor-tags.md",
"mv resources/examples/Showtimes/compiled/1.1.3/errors.md resources/examples/Showtimes/compiled/1.1.3/errors-public-only-matched-vendor-tags.md",

"./bin/mill errors --config=resources/examples/mill.xml resources/examples/Showtimes/blueprints/"
"./bin/mill errors --config=resources/examples/mill.xml resources/examples/Showtimes/compiled/"
],
"build-resources": [
"composer build-blueprints",
"rm -rf resources/examples/Showtimes/compiled",
"mkdir resources/examples/Showtimes/compiled",
"composer build-docs-apiblueprint",
"composer build-docs-openapi",
"composer build-changelogs",
"composer build-errors"
],
Expand Down
Loading

0 comments on commit b5a1c4e

Please sign in to comment.