Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@oas-tools/core

oas-tools44.1kApache-2.03.1.0

OAS Tools core library

OpenAPI, REST, OAS, Open API, API, Swagger, Tools

readme

OAS TOOLS

NPM

npm node-current npm Node.js CI Conventional Commits

Known Vulnerabilities Coverage Status

Warning

OAS Tools package has been renamed from oas-tools to @oas-tools/core

Quickstart

Initialize a new OAS Tools project from the CLI

> npx @oas-tools/cli init

It will prompt the following menu, asking which type of resource will be initialized:

? Select a resource to initialize (Use arrow keys)
> Server
  Module
  Development environment
  OpenAPI File

Select server, answer the questions and you'll get a running server with OAS Tools.

More information in our web page

Contributing guidelines

We greatly appreciate community contributions, that's why we have created a document stating clear guidelines for contributing to OAS Tools. We also encourage you to participate in discussions and activate notification for our announcements in the organization's discussions dashboard

License

Copyright 2018, ISA Group, University of Sevilla

For technical inquiry please contact to engineering team.

ISA Group

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

changelog

3.1.0 (2023-03-07)

Bug Fixes

  • Avoid route overlapping when registering (eaf73a0)
  • Compatibility issue with parameter parsing (8bb0aa5), closes #362 #357
  • support jest test (918de8c)
  • when an option field is object type and is missing from request body, the request body shall considered as valid (68e860b), closes #356

Features

  • added async error handling for router and associated tests (6c4a53f)
  • upgrade js-yaml to v4.1.0 (906596a)

3.0.3 (2022-11-21)

Bug Fixes

  • Backward compatibility function error (a401ca6)

3.0.2 (2022-09-26)

Bug Fixes

  • Allow null values (22e72d2)
  • Check for extraneous query parameters (5f0c59b)
  • Data not being sent after response validation (b85a6c4)
  • default and nullable fields logic (2670211)
  • Support for OAS 'default' keyword in schemas (94c4297)
  • Support for readOnly and writeOnly (be25966)

3.0.1 (2022-09-12)

Bug Fixes

  • Fixed routing when controller is async (ee1650b)
  • support for common path parameters (b299b62)

3.0.0 (2022-08-14)

