{"id":15706657,"url":"https://github.com/danielgtaylor/mateo","last_synced_at":"2026-03-12T19:35:23.638Z","repository":{"id":136300934,"uuid":"72503683","full_name":"danielgtaylor/mateo","owner":"danielgtaylor","description":"A simple API description interface library","archived":false,"fork":false,"pushed_at":"2017-02-22T17:01:18.000Z","size":40,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T18:58:18.624Z","etag":null,"topics":[],"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/danielgtaylor.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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-11-01T04:25:02.000Z","updated_at":"2017-05-24T17:07:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"c931c8a1-4175-444d-92c0-7af2ea10a8cc","html_url":"https://github.com/danielgtaylor/mateo","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/danielgtaylor/mateo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fmateo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fmateo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fmateo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fmateo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielgtaylor","download_url":"https://codeload.github.com/danielgtaylor/mateo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgtaylor%2Fmateo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30440010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-03T20:26:03.988Z","updated_at":"2026-03-12T19:35:23.614Z","avatar_url":"https://github.com/danielgtaylor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mateo API Description Library\n\nThis project aims to provide a user-friendly interface to various API description formats, like Open API (Swagger) and API Blueprint, to efficiently build cross-format tools using common sense components. The overwhelming majority of use cases involve reading an API description and taking some (read-only) action:\n\n- Generating documentation\n- Generating server or client code\n- Running a mock server\n- Running automated tests\n- Checking for errors / validation\n\nTo support these use cases while remaining simple, this library is read-only and cannot be used to edit an API description. This means it is purely a library to consume API description formats and cannot be used to convert between formats. The goals of this library are:\n\n- Be *useful* to developers\n- Be *straightforward* to use\n- Be *convenient* whenever possible\n- Be built on *existing popular standards* whenever possible\n- Be built with *real world use cases* in mind\n\nCurrently supported API formats:\n\n* [Swagger 2.0](http://swagger.io/specification/)\n* [API Blueprint](https://apiblueprint.org/) with support for [Hercule transclusion](https://github.com/jamesramsay/hercule)\n\nDue to the nature of various API description formats supporting different features, this library will attempt to massage various pieces to fit into common sense components without losing too much in translation. If you need 100% 1:1 accuracy, you may be better off parsing the format of your choice manually.\n\n**Note**: This library is built using modern Javascript functionality without a transpiler, and thus requires either a recent Node.js version (6.0+) or to be run through a transpiler (e.g. Webpack + Babel for usage in a browser) before being used.\n\n## Library Usage\n\nThe Mateo API description library can be installed via `npm`:\n\n```bash\nnpm install --save mateo\n```\n\nOnce installed, you can easily parse any supported API format:\n\n```js\nimport Mateo from 'mateo';\n\n// Usage via callbacks\nMateo.parse('...', (err, api) =\u003e {\n  if (err) {\n    console.log(err);\n    return;\n  }\n\n  console.log(api);\n});\n\n// Usage via promises\nMateo.parse('...').then((api) =\u003e {\n  console.log(api);\n}).catch((err) =\u003e {\n  console.log(err);\n})\n```\n\n## Library Documentation\n\n### `Mateo`\n\n#### `Mateo.parse(apiDescription, [options], [done])`\n\nParse an API description from a `string`. The `api` is an `Api` instance. If no callback `done` function is given, then the promise-based interface is used and a promise is returned.\n\n```js\nconst options = {\n  filename: 'foo.yaml'\n};\n\nMateo.parse('...', options, (err, api) =\u003e { /* ... */ });\n```\n\n#### `Mateo.parseFile(filename, [done])`\n\nParse an API description from a file. The `api` is an `Api` instance.\n\n```js\nMateo.parseFile('.../file.yaml', (err, api) =\u003e { /* ... */ });\n```\n\n### TODO\n\nMore documentation coming soon.\n\n# License\n\nhttps://dgt.mit-license.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielgtaylor%2Fmateo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielgtaylor%2Fmateo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielgtaylor%2Fmateo/lists"}