Skip to content

Instantly share code, notes, and snippets.

@norbertpotocki
Last active March 29, 2016 00:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norbertpotocki/9bb6ca3b3fd6a84b2153 to your computer and use it in GitHub Desktop.
Save norbertpotocki/9bb6ca3b3fd6a84b2153 to your computer and use it in GitHub Desktop.
assemble-single-spec-file:
description: Assembles a single YAML spec file from partial files
command: node swagger-spec-assembler.js > api-spec.yaml
create-documentation-pull-request:
description: Create a PR against the documentation repository
command:
export GIT_BRANCH=update-from-specs-`date +%Y-%m-%-d-%H-%M`
&& git clone git@git.mydomain.com:MyService/documentation.git
&& cd documentation
&& git branch $GIT_BRANCH
&& git checkout $GIT_BRANCH
&& cp ../api-spec.yaml api-docs/api-spec.yaml
&& git add -u
&& git commit -m "auto-generated API documentation"
&& git push origin $GIT_BRANCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment