New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openapi-enforcer

Package Overview
Dependencies
Maintainers
1
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-enforcer - npm Package Versions

23
14

1.23.0

Diff

Changelog

Source

1.23.0

Added

  • You Can Ignore Undefined Property Values

    The default implementation complains of objects where a property is defined but set to undefined. This will cause Schema instances to fail validations, serialization, and deserialization. Now you have the option to set the global Enforcer.config.ignoreUndefinedPropertyValues to true or false (default) or when calling a Schema instance's validate function you can specify the ignoreUndefinedPropertyValues as an option property. Serialization and deserialization will now ignore undefined values in all cases.

gi60s
published 1.22.3 •

Changelog

Source

1.22.3

Security

  • Update Dependencies

    Updated some dependencies to address security vulnerabilities.

gi60s
published 1.22.2 •

Changelog

Source

1.22.2

Fixed

  • Fix Validation of not Sub Schema

    Any time a schema had the property not, it was not validating correctly. This code for this fix, including tests, is thanks to gaetano-guerriero.

gi60s
published 1.22.1 •

Changelog

Source

1.22.1

Fixed

  • Exception Skip Codes Bug Fix

    The exception skip codes that were defined via the options were not being carried through to child components. This fix allows those settings to be carried. Exception skip codes defined by an instance (see change 1.22.0) are still limited to just the component.

gi60s
published 1.22.0 •

Changelog

Source

1.22.0

Added

  • You Can Now Skip Instances of an Exception

    Being able to skip a specific type of exception has been around for a while, but if you want to skip just a single instance of an exception, that is now possible. Find the nearest component to where your exception is occurring and add the extension x-enforcer-exception-skip-codes followed by a space seperated list of all exceptions that should be skipped in that component. This will not affect child components of this component, only the exceptions that specifically belong to this component.

    MySchema:
      x-enforcer-exception-skip-codes: WSCH001 WSCH002
      type: string
      format: tacos
    
gi60s
published 1.21.1 •

Changelog

Source

1.21.1

Fixed

  • Default Values Can Be Specified with allOf and anyOf Schemas

    Schemas that use the allOf or anyOf property can now specify a default value at the shared schema level. For example:

    MySchema:
      default: false
      anyOf:
        - type: boolean
        - type: number
    
gi60s
published 1.21.0 •

Changelog

Source

1.21.0

Added

  • You Can Use Non-Spec Properties and Skip Exception

    Using a property that is not defined in the OpenAPI specification will generally result in an exception. Now there is an exceptionSkipCode EDEV001 that will allow you to use properties that are not part of the OpenAPI specification.

Changed

  • Warn of Required Properties that are Not Specified

    In the scenario where you define an object with a required property but do not include that property in the properties list, the object is valid, according to the OpenAPI specification because additionalProperties defaults to true.

    MySchema:
      type: object
      required:
        - "a"
        - "b"
      properties:
        a:
          type: string
          description: field a
        c:
          type: string
          description: field c  
    

    With this change, when you specify a required property without also specifying the schema attached to that property a warning will now be produced that can either be escalated or skipped using exceptionSkipCode WSCH007.

gi60s
published 1.20.0 •

Changelog

Source

1.20.0

Changed

  • Replaced Dynamic Imports with Static Imports

    The index.js file was using dynamic imports via the Super function. That has been replaced with static imports which may allow this library to run on Deno. Thanks to mattiasrunge for the PR.

gi60s
published 1.19.0 •

Changelog

Source

1.19.0

Added

  • exceptionSkipCodes and exceptionEscalateCodes for Invalid Example

    Add the escalate / skip code WSCH006 to better manage invalid examples that don't match schemas.

Fixed

  • Normalized Invalid Example Severity

    Previously invalid examples would be warnings in some cases and errors in other places. Now all invalid examples are warnings, but you can convert those to errors or ignore them entirely now by using exceptionSkipCodes and exceptionEscalateCodes. See documentation on Component Options in the documentation.

gi60s
published 1.18.0 •

Changelog

Source

1.18.0

Added

  • Case Sensitivity Optional For Paths

    The default behavior is for paths to be case sensitive. There is now an option Enforcer.config.useCaseSensitivePaths (defaulting to true) that when set to false will change how paths duplicates are validated and how paths are looked up when attempting to match a path to a request.

23
14
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc