Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openapi-jsonschema-parameters

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-jsonschema-parameters - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

test/data-driven/allow-header-parameters.js

5

index.js

@@ -6,2 +6,3 @@ module.exports = convert;

var bodySchema = getBodySchema(parameters);
var headerSchema = getSchema(parameters, 'header');
var pathSchema = getSchema(parameters, 'path');

@@ -14,2 +15,6 @@ var querySchema = getSchema(parameters, 'query');

if (headerSchema) {
parametersSchema.headers = headerSchema;
}
if (pathSchema) {

@@ -16,0 +21,0 @@ parametersSchema.path = pathSchema;

2

package.json
{
"name": "openapi-jsonschema-parameters",
"version": "0.1.2",
"version": "0.1.3",
"description": "Converts openapi parameters to a jsonschema format.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -22,2 +22,22 @@ # openapi-jsonschema-parameters [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url]

{
in: 'body',
name: 'wow',
schema: {
$ref: '#/definitions/SomeDefinition'
}
},
{
in: 'header',
name: 'Accept',
type: 'string'
},
{
in: 'path',
name: 'boo',
type: 'string'
},
{
in: 'query',

@@ -32,2 +52,22 @@ name: 'foo',

// {
// body: {
// $ref: '#/definitions/SomeDefinition'
// },
//
// headers: {
// properties: {
// Accept: {
// type: 'string'
// }
// }
// },
//
// path: {
// properties: {
// boo: {
// type: 'string'
// }
// }
// },
//
// query: {

@@ -34,0 +74,0 @@ // properties: {

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