All Projects → Mermade → openapi-filter

Mermade / openapi-filter

Licence: BSD-3-Clause license
Filter internal paths, operations, parameters, schemas etc from OpenAPI/Swagger/AsyncAPI definitions

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to openapi-filter

Generators
API Generator - instantly generate REST and GraphQL APIs (openapi (OAS) 3.0.0)
Stars: ✭ 213 (+90.18%)
Mutual labels:  openapi, openapi3
openapi-viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 85 (-24.11%)
Mutual labels:  openapi, openapi3
Openapi Codegen
OpenAPI 3.0 CodeGen plus Node.js minus the Java and emojis
Stars: ✭ 224 (+100%)
Mutual labels:  openapi, openapi3
Openapi Directory
🌐 Wikipedia for Web APIs. Directory of REST API definitions in OpenAPI 2.0/3.x format
Stars: ✭ 2,635 (+2252.68%)
Mutual labels:  openapi, openapi3
oaie-sketch
OpenAPI Visual Editor
Stars: ✭ 54 (-51.79%)
Mutual labels:  openapi, openapi3
Redoc
📘 OpenAPI/Swagger-generated API Reference Documentation
Stars: ✭ 15,935 (+14127.68%)
Mutual labels:  openapi, openapi3
Mockoon
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
Stars: ✭ 3,448 (+2978.57%)
Mutual labels:  openapi, openapi3
Routing Controllers Openapi
Runtime OpenAPI v3 schema generation for routing-controllers.
Stars: ✭ 170 (+51.79%)
Mutual labels:  openapi, openapi3
OpenAPI
A pharo implementation of OpenAPI 3.0.1
Stars: ✭ 20 (-82.14%)
Mutual labels:  openapi, openapi3
openapi-boilerplate
📘 Multi-file boilerplate for Open API Specification
Stars: ✭ 280 (+150%)
Mutual labels:  openapi, openapi3
Swaggerprovider
F# generative Type Provider for Swagger
Stars: ✭ 201 (+79.46%)
Mutual labels:  openapi, openapi3
aws2openapi
Amazon Web Services API description to OpenAPI 3.0 definition
Stars: ✭ 45 (-59.82%)
Mutual labels:  openapi, openapi3
Openapi Mock
OpenAPI mock server with random data generation
Stars: ✭ 202 (+80.36%)
Mutual labels:  openapi, openapi3
Openapi Diff
Utility for comparing two OpenAPI specifications.
Stars: ✭ 208 (+85.71%)
Mutual labels:  openapi, openapi3
Swagger Node Codegen
An OpenAPI 3.x/Swagger 2 code generator for Node.js
Stars: ✭ 189 (+68.75%)
Mutual labels:  openapi, openapi3
Spot
Spot is a concise, developer-friendly way to describe your API contract.
Stars: ✭ 230 (+105.36%)
Mutual labels:  openapi, openapi3
Openapi Spec Validator
OpenAPI Spec validator
Stars: ✭ 161 (+43.75%)
Mutual labels:  openapi, openapi3
Openapi Psr7 Validator
It validates PSR-7 messages (HTTP request/response) against OpenAPI specifications
Stars: ✭ 168 (+50%)
Mutual labels:  openapi, openapi3
Full Stack Fastapi Couchbase
Full stack, modern web application generator. Using FastAPI, Couchbase as database, Docker, automatic HTTPS and more.
Stars: ✭ 243 (+116.96%)
Mutual labels:  openapi, openapi3
specifications-ITS-REST
openEHR REST API Specifications
Stars: ✭ 20 (-82.14%)
Mutual labels:  openapi, openapi3

openapi-filter

ci

Filter internal paths, operations, parameters, schemas etc from OpenAPI/Swagger/AsyncAPI definitions.

Simply flag any object within the definition with an x-internal specification extension, and it will be removed from the output.

For example:

openapi: 3.0.0
info:
  title: API
  version: 1.0.0
paths:
  /:
    get:
      x-internal: true
      ...

Works with OpenAPI/Swagger 2.0 and 3.0.x and AsyncAPI definitions.

openapi-filter.js <infile> [outfile]

Positionals:
  infile   the input file
  outfile  the output file

Options:

  --info           include complete info object with --valid           [boolean]
  --inverse, -i    output filtered elements only                       [boolean]
  --flags, -f      flags to filter by          [array] [default: ["x-internal"]]
  --flagValues, -v flag String values to match             [array] [default: []]
  --checkTags      filter if flags given in --flags are in the tags array
                                                                       [boolean]
  --overrides, -o  prefixes used to override named properties[arr] [default: []]
  --valid          try to ensure inverse output is valid               [boolean]
  --strip, -s      strip the flags from the finished product           [boolean]
  --servers        include complete servers object with --valid        [boolean]
  --lineWidth, -l  max line width of yaml output          [number] [default: -1]
  --maxAliasCount  maximum YAML aliases allowed          [number] [default: 100]
  --configFile     The file & path for the filter options                 [path]
  --help           Show help                                           [boolean]
  --verbose        Output more details of the filter process             [count]

use -- to separate flags or other array options from following options, i.e.:

openapi-filter --flags x-private x-hidden -- source.yaml target.yaml

or

let openapiFilter = require('openapi-filter');
let options = {}; // defaults are shown
//options.inverse = false;
//options.valid = false;
//options.flags = ['x-internal'];
let res = openapiFilter.filter(obj,options);

See the wiki for further examples.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].