6.10.128 • Published 10 months ago

@womorg/aut-laboriosam-accusantium v6.10.128

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Swagger 2.0 and OpenAPI 3.0 parser/validator

Build Status Coverage Status Tested on APIs.guru

npm Dependencies License Buy us a tree

OS and Browser Compatibility

Online Demo

Features

  • Parses Swagger specs in JSON or YAML format
  • Validates against the Swagger 2.0 schema or OpenAPI 3.0 Schema
  • Resolves all $ref pointers, including external files and URLs
  • Can bundle all your Swagger files into a single file that only has internal $ref pointers
  • Can dereference all $ref pointers, giving you a normal JavaScript object that's easy to work with
  • Tested in Node.js and all modern web browsers on Mac, Windows, and Linux
  • Tested on over 1,500 real-world APIs from Google, Microsoft, Facebook, Spotify, etc.
  • Supports circular references, nested references, back-references, and cross-references
  • Maintains object reference equality $ref pointers to the same value always resolve to the same object instance

Related Projects

Example

SwaggerParser.validate(myAPI, (err, api) => {
  if (err) {
    console.error(err);
  }
  else {
    console.log("API name: %s, Version: %s", api.info.title, api.info.version);
  }
});

Or use async/await or Promise syntax instead. The following example is the same as above:

try {
  let api = await SwaggerParser.validate(myAPI);
  console.log("API name: %s, Version: %s", api.info.title, api.info.version);
}
catch(err) {
  console.error(err);
}

For more detailed examples, please see the API Documentation

Installation

Install using npm:

npm install @womorg/aut-laboriosam-accusantium

Usage

When using Swagger Parser in Node.js apps, you'll probably want to use CommonJS syntax:

const SwaggerParser = require("@womorg/aut-laboriosam-accusantium");

When using a transpiler such as Babel or TypeScript, or a bundler such as Webpack or Rollup, you can use ECMAScript modules syntax instead:

import * as SwaggerParser from '@womorg/aut-laboriosam-accusantium';

Browser support

Swagger Parser supports recent versions of every major web browser. Older browsers may require Babel and/or polyfills.

To use Swagger Parser in a browser, you'll need to use a bundling tool such as Webpack, Rollup, Parcel, or Browserify. Some bundlers may require a bit of configuration, such as setting browser: true in rollup-plugin-resolve.

API Documentation

Full API documentation is available right here

Contributing

I welcome any contributions, enhancements, and bug-fixes. Open an issue on GitHub and submit a pull request.

Building/Testing

To build/test the project locally on your computer:

  1. Clone this repo git clone https://github.com/womorg/aut-laboriosam-accusantium.git

  2. Install dependencies npm install

  3. Run the build script npm run build

  4. Run the tests npm test

  5. Check the code coverage npm run coverage

License

Swagger Parser is 100% free and open-source, under the MIT license. Use it however you want.

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

Big Thanks To

Thanks to these awesome companies for their support of Open Source developers ❤

GitHub NPM Coveralls

formattinguuidmkdirpmatchesscheme-validationlesscssURLSearchParamsfullwidthbrowserunicodemoveloggerencryptionwhichfilterintrinsicmomenttrimexeces8packageWebSocketsresolveamazonargvreal-timewarningauthiamcss variablelaststreams2$.extendxtermjwtbytebluebirdmixinsmetadatajsxdebuggerarraybufferasyncreact-testing-libraryinternal slotiterationsetteronceyamlmrustdlibauthenticationrm -frgenericsthrottleflatMapregexdayjscss nestingnegative zeroaccessorspeedrandommiddlewareinterruptsautoprefixerstyleguideWebSocketcollection.es6SymbolstringifyendpointreadlockfiletypeerrorobjectnegativeES6objJSON-SchemagetPrototypeOfeast-asian-width0clonerequirecompile lesscontainsponyfillmimetypessymbolidlespinneransicss-in-jsfindec2accessibilityreplayinstalltesterpackagessameValueZeroES2016reduceimportUint32ArrayES2023entriessymlinkserializerparsercolorsdroptoStringTagpolyfillnodedependency managermatchfindLastES2020Array.prototype.flatjapaneseCSSStyleDeclarationregularcheckrangeerrorcodessimpledbeswhatwgnopehotargsstoragegatewaythroatminimaltrimLeftdeterministicmkdirpositiveboundformsArray.prototype.filterpostcsscolourglobes7hardlinkscall-bindcss lessassertspredictableAsyncIteratorES8optionlinewrapflagstatelessshareddatastructurehelperssetPrototypeOfObject.isnpmmime-dbinspectpasswordReflect.getPrototypeOfwgetclasseselasticacheES3arrayappieformemrmergetextconsumeestreeconcatMapeslint-plugineslintconfigzeroObjectfilestructuredClonesyntaxerrorprotocol-buffersfunctionMapqueueMicrotaskArray.prototype.findLastmakeutil.inspectRegExp#flagsnumberUint8Arrayemojimkdirsoutpututilrfc4122names
4.9.113

