openapi-jsonschema-parameters
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -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; |
{ | ||
"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: { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13752
17
450
117