Bug Fixes

  • .snyk & package.json to reduce vulnerabilities (4a98e98)
  • .snyk, package.json & package-lock.json to reduce vulnerabilities (9c0664d)
  • .snyk, package.json & package-lock.json to reduce vulnerabilities (d4964b4)
  • Avoid conflict of multiple http secSchemes (51df899)
  • Avoid returning promise when calling 2.X init (f846061)
  • Backwards compatibility initialization (3ee3973)
  • Changed replaceAll with replace for Node v14 (f340f4a)
  • Check if secSchemes are defined in OASecurity (b59b23a)
  • Fixed error when not defining requestBody (a70353d)
  • Fixed error when using default config (f1804ac)
  • Fixed exception when no param sent on cookie (58f69d8)
  • Fixed logger not setting level correctly (5db1b6b)
  • Fixed params and security minor bugs (275c34b)
  • Fixed version (96d7e21)
  • fixNullable mutates oasDoc in oas-router (433bd65)
  • Load controllers with annotations disabled (00711f6)
  • Log function name when wrapped in OASBase (362b64d)
  • Modified imports to avoid experimental flag (c5d81d2)
  • Modified use( ) to accept imports directly (6209297)
  • Modules not found when installed in parent (e6e0e40)
  • Moved multer to DevDependencies (be64c9b)
  • package.json & package-lock.json to reduce vulnerabilities (0442c7f)
  • package.json & package-lock.json to reduce vulnerabilities (e414530)
  • package.json & package-lock.json to reduce vulnerabilities (5991873)
  • package.json & package-lock.json to reduce vulnerabilities (8f36427)
  • package.json & package-lock.json to reduce vulnerabilities (4fb0321)
  • package.json & package-lock.json to reduce vulnerabilities (a15e605)
  • package.json & package-lock.json to reduce vulnerabilities (6c166cf)
  • package.json & package-lock.json to reduce vulnerabilities (6eeac11)
  • package.json & package-lock.json to reduce vulnerabilities (8f432d2)
  • package.json & package-lock.json to reduce vulnerabilities (059536f)
  • package.json & package-lock.json to reduce vulnerabilities (bf7310c)
  • package.json & package-lock.json to reduce vulnerabilities (418675c)
  • package.json & package-lock.json to reduce vulnerabilities (afb8688)
  • package.json to reduce vulnerabilities (44fd721)
  • package.json, package-lock.json & .snyk to reduce vulnerabilities (d695aea)
  • package.json, package-lock.json & .snyk to reduce vulnerabilities (54473e0)
  • package.json, package-lock.json & .snyk to reduce vulnerabilities (fbdc73f)
  • package.json, package-lock.json & .snyk to reduce vulnerabilities (4c313d3)
  • package.json, package-lock.json & .snyk to reduce vulnerabilities (fb1ac93)
  • package: update json-schema-deref to version 0.5.0 (9aebdf4)
  • package: update json-schema-deref-sync to version 0.10.0 (0dad266)
  • package: update json-schema-deref-sync to version 0.13.0 (36d4758)
  • package: update json-schema-deref-sync to version 0.7.0 (242036f), closes #37
  • package: update json-schema-deref-sync to version 0.9.0 (49833cc)
  • package: update snyk to version 2.0.0 (562d3fc)
  • package: update validator to version 11.0.0 (2956971)
  • package: update validator to version 12.0.0 (a34e2c4)
  • package: update validator to version 13.0.0 (06c074c)
  • package: update z-schema to version 4.2.0 (7678151)
  • query param failing if they are not string (#1) (8e91a27)
  • Removed date parse form params middleware (e317321)
  • Removed unnecessary config (6fec395)
  • Routing error with x-router-controller (3e42e9e)
  • Validator not validating undefined params (27fe2f3)
  • feat!: Transformed package into ES Module (bab7f3d)
  • refactor!: Removed customErrorHandling option (13c1317)
  • feat!: Router middleware refactorization. (56774ea)
  • feat!: removed x-swagger-router-controller (d6c61b6)
  • chore!: Node 12.x support (56d732e)

Features

  • Ability to hide swagger methods through conf (d302cbc)
  • Added explode & style parameter support (c47a729)
  • Backwards compatibility (1b285fd)
  • Complete backwards compatibility (dc57b06)
  • Configuration through JS file (91aba06)
  • Export utils module (4ca4bf7)
  • Implemented annotations (experimental) (0d7309e)
  • Implemented apikey auth and multiple schemes (f6db873)
  • Implemented custom errors (655da71)
  • Implemented error handler middleware (2b21370)
  • Implemented external middleware imports (baf30ba)
  • Implemented http auth & security (82c458a)
  • Implemented new config options (389a759)
  • Implemented oasTools.use( ) function (b5d95a8)
  • Implemented oauth and openIdConnect (736c2a3)
  • Implemented request validation using Ajv (1515bb3)
  • Implemented response validation middleware (60f3594)
  • Implemented SwaggerUI native middleware (c450196)
  • Modified security handlers to return values (fc16058)
  • multipart-formdata: add POST /multipartFormdata to openAPI yaml (4678546)
  • multipart-formdata: add security check for POST (4d74b54)
  • multipart-formdata: allow content types other than json (26093d3)
  • multipart-formdata: multer as express middleware (74323ca)
  • multipart-formdata: pass file properties to openAPI spec validator (40f5e43)
  • multipart-formdata: validate content types other than appl./json (42fac74)
  • OAS 3.1 support (37d7e20)
  • Router exception handling on initialization (daf7e3f)
  • Support for OpenApi 3.1 (1695d68)
  • Support parameters defined through content (831795a)
  • Updated Swagger UI to 4.5.2 (df6f2e3)

Reverts

  • Revert "Updated dependencies" (6a6bdb5)

BREAKING CHANGES

  • Dropped support for CommonJS and Node <= 12.X
  • Removed auth-middleware, can be integrated as a handler
  • This will be implemented through middlware (native/ext)
  • Removed x-swagger-router-controller.
  • x-swagger-router-controller has been removed.
  • drop Node 10 support