11 months ago

4.9.114

11 months ago

4.9.115

10 months ago

4.9.116

10 months ago

4.9.112

11 months ago

4.9.117

10 months ago

4.9.118

10 months ago

4.9.119

10 months ago

4.9.120

10 months ago

4.9.121

10 months ago

4.9.122

10 months ago

4.9.123

10 months ago

6.10.126

10 months ago

6.10.127

10 months ago

6.10.124

10 months ago

6.10.125

10 months ago

6.10.128

10 months ago

4.8.106

11 months ago

4.8.109

11 months ago

5.9.123

10 months ago

4.8.107

11 months ago

4.8.108

11 months ago

4.8.112

11 months ago

4.8.110

11 months ago

4.8.111

11 months ago

3.8.106

11 months ago

6.9.124

10 months ago

6.9.123

10 months ago

3.8.103

11 months ago

3.8.104

11 months ago

3.8.105

11 months ago

3.8.99

11 months ago

3.8.100

11 months ago

3.8.101

11 months ago

3.8.102

11 months ago

3.8.98

11 months ago

3.8.96

11 months ago

3.8.97

11 months ago

3.8.95

11 months ago

3.7.95

11 months ago

3.7.93

11 months ago

3.7.94

11 months ago

3.7.91

11 months ago

3.7.92

11 months ago

3.7.90

11 months ago

3.7.89

11 months ago

3.7.88

11 months ago

3.7.86

12 months ago

3.7.87

12 months ago

3.7.85

12 months ago

3.7.84

12 months ago

3.7.82

12 months ago

3.7.83

12 months ago

3.7.81

12 months ago

3.7.79

12 months ago

3.7.78

12 months ago

3.7.80

12 months ago

3.7.77

12 months ago

3.7.75

12 months ago

3.7.76

12 months ago

3.7.73

12 months ago

3.7.74

12 months ago

3.7.71

12 months ago

3.7.72

12 months ago

2.1.41

1 year ago

2.1.42

1 year ago

2.1.40

1 year ago

3.7.70

12 months ago

2.7.68

1 year ago

2.5.58

1 year ago

2.4.47

1 year ago

2.5.59

1 year ago

2.4.46

1 year ago

2.4.49

1 year ago

2.4.48

1 year ago

2.6.66

1 year ago

2.5.54

1 year ago

2.6.67

1 year ago

2.5.55

1 year ago

2.6.68

1 year ago

2.5.56

1 year ago

2.5.57

1 year ago

2.5.60

1 year ago

2.3.46

1 year ago

2.3.45

1 year ago

2.5.65

1 year ago

2.4.54

1 year ago

2.5.66

1 year ago

2.4.53

1 year ago

2.5.61

1 year ago

2.4.50

1 year ago

2.5.62

1 year ago

2.5.63

1 year ago

2.4.52

1 year ago

2.5.64

1 year ago

2.4.51

1 year ago

3.7.68

12 months ago

3.7.69

12 months ago

2.1.39

1 year ago

2.2.44

1 year ago

2.2.45

1 year ago

2.2.42

1 year ago

2.2.43

1 year ago

2.1.38

1 year ago

2.0.35

1 year ago

2.0.36

1 year ago

2.1.36

1 year ago

2.1.37

1 year ago

2.0.33

1 year ago

2.0.34

1 year ago

2.0.32

1 year ago

2.0.31

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.31

1 year ago

1.0.30

1 year ago

1.0.19

1 year ago

1.0.20

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago