{"id":15091247,"url":"https://github.com/jfoclpf/get-openapi-examples","last_synced_at":"2026-02-21T04:01:11.448Z","repository":{"id":240569213,"uuid":"802982214","full_name":"jfoclpf/get-openapi-examples","owner":"jfoclpf","description":"Extract all possible paths present in openapi.yaml based on paths and the provided examples","archived":false,"fork":false,"pushed_at":"2024-05-20T17:55:34.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T02:26:19.998Z","etag":null,"topics":["openapi","openapi-spec","openapi-specification","openapi3"],"latest_commit_sha":null,"homepage":"","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/jfoclpf.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,"zenodo":null}},"created_at":"2024-05-19T19:27:47.000Z","updated_at":"2024-05-20T20:17:54.000Z","dependencies_parsed_at":"2025-05-29T19:42:00.200Z","dependency_job_id":"8320078b-8101-460c-bd17-05cafbcad11c","html_url":"https://github.com/jfoclpf/get-openapi-examples","commit_stats":null,"previous_names":["jfoclpf/paths-openapi-yaml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jfoclpf/get-openapi-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfoclpf%2Fget-openapi-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfoclpf%2Fget-openapi-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfoclpf%2Fget-openapi-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfoclpf%2Fget-openapi-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfoclpf","download_url":"https://codeload.github.com/jfoclpf/get-openapi-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfoclpf%2Fget-openapi-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T03:11:15.450Z","status":"ssl_error","status_checked_at":"2026-02-21T03:10:34.920Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["openapi","openapi-spec","openapi-specification","openapi3"],"created_at":"2024-09-25T10:36:41.624Z","updated_at":"2026-02-21T04:01:11.357Z","avatar_url":"https://github.com/jfoclpf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## get-openapi-examples\n### Extract all possible paths present in `openapi.yaml` based on paths and the provided examples\n\nThis might be useful, for example, for testing routes. It supports different types of [examples](https://swagger.io/docs/specification/adding-examples/), and variables may be in the path or in the query.\n\nIf you have a `openapi.yaml` file like this one, for example:\n\n```yaml\npaths:\n  /coordinates:\n    get:\n      operationId: getDataByCoordinates\n      summary: Get data by Coordinates in query\n      parameters:\n        - in: query\n          name: lat\n          schema:\n            type: string\n            example: '40.153687'\n          description: Latitude of the point\n        - in: query\n          name: lon\n          schema:\n            type: string\n            example: '-8.514602'\n          description: Longitude of the point\n\n  /district/{district}:\n    get:\n      operationId: getDistrict\n      summary: Data of Distrito\n      parameters:\n        - in: path\n          name: district\n          required: true\n          schema:\n            type: string\n          examples:\n            porto:\n              value: Porto\n              summary: District of Porto\n            lisbon:\n              value: Lisbon\n              summary: District of Lisbon\n\n  /district/{district}/altimetry:\n    get:\n      operationId: getDistrictAltimetry\n      summary: Altimetry of Distrito\n      parameters:\n        - in: path\n          name: district\n          required: true\n          schema:\n            type: string\n            example: Porto\n```\n\nThen:\n\n```js\nconst getOpenapiExamples = require('get-openapi-examples')\nconsole.log(getOpenapiExamples('/path/to/openapi.yaml'))\n/*\n[\n  '/coordinates?lat=40.153687\u0026lon=-8.514602',\n  '/district/Porto',\n  '/district/Lisbon',\n  '/district/Porto/altimetry'\n}\n*/\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfoclpf%2Fget-openapi-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfoclpf%2Fget-openapi-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfoclpf%2Fget-openapi-examples/lists"}