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

fastify-swagger

Package Overview
Dependencies
Maintainers
8
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-swagger - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

8

http2-types.test.ts

@@ -29,2 +29,10 @@ import fastify = require('fastify');

app.get('/public/route', {
schema: {
description: 'returns 200 OK',
summary: 'qwerty',
security: []
}
}, (req, reply) => {});
app

@@ -31,0 +39,0 @@ .register(fastifySwagger, {

3

index.d.ts

@@ -64,3 +64,4 @@ import * as http from 'http';

summary?: string;
security?: [{ [securityLabel: string]: string[] }];
consumes?: string[];
security?: Array<{ [securityLabel: string]: string[] }>;
}

@@ -67,0 +68,0 @@ }

{
"name": "fastify-swagger",
"version": "2.4.0",
"version": "2.5.0",
"description": "Generate Swagger files automatically for Fastify.",

@@ -33,18 +33,18 @@ "main": "index.js",

"devDependencies": {
"@types/node": "^11.9.0",
"fastify": "^2.0.0",
"fs-extra": "^7.0.1",
"@types/node": "^12.11.7",
"fastify": "^2.10.0",
"fs-extra": "^8.0.1",
"joi": "^14.3.1",
"joi-to-json-schema": "^4.0.0",
"joi-to-json-schema": "^5.1.0",
"pre-commit": "^1.2.2",
"standard": "^12.0.1",
"standard": "^14.0.2",
"swagger-parser": "^6.0.3",
"swagger-ui-dist": "3.22.1",
"tap": "^12.5.3",
"typescript": "^3.2.4"
"swagger-ui-dist": "3.24.3",
"tap": "^12.7.0",
"typescript": "^3.7.2"
},
"dependencies": {
"@types/swagger-schema-official": "^2.0.15",
"fastify-plugin": "^1.5.0",
"fastify-static": "^2.3.4",
"@types/swagger-schema-official": "^2.0.20",
"fastify-plugin": "^1.6.0",
"fastify-static": "^2.5.1",
"js-yaml": "^3.12.1"

@@ -54,5 +54,11 @@ },

"ignore": [
"static"
"static",
"tap"
]
},
"greenkeeper": {
"ignore": [
"tap"
]
}
}

@@ -8,27 +8,27 @@ /* IMPORTANT

'use strict'
exports[`test/static.js TAP specification validation check works > undefined 1`] = `
exports['test/static.js TAP specification validation check works > undefined 1'] = `
Error: specification is missing in the module options
`
exports[`test/static.js TAP specification validation check works > undefined 2`] = `
exports['test/static.js TAP specification validation check works > undefined 2'] = `
Error: specification is not an object
`
exports[`test/static.js TAP specification validation check works > undefined 3`] = `
exports['test/static.js TAP specification validation check works > undefined 3'] = `
Error: both specification.path and specification.document are missing, should be path to the file or swagger document spec
`
exports[`test/static.js TAP specification validation check works > undefined 4`] = `
exports['test/static.js TAP specification validation check works > undefined 4'] = `
Error: specification.path is not a string
`
exports[`test/static.js TAP specification validation check works > undefined 5`] = `
exports['test/static.js TAP specification validation check works > undefined 5'] = `
Error: /hello/lionel.richie does not exist
`
exports[`test/static.js TAP specification validation check works > undefined 6`] = `
exports['test/static.js TAP specification validation check works > undefined 6'] = `
Error: specification.postProcessor should be a function
`
exports[`test/static.js TAP swagger route returns json > undefined 1`] = `
exports['test/static.js TAP swagger route returns json > undefined 1'] = `
{

@@ -87,3 +87,3 @@ "openapi": "3.0.0",

exports[`test/static.js TAP postProcessor works, swagger route returns updated yaml > undefined 1`] = `
exports['test/static.js TAP postProcessor works, swagger route returns updated yaml > undefined 1'] = `
openapi: 3.0.0

@@ -123,3 +123,3 @@ info:

exports[`test/static.js TAP swagger route returns explicitly passed doc > undefined 1`] = `
exports['test/static.js TAP swagger route returns explicitly passed doc > undefined 1'] = `
{

@@ -126,0 +126,0 @@ "info": {

@@ -88,3 +88,3 @@ 'use strict'

{
'apiKey': []
apiKey: []
}

@@ -187,3 +187,3 @@ ]

t.strictEqual(res.statusCode, 302)
t.strictEqual(res.headers['location'], '/documentation/static/index.html')
t.strictEqual(res.headers.location, '/documentation/static/index.html')
t.is(typeof res.payload, 'string')

@@ -213,3 +213,3 @@ })

t.strictEqual(res.statusCode, 302)
t.strictEqual(res.headers['location'], '/v1/documentation/static/index.html')
t.strictEqual(res.headers.location, '/v1/documentation/static/index.html')
t.is(typeof res.payload, 'string')

@@ -244,3 +244,3 @@ })

t.strictEqual(res.statusCode, 302)
t.strictEqual(res.headers['location'], '/v1/foobar/static/index.html')
t.strictEqual(res.headers.location, '/v1/foobar/static/index.html')
t.is(typeof res.payload, 'string')

@@ -266,3 +266,3 @@ })

t.strictEqual(res.statusCode, 302)
t.strictEqual(res.headers['location'], '/static/index.html')
t.strictEqual(res.headers.location, '/static/index.html')
t.is(typeof res.payload, 'string')

@@ -291,3 +291,3 @@ })

t.is(res.statusCode, 302)
t.is(res.headers['location'], '/documentation/static/index.html')
t.is(res.headers.location, '/documentation/static/index.html')
})

@@ -399,7 +399,6 @@

t.strictEqual(res.statusCode, 404)
t.deepEqual({
message: 'Not Found',
t.match(payload, {
error: 'Not Found',
statusCode: 404
}, payload)
})
})

@@ -406,0 +405,0 @@ })

@@ -136,3 +136,3 @@ 'use strict'

{
'apiKey': []
apiKey: []
}

@@ -307,12 +307,12 @@ ]

definitions: {
'ExampleModel': {
'type': 'object',
'properties': {
'id': {
'type': 'integer',
'description': 'Some id'
ExampleModel: {
type: 'object',
properties: {
id: {
type: 'integer',
description: 'Some id'
},
'name': {
'type': 'string',
'description': 'Name of smthng'
name: {
type: 'string',
description: 'Name of smthng'
}

@@ -319,0 +319,0 @@ }

@@ -23,2 +23,3 @@ import fastify = require('fastify');

summary: 'qwerty',
consumes: ['application/json', 'multipart/form-data'],
security: [{ apiKey: []}]

@@ -28,2 +29,10 @@ }

app.get('/public/route', {
schema: {
description: 'returns 200 OK',
summary: 'qwerty',
security: []
}
}, (req, reply) => {});
app

@@ -30,0 +39,0 @@ .register(fastifySwagger, {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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