sway
sway copied to clipboard
A library that simplifies OpenAPI (fka Swagger) integrations/tooling.
* This option allows specified parameters to bypass validation. We are working on a project that uses a custom validator for certain parameters defined in our swagger definition. Adding this...
Hi there, I've update Typescript definitions with docs and made some small type tweaks, based on the source-code and docs.
When validating parameters and responses, the schema to use is now generated "just in time", based on the discriminator property in the value being validated. The schema generation ended up...
Previously _schema.default_ tag for _schema.type_ === array was never processed and only _schema.items.default_ were usable.
All top-level objects that `sway` supports should have a `getVendorExtensions` API for getting all `x-*` definitions at the root of its schema definition.
Whenever we process the `paths` or some other OAS type, we do not handle vendor extensions appropriately. This could lead to some `x-*` property beneath `paths` being turned into a...
It seems weird to see file type of formData is always expected under req.files. I see multer(a popular library for multi-part form data) sometimes use req.file for a single file....
In swagger spec, attributes with URI as value instead of URL not giving any validation error/warnings. For example tokenURL in securitydefinitions requires 'URL' as per OAS 2.0 standards. But providing...
As promised, when resolving / validating this definition https://raw.githubusercontent.com/Bungie-net/api/master/openapi-2.json using Sway 2.0.5 from npm and this snippet ```js const SwaggerApi = require('sway'); const util = require('util'); const yaml = require('js-yaml');...
Hello, Are there any plans to support `discriminator` for Swagger 2.0? Also, is it possible to perform such validation using a custom validator? Thanks in advance.