fastify-swagger
Advanced tools
Comparing version 2.2.1 to 2.3.0
@@ -119,2 +119,6 @@ 'use strict' | ||
// the resulting schema will be in this order | ||
if (schema.operationId) { | ||
swaggerMethod.operationId = schema.operationId | ||
} | ||
if (schema.summary) { | ||
@@ -132,2 +136,6 @@ swaggerMethod.summary = schema.summary | ||
if (schema.produces) { | ||
swaggerMethod.produces = schema.produces | ||
} | ||
if (schema.consumes) { | ||
@@ -134,0 +142,0 @@ swaggerMethod.consumes = schema.consumes |
{ | ||
"name": "fastify-swagger", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "Generate Swagger files automatically for Fastify.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -441,3 +441,3 @@ 'use strict' | ||
test('route meta info', t => { | ||
t.plan(6) | ||
t.plan(8) | ||
const fastify = Fastify() | ||
@@ -449,5 +449,7 @@ | ||
schema: { | ||
operationId: 'doSomething', | ||
summary: 'Route summary', | ||
tags: ['tag'], | ||
description: 'Route description', | ||
produces: ['application/octet-stream'], | ||
consumes: ['application/x-www-form-urlencoded'] | ||
@@ -467,5 +469,7 @@ } | ||
t.ok(definedPath) | ||
t.equal(opts.schema.operationId, definedPath.operationId) | ||
t.equal(opts.schema.summary, definedPath.summary) | ||
t.same(opts.schema.tags, definedPath.tags) | ||
t.equal(opts.schema.description, definedPath.description) | ||
t.same(opts.schema.produces, definedPath.produces) | ||
t.same(opts.schema.consumes, definedPath.consumes) | ||
@@ -472,0 +476,0 @@ }) |
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
9234114
10626