{"id":18979062,"url":"https://github.com/orangewise/rotan","last_synced_at":"2026-05-02T05:42:45.752Z","repository":{"id":138671709,"uuid":"61538995","full_name":"orangewise/rotan","owner":"orangewise","description":"bamboo test utils","archived":false,"fork":false,"pushed_at":"2018-10-07T07:59:50.000Z","size":191,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T09:03:53.679Z","etag":null,"topics":["coveralls-badge","openapi","swagger","tape","travis-badge"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orangewise.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-20T10:28:41.000Z","updated_at":"2018-10-07T07:59:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2a034a1-f0c5-461f-a986-d5f55780b141","html_url":"https://github.com/orangewise/rotan","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangewise%2Frotan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangewise%2Frotan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangewise%2Frotan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangewise%2Frotan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orangewise","download_url":"https://codeload.github.com/orangewise/rotan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239985712,"owners_count":19729512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coveralls-badge","openapi","swagger","tape","travis-badge"],"created_at":"2024-11-08T15:41:02.210Z","updated_at":"2026-04-11T08:30:19.610Z","avatar_url":"https://github.com/orangewise.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"rotan\n=====\n\n[![npm version][npm-badge]][npm-url]\n[![Build Status][travis-badge]][travis-url]\n[![Coverage Status][coveralls-badge]][coveralls-url]\n[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n\nRotan is a small command line utility to easily test your artifacts (in Bamboo :). It can output tap or xunit reports.\n\nCurrently you can do the following:\n\n  - test if your [OpenAPI](https://openapis.org) or [Swagger](http://swagger.io) files are valid\n  - test if your JSON/YAML is conform a [JSON schema](http://json-schema.org)  \n  - run a custom tape test\n\n\n# Installation\n\n```\nnpm install rotan\n```\n\n## Getting help\n\n- `rotan -h`\n- `rotan openapi -h`\n- `rotan json -h`\n- `rotan js -h`\n\n\n# Examples\n\n## Validate your OpenAPI or Swagger files\n\ntap output:\n\n```\nrotan openapi openapi-definition.json\n\nTAP version 13\n# Parse file openapi-definition.json\nok 1 Valid swagger file\n\n1..1\n# tests 1\n# pass  1\n\n# ok\n```\n\nxunit reporting:\n\n```\nrotan openapi openapi-definition.json -x\n\n\u003c?xml version=\"1.0\"?\u003e\n\u003ctestsuites\u003e\n  \u003ctestsuite name=\"Parse file use-rotan-swagger.json\" tests=\"1\" failures=\"0\" errors=\"0\"\u003e\n    \u003ctestcase name=\"#1 Valid swagger file\"/\u003e\n  \u003c/testsuite\u003e\n\u003c/testsuites\u003e\n```\n\n## Validate a JSON/YAML file with a JSON schema\n\n```\nrotan json schema.json swagger.json\n\nTAP version 13\n# Structure of input file should conform to the schema\nok 1 swagger.json is valid\nok 2 schema.json is valid JSON\nok 3 swagger.json is conform schema.json\n\n1..3\n# tests 3\n# pass  3\n\n# ok\n```\n\n```\nrotan json schema.json swagger.json -x\n\n\u003c?xml version=\"1.0\"?\u003e\n\u003ctestsuites\u003e\n  \u003ctestsuite name=\"Structure of iput file should conform to the schema\" tests=\"3\" failures=\"0\" errors=\"0\"\u003e\n    \u003ctestcase name=\"#1 swagger.json is valid\"/\u003e\n    \u003ctestcase name=\"#2 schema.json is valid JSON\"/\u003e\n    \u003ctestcase name=\"#3 swagger.json is conform schema.json\"/\u003e\n  \u003c/testsuite\u003e\n\u003c/testsuites\u003e\n```\n\n```\n# inject snippets into your openapi before validating\nrotan json schema.json swagger.yaml -i 'snippets/*.yaml'\nTAP version 13\n# Structure of input file should conform to the schema\nok 1 swagger.yaml is valid\nok 2 schema.json is valid JSON\nok 3 swagger.yaml is conform schema.json\n\n1..3\n# tests 3\n# pass  3\n\n# ok\n```\n\n\n\n## Custom tape test\n\nCreate your [tape](https://www.npmjs.com/package/tape) tests like this:\n\n```\n// tests.js\nexports.test = function (options) {\n  var test = options.tape.createHarness()\n  var stream = test.createStream()\n\n  test('it should return ok', function (t) {\n    t.plan(1)\n    t.ok(true, 'looking good')\n  })\n\n  return stream\n}\n```\n\nThen run it like this:\n\n\n```\nrotan js tests.js\n\nTAP version 13\n# it should return ok\nok 1 looking good\n\n1..1\n# tests 1\n# pass  1\n\n# ok\n```\n\nor\n\n```\nrotan js tests.js -x\n\n\u003c?xml version=\"1.0\"?\u003e\n\u003ctestsuites\u003e\n  \u003ctestsuite name=\"it should return ok\" tests=\"1\" failures=\"0\" errors=\"0\"\u003e\n    \u003ctestcase name=\"#1 looking good\"/\u003e\n  \u003c/testsuite\u003e\n\u003c/testsuites\u003e\n```\n\n\n[npm-badge]: https://badge.fury.io/js/rotan.svg\n[npm-url]: https://badge.fury.io/js/rotan\n[travis-badge]: https://travis-ci.org/orangewise/rotan.svg?branch=master\n[travis-url]: https://travis-ci.org/orangewise/rotan\n[coveralls-badge]: https://coveralls.io/repos/github/orangewise/rotan/badge.svg?branch=master\n[coveralls-url]: https://coveralls.io/github/orangewise/rotan?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forangewise%2Frotan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forangewise%2Frotan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forangewise%2Frotan/lists"}