{"id":16966140,"url":"https://github.com/mermade/openapi-filter","last_synced_at":"2025-04-04T08:10:00.483Z","repository":{"id":23472923,"uuid":"99120783","full_name":"Mermade/openapi-filter","owner":"Mermade","description":"Filter internal paths, operations, parameters, schemas etc from OpenAPI/Swagger/AsyncAPI definitions","archived":false,"fork":false,"pushed_at":"2024-07-31T07:54:02.000Z","size":284,"stargazers_count":160,"open_issues_count":9,"forks_count":33,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-28T07:09:07.368Z","etag":null,"topics":["asyncapi","filter","internal","openapi","openapi3","swagger"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mermade.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2017-08-02T13:42:57.000Z","updated_at":"2025-02-25T22:33:51.000Z","dependencies_parsed_at":"2024-01-25T19:05:25.319Z","dependency_job_id":"a8cf19ee-8bb0-44b7-a723-051e1062381f","html_url":"https://github.com/Mermade/openapi-filter","commit_stats":{"total_commits":127,"total_committers":16,"mean_commits":7.9375,"dds":0.4330708661417323,"last_synced_commit":"a738d1da5275bf60514206bc94bd1c18d80d55e9"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mermade%2Fopenapi-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mermade%2Fopenapi-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mermade%2Fopenapi-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mermade%2Fopenapi-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mermade","download_url":"https://codeload.github.com/Mermade/openapi-filter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142074,"owners_count":20890653,"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":["asyncapi","filter","internal","openapi","openapi3","swagger"],"created_at":"2024-10-14T00:04:46.478Z","updated_at":"2025-04-04T08:10:00.452Z","avatar_url":"https://github.com/Mermade.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openapi-filter\n\n![ci](https://github.com/Mermade/openapi-filter/workflows/ci/badge.svg)\n\nFilter internal paths, operations, parameters, schemas etc from OpenAPI/Swagger/AsyncAPI definitions.\n\nSimply flag any object within the definition with an `x-internal` specification extension, and it will be removed from the output.\n\nFor example:\n\n```yaml\nopenapi: 3.0.0\ninfo:\n  title: API\n  version: 1.0.0\npaths:\n  /:\n    get:\n      x-internal: true\n      ...\n```\n\nWorks with OpenAPI/Swagger 2.0 and 3.0.x and AsyncAPI definitions.\n\n```\nopenapi-filter.js \u003cinfile\u003e [outfile]\n\nPositionals:\n  infile   the input file\n  outfile  the output file\n\nOptions:\n\n  --info           include complete info object with --valid           [boolean]\n  --inverse, -i    output filtered elements only                       [boolean]\n  --flags, -f      flags to filter by          [array] [default: [\"x-internal\"]]\n  --flagValues, -v flag String values to match             [array] [default: []]\n  --checkTags      filter if flags given in --flags are in the tags array\n                                                                       [boolean]\n  --overrides, -o  prefixes used to override named properties[arr] [default: []]\n  --valid          try to ensure inverse output is valid               [boolean]\n  --strip, -s      strip the flags from the finished product           [boolean]\n  --servers        include complete servers object with --valid        [boolean]\n  --lineWidth, -l  max line width of yaml output           [number] [default: 0]\n  --maxAliasCount  maximum YAML aliases allowed          [number] [default: 100]\n  --configFile     The file \u0026 path for the filter options                 [path]\n  --help           Show help                                           [boolean]\n  --verbose        Output more details of the filter process             [count]\n```\n\nuse `--` to separate flags or other array options from following options, i.e.:\n\n`openapi-filter --flags x-private x-hidden -- source.yaml target.yaml`\n\nor\n\n```javascript\nlet openapiFilter = require('openapi-filter');\nlet options = {}; // defaults are shown\n//options.inverse = false;\n//options.valid = false;\n//options.flags = ['x-internal'];\nlet res = openapiFilter.filter(obj,options);\n```\n\nSee the [wiki](https://github.com/Mermade/openapi-filter/wiki) for further examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmermade%2Fopenapi-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmermade%2Fopenapi-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmermade%2Fopenapi-filter/lists"}