Socket
Socket
Sign inDemoInstall

swagger-tools

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-tools - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

8

lib/specs.js

@@ -283,10 +283,10 @@ /*

docsUrl = 'https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md';
primitives = _.union(primitives, ['void', 'File']);
schemasUrl = 'https://github.com/wordnik/swagger-spec/tree/master/schemas/v1.2';
primitives = _.union(primitives, ['void', 'File']);
break;
case '2.0':
// Pointing to reverb/swagger-spec until 2.0 is made available in the wordnik/swagger-spec repository
docsUrl = 'https://github.com/reverb/swagger-spec/blob/master/versions/2.0.md';
schemasUrl = 'https://github.com/reverb/swagger-spec/tree/master/schemas/v2.0';
docsUrl = 'https://github.com/wordnik/swagger-spec/blob/master/versions/2.0.md';
primitives = _.union(primitives, ['file']);
schemasUrl = 'https://github.com/wordnik/swagger-spec/tree/master/schemas/v2.0';

@@ -293,0 +293,0 @@ break;

{
"name": "swagger-tools",
"version": "0.6.0",
"version": "0.6.1",
"description": "Various tools for using and integrating with Swagger.",

@@ -5,0 +5,0 @@ "main": "index.js",

{
"title": "A JSON Schema for Swagger 2.0 API.",
"id": "http://swagger.io/v2/schema.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": [ "swagger", "info", "paths" ],
"required": [
"swagger",
"info",
"paths"
],
"additionalProperties": false,

@@ -15,4 +19,6 @@ "patternProperties": {

"swagger": {
"type": "number",
"enum": [ 2.0 ],
"type": "string",
"enum": [
"2.0"
],
"description": "The Swagger version of this document."

@@ -23,9 +29,6 @@ },

},
"externalDocs": {
"$ref": "#/definitions/externalDocs"
},
"host": {
"type": "string",
"format": "uri",
"pattern": "^((?!\\:\/\/).)*$",
"pattern": "^[^{}/ :\\\\]+(?::\\d+)?$",
"description": "The fully qualified URI to the host of the API."

@@ -39,49 +42,30 @@ },

"schemes": {
"type": "array",
"description": "The transfer protocol of the API.",
"items": {
"type": "string",
"enum": [ "http", "https", "ws", "wss" ]
}
"$ref": "#/definitions/schemesList"
},
"consumes": {
"type": "array",
"description": "A list of MIME types accepted by the API.",
"items": {
"$ref": "#/definitions/mimeType"
}
"$ref": "#/definitions/mediaTypeList"
},
"produces": {
"type": "array",
"description": "A list of MIME types the API can produce.",
"items": {
"$ref": "#/definitions/mimeType"
}
"$ref": "#/definitions/mediaTypeList"
},
"paths": {
"type": "object",
"description": "Relative paths to the individual endpoints. They must be relative to the 'basePath'.",
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
},
"^/.*[^\/]$": {
"$ref": "#/definitions/pathItem"
}
},
"additionalProperties": false
"$ref": "#/definitions/paths"
},
"definitions": {
"type": "object",
"description": "One or more JSON objects describing the schemas being consumed and produced by the API.",
"additionalProperties": { "$ref": "#/definitions/schema" }
"$ref": "#/definitions/definitions"
},
"parameters": {
"type": "object",
"description": "One or more JSON representations for parameters",
"additionalProperties": { "$ref": "#/definitions/parameter" }
"$ref": "#/definitions/parameterDefinitions"
},
"responses": {
"$ref": "#/definitions/responseDefinitions"
},
"security": {
"$ref": "#/definitions/security"
},
"securityDefinitions": {
"$ref": "#/definitions/securityDefinitions"
},
"tags": {

@@ -91,24 +75,17 @@ "type": "array",

"$ref": "#/definitions/tag"
}
},
"uniqueItems": true
},
"externalDocs": {
"$ref": "#/definitions/externalDocs"
}
},
"definitions": {
"externalDocs": {
"type": "object",
"description": "information about external documentation",
"required": [ "url" ],
"properties": {
"description": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
}
}
},
"info": {
"type": "object",
"description": "General information about the API.",
"required": [ "version", "title" ],
"required": [
"version",
"title"
],
"additionalProperties": false,

@@ -121,2 +98,6 @@ "patternProperties": {

"properties": {
"title": {
"type": "string",
"description": "A unique and precise title of the API."
},
"version": {

@@ -126,6 +107,2 @@ "type": "string",

},
"title": {
"type": "string",
"description": "A unique and precise title of the API."
},
"description": {

@@ -140,50 +117,109 @@ "type": "string",

"contact": {
"type": "object",
"description": "Contact information for the owners of the API.",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The identifying name of the contact person/organization."
},
"url": {
"type": "string",
"description": "The URL pointing to the contact information.",
"format": "uri"
},
"email": {
"type": "string",
"description": "The email address of the contact person/organization.",
"format": "email"
}
}
"$ref": "#/definitions/contact"
},
"license": {
"type": "object",
"required": [ "name" ],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The name of the license type. It's encouraged to use an OSI compatible license."
},
"url": {
"type": "string",
"description": "The URL pointing to the license.",
"format": "uri"
}
}
"$ref": "#/definitions/license"
}
}
},
"example": {
"contact": {
"type": "object",
"description": "Contact information for the owners of the API.",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The identifying name of the contact person/organization."
},
"url": {
"type": "string",
"description": "The URL pointing to the contact information.",
"format": "uri"
},
"email": {
"type": "string",
"description": "The email address of the contact person/organization.",
"format": "email"
}
}
},
"license": {
"type": "object",
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The name of the license type. It's encouraged to use an OSI compatible license."
},
"url": {
"type": "string",
"description": "The URL pointing to the license.",
"format": "uri"
}
}
},
"paths": {
"type": "object",
"description": "Relative paths to the individual endpoints. They must be relative to the 'basePath'.",
"patternProperties": {
"^[a-z0-9-]+/[a-z0-9-+]+$": {}
"^x-": {
"$ref": "#/definitions/vendorExtension"
},
"^/": {
"$ref": "#/definitions/pathItem"
}
},
"additionalProperties": false
},
"definitions": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/schema"
},
"description": "One or more JSON objects describing the schemas being consumed and produced by the API."
},
"parameterDefinitions": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/parameter"
},
"description": "One or more JSON representations for parameters"
},
"responseDefinitions": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/response"
},
"description": "One or more JSON representations for parameters"
},
"externalDocs": {
"type": "object",
"additionalProperties": false,
"description": "information about external documentation",
"required": [
"url"
],
"properties": {
"description": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
}
}
},
"examples": {
"type": "object",
"patternProperties": {
"^[a-z0-9-]+/[a-z0-9\\-+]+$": {}
},
"additionalProperties": false
},
"mimeType": {
"type": "string",
"pattern": "^[\\sa-z0-9-+;\\.=\\/]+$",
"pattern": "^[\\sa-z0-9\\-+;\\.=\\/]+$",
"description": "The MIME type of the HTTP message."

@@ -193,3 +229,5 @@ },

"type": "object",
"required": [ "responses" ],
"required": [
"responses"
],
"additionalProperties": false,

@@ -206,3 +244,4 @@ "patternProperties": {

"type": "string"
}
},
"uniqueItems": true
},

@@ -225,36 +264,11 @@ "summary": {

"produces": {
"type": "array",
"description": "A list of MIME types the API can produce.",
"additionalItems": false,
"items": {
"$ref": "#/definitions/mimeType"
}
"$ref": "#/definitions/mediaTypeList"
},
"consumes": {
"type": "array",
"description": "A list of MIME types the API can consume.",
"additionalItems": false,
"items": {
"$ref": "#/definitions/mimeType"
}
"$ref": "#/definitions/mediaTypeList"
},
"parameters": {
"type": "array",
"description": "The parameters needed to send a valid API call.",
"minItems": 1,
"additionalItems": false,
"items": {
"oneOf": [
{ "$ref": "#/definitions/parameter" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"$ref": {
"type": "string"
}
}
}
]
}
"$ref": "#/definitions/parametersList"
},

@@ -265,9 +279,8 @@ "responses": {

"schemes": {
"type": "array",
"description": "The transfer protocol of the API.",
"items": {
"type": "string",
"enum": [ "http", "https", "ws", "wss" ]
}
"$ref": "#/definitions/schemesList"
},
"deprecated": {
"type": "boolean",
"default": false
},
"security": {

@@ -312,6 +325,3 @@ "$ref": "#/definitions/security"

"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/parameter"
}
"$ref": "#/definitions/parametersList"
}

@@ -326,4 +336,4 @@ }

"patternProperties": {
"^([0-9]+)$|^(default)$": {
"$ref": "#/definitions/response"
"^([0-9]{3})$|^(default)$": {
"$ref": "#/definitions/responseValue"
},

@@ -333,7 +343,28 @@ "^x-": {

}
},
"not": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
}
},
"responseValue": {
"oneOf": [
{
"$ref": "#/definitions/response"
},
{
"$ref": "#/definitions/jsonReference"
}
]
},
"response": {
"type": "object",
"required": [ "description" ],
"required": [
"description"
],
"properties": {

@@ -347,9 +378,6 @@ "description": {

"headers": {
"type": "array",
"items": {
"$ref": "#/definitions/serializableType"
}
"$ref": "#/definitions/headers"
},
"examples": {
"$ref": "#/definitions/example"
"$ref": "#/definitions/examples"
}

@@ -359,7 +387,24 @@ },

},
"serializableType": {
"headers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/header"
}
},
"header": {
"type": "object",
"additionalProperties": false,
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [ "string", "number", "boolean", "integer", "array", "file" ]
"enum": [
"string",
"number",
"integer",
"boolean",
"array"
]
},

@@ -370,5 +415,47 @@ "format": {

"items": {
"type": "object"
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormat"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
},
"description": {
"type": "string"

@@ -383,78 +470,428 @@ }

},
"parameter": {
"bodyParameter": {
"type": "object",
"required": [ "name", "in" ],
"required": [
"name",
"in",
"schema"
],
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use. Github-flavored markdown is allowed."
},
"name": {
"type": "string",
"description": "The name of the parameter."
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [
"body"
]
},
"required": {
"type": "boolean",
"description": "Determines whether or not this parameter is required or optional.",
"default": false
},
"schema": {
"$ref": "#/definitions/schema"
}
},
"additionalProperties": false
},
"headerParameterSubSchema": {
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"required": {
"type": "boolean",
"description": "Determines whether or not this parameter is required or optional.",
"default": false
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [
"header"
]
},
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use. Github-flavored markdown is allowed."
},
"name": {
"type": "string",
"description": "The name of the parameter."
},
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean",
"integer",
"array"
]
},
"format": {
"type": "string"
},
"items": {
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormat"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
}
}
},
"queryParameterSubSchema": {
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"required": {
"type": "boolean",
"description": "Determines whether or not this parameter is required or optional.",
"default": false
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [
"query"
]
},
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use. Github-flavored markdown is allowed."
},
"name": {
"type": "string",
"description": "The name of the parameter."
},
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean",
"integer",
"array"
]
},
"format": {
"type": "string"
},
"items": {
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormatWithMulti"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
}
}
},
"formDataParameterSubSchema": {
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"required": {
"type": "boolean",
"description": "Determines whether or not this parameter is required or optional.",
"default": false
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [
"formData"
]
},
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use. Github-flavored markdown is allowed."
},
"name": {
"type": "string",
"description": "The name of the parameter."
},
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean",
"integer",
"array",
"file"
]
},
"format": {
"type": "string"
},
"items": {
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormatWithMulti"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
}
}
},
"pathParameterSubSchema": {
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"required": {
"type": "boolean",
"enum": [
true
],
"description": "Determines whether or not this parameter is required or optional."
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [
"path"
]
},
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use. Github-flavored markdown is allowed."
},
"name": {
"type": "string",
"description": "The name of the parameter."
},
"type": {
"type": "string",
"enum": [
"string",
"number",
"boolean",
"integer",
"array"
]
},
"format": {
"type": "string"
},
"items": {
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormat"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
}
}
},
"nonBodyParameter": {
"type": "object",
"required": [
"name",
"in",
"type"
],
"oneOf": [
{
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"name": {
"type": "string",
"description": "The name of the parameter."
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [ "query", "header", "path", "formData" ]
},
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use. Github-flavored markdown is allowed."
},
"required": {
"type": "boolean",
"description": "Determines whether or not this parameter is required or optional."
},
"type": {
"type": "string",
"enum": [ "string", "number", "boolean", "integer", "array" ]
},
"format": {
"type": "string"
},
"items": {
"type": "object"
},
"collectionFormat": {
"type": "string"
}
},
"additionalProperties": false
"$ref": "#/definitions/headerParameterSubSchema"
},
{
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"name": {
"type": "string",
"description": "The name of the parameter."
},
"in": {
"type": "string",
"description": "Determines the location of the parameter.",
"enum": [ "body" ]
},
"description": {
"type": "string",
"description": "A brief description of the parameter. This could contain examples of use."
},
"required": {
"type": "boolean",
"description": "Determines whether or not this parameter is required or optional."
},
"schema": {
"$ref": "#/definitions/schema"
}
},
"additionalProperties": false
"$ref": "#/definitions/formDataParameterSubSchema"
},
{
"$ref": "#/definitions/queryParameterSubSchema"
},
{
"$ref": "#/definitions/pathParameterSubSchema"
}
]
},
"parameter": {
"oneOf": [
{
"$ref": "#/definitions/bodyParameter"
},
{
"$ref": "#/definitions/nonBodyParameter"
}
]
},
"schema": {

@@ -469,54 +906,171 @@ "type": "object",

"properties": {
"$ref": { "type": "string" },
"format": { "type": "string" },
"title": { "$ref": "http://json-schema.org/draft-04/schema#/properties/title" },
"description": { "$ref": "http://json-schema.org/draft-04/schema#/properties/description" },
"default": { "$ref": "http://json-schema.org/draft-04/schema#/properties/default" },
"multipleOf": { "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" },
"maximum": { "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" },
"exclusiveMaximum": { "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" },
"minimum": { "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" },
"exclusiveMinimum": { "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" },
"maxLength": { "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" },
"minLength": { "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" },
"pattern": { "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" },
"discriminator": { "type": "string" },
"xml": { "$ref": "#/definitions/xml"},
"$ref": {
"type": "string"
},
"format": {
"type": "string"
},
"title": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/title"
},
"description": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/description"
},
"default": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/default"
},
"multipleOf": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf"
},
"maximum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/maximum"
},
"exclusiveMaximum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"
},
"minimum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/minimum"
},
"exclusiveMinimum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"
},
"maxLength": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
},
"minLength": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
},
"pattern": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/pattern"
},
"maxItems": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
},
"minItems": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
},
"uniqueItems": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
},
"maxProperties": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
},
"minProperties": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
},
"required": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray"
},
"enum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
},
"type": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/type"
},
"items": {
"anyOf": [
{ "$ref": "#/definitions/schema" },
{
"$ref": "#/definitions/schema"
},
{
"type": "array",
"minItems": 1,
"items": { "$ref": "#/definitions/schema" }
"items": {
"$ref": "#/definitions/schema"
}
}
],
"default": { }
"default": {}
},
"maxItems": { "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" },
"minItems": { "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" },
"uniqueItems": { "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" },
"maxProperties": { "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" },
"minProperties": { "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" },
"required": { "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" },
"externalDocs": { "$ref": "#/definitions/externalDocs" },
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/schema" },
"default": { }
"allOf": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/schema"
}
},
"properties": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/schema" },
"default": { }
"additionalProperties": {
"$ref": "#/definitions/schema"
},
"default": {}
},
"enum": { "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" },
"type": { "$ref": "http://json-schema.org/draft-04/schema#/properties/type" },
"example": {
"discriminator": {
"type": "string"
},
"allOf": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/definitions/schema" }
"readOnly": {
"type": "boolean",
"default": false
},
"xml": {
"$ref": "#/definitions/xml"
},
"externalDocs": {
"$ref": "#/definitions/externalDocs"
},
"example": {}
}
},
"primitivesItems": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"number",
"integer",
"boolean",
"array"
]
},
"format": {
"type": "string"
},
"items": {
"$ref": "#/definitions/primitivesItems"
},
"collectionFormat": {
"$ref": "#/definitions/collectionFormat"
},
"default": {
"$ref": "#/definitions/default"
},
"maximum": {
"$ref": "#/definitions/maximum"
},
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
},
"minimum": {
"$ref": "#/definitions/minimum"
},
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
},
"maxLength": {
"$ref": "#/definitions/maxLength"
},
"minLength": {
"$ref": "#/definitions/minLength"
},
"pattern": {
"$ref": "#/definitions/pattern"
},
"maxItems": {
"$ref": "#/definitions/maxItems"
},
"minItems": {
"$ref": "#/definitions/minItems"
},
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
},
"enum": {
"$ref": "#/definitions/enum"
},
"multipleOf": {
"$ref": "#/definitions/multipleOf"
}

@@ -527,18 +1081,56 @@ }

"type": "array",
"description": "defines security requirements"
"items": {
"$ref": "#/definitions/securityRequirement"
},
"uniqueItems": true
},
"securityRequirement": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"xml": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": { "type": "string"},
"namespace": { "type": "string" },
"prefix": { "type": "string" },
"attribute": { "type": "boolean" },
"wrapped": { "type": "boolean" }
},
"additionalProperties": false
"name": {
"type": "string"
},
"namespace": {
"type": "string"
},
"prefix": {
"type": "string"
},
"attribute": {
"type": "boolean",
"default": false
},
"wrapped": {
"type": "boolean",
"default": false
}
}
},
"tag": {
"type": "object",
"additionalProperties": false,
"required": [
"name"
],
"properties": {
"externalDocs": { "$ref": "#/definitions/externalDocs" }
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"externalDocs": {
"$ref": "#/definitions/externalDocs"
}
},

@@ -548,9 +1140,365 @@ "patternProperties": {

"$ref": "#/definitions/vendorExtension"
}
}
},
"securityDefinitions": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"$ref": "#/definitions/basicAuthenticationSecurity"
},
{
"$ref": "#/definitions/apiKeySecurity"
},
{
"$ref": "#/definitions/oauth2ImplicitSecurity"
},
{
"$ref": "#/definitions/oauth2PasswordSecurity"
},
{
"$ref": "#/definitions/oauth2ApplicationSecurity"
},
{
"$ref": "#/definitions/oauth2AccessCodeSecurity"
}
]
}
},
"basicAuthenticationSecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"basic"
]
},
"^/.*[^\/]$": {
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"apiKeySecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"name",
"in"
],
"properties": {
"type": {
"type": "string",
"enum": [
"apiKey"
]
},
"name": {
"type": "string"
},
"in": {
"type": "string",
"enum": [
"header",
"query"
]
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"oauth2ImplicitSecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"flow",
"authorizationUrl"
],
"properties": {
"type": {
"type": "string",
"enum": [
"oauth2"
]
},
"flow": {
"type": "string",
"enum": [
"implicit"
]
},
"scopes": {
"$ref": "#/definitions/oauth2Scopes"
},
"authorizationUrl": {
"type": "string",
"format": "uri"
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"oauth2PasswordSecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"flow",
"tokenUrl"
],
"properties": {
"type": {
"type": "string",
"enum": [
"oauth2"
]
},
"flow": {
"type": "string",
"enum": [
"password"
]
},
"scopes": {
"$ref": "#/definitions/oauth2Scopes"
},
"tokenUrl": {
"type": "string",
"format": "uri"
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"oauth2ApplicationSecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"flow",
"tokenUrl"
],
"properties": {
"type": {
"type": "string",
"enum": [
"oauth2"
]
},
"flow": {
"type": "string",
"enum": [
"application"
]
},
"scopes": {
"$ref": "#/definitions/oauth2Scopes"
},
"tokenUrl": {
"type": "string",
"format": "uri"
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"oauth2AccessCodeSecurity": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"flow",
"authorizationUrl",
"tokenUrl"
],
"properties": {
"type": {
"type": "string",
"enum": [
"oauth2"
]
},
"flow": {
"type": "string",
"enum": [
"accessCode"
]
},
"scopes": {
"$ref": "#/definitions/oauth2Scopes"
},
"authorizationUrl": {
"type": "string",
"format": "uri"
},
"tokenUrl": {
"type": "string",
"format": "uri"
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
}
},
"oauth2Scopes": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"mediaTypeList": {
"type": "array",
"items": {
"$ref": "#/definitions/mimeType"
},
"uniqueItems": true
},
"parametersList": {
"type": "array",
"description": "The parameters needed to send a valid API call.",
"minItems": 1,
"additionalItems": false,
"items": {
"oneOf": [
{
"$ref": "#/definitions/parameter"
},
{
"$ref": "#/definitions/jsonReference"
}
]
},
"uniqueItems": true
},
"schemesList": {
"type": "array",
"description": "The transfer protocol of the API.",
"items": {
"type": "string",
"enum": [
"http",
"https",
"ws",
"wss"
]
},
"uniqueItems": true
},
"collectionFormat": {
"type": "string",
"enum": [
"csv",
"ssv",
"tsv",
"pipes"
],
"default": "csv"
},
"collectionFormatWithMulti": {
"type": "string",
"enum": [
"csv",
"ssv",
"tsv",
"pipes",
"multi"
],
"default": "csv"
},
"title": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/title"
},
"description": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/description"
},
"default": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/default"
},
"multipleOf": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf"
},
"maximum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/maximum"
},
"exclusiveMaximum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"
},
"minimum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/minimum"
},
"exclusiveMinimum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"
},
"maxLength": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
},
"minLength": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
},
"pattern": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/pattern"
},
"maxItems": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
},
"minItems": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
},
"uniqueItems": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
},
"enum": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
},
"jsonReference": {
"type": "object",
"additionalProperties": false,
"properties": {
"$ref": {
"type": "string"
}
}
}
}
}
}
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