@fastify/swagger
Advanced tools
Comparing version 6.0.1 to 6.1.0
@@ -28,2 +28,3 @@ 'use strict' | ||
return { | ||
...openapi, | ||
info, | ||
@@ -55,2 +56,3 @@ servers, | ||
if (opts.openapi) openapiObject.openapi = opts.openapi | ||
if (opts.info) openapiObject.info = opts.info | ||
@@ -57,0 +59,0 @@ if (opts.servers) openapiObject.servers = opts.servers |
{ | ||
"name": "@fastify/swagger", | ||
"version": "6.0.1", | ||
"version": "6.1.0", | ||
"description": "Serve Swagger/OpenAPI documentation for Fastify, supporting dynamic generation", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,2 +25,16 @@ 'use strict' | ||
test('openapi version can be overridden', t => { | ||
t.plan(2) | ||
const fastify = Fastify() | ||
fastify.register(fastifySwagger, { openapi: { openapi: '3.1.0' } }) | ||
fastify.ready(err => { | ||
t.error(err) | ||
const openapiObject = fastify.swagger() | ||
t.equal(openapiObject.openapi, '3.1.0') | ||
}) | ||
}) | ||
test('openapi should have default info properties', t => { | ||
@@ -27,0 +41,0 @@ t.plan(3) |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
5482198
16246
6