@fastify/swagger-ui
Advanced tools
Comparing version 1.10.2 to 2.0.0
@@ -28,3 +28,5 @@ 'use strict' | ||
fastify.register(require('../index')) | ||
fastify.register(require('../index'), { | ||
validatorUrl: false | ||
}) | ||
@@ -117,4 +119,4 @@ fastify.register(async function (fastify) { | ||
fastify.listen({ port: 3000 }, err => { | ||
fastify.listen({ port: 3000, hostname: '0.0.0.0' }, err => { | ||
if (err) throw err | ||
}) |
@@ -27,3 +27,4 @@ 'use strict' | ||
], | ||
layout: "StandaloneLayout" | ||
layout: "StandaloneLayout", | ||
validatorUrl: ${serialize(opts.validatorUrl)}, | ||
}, config, { | ||
@@ -30,0 +31,0 @@ url: resolveUrl('./json').replace('static/json', 'json'), |
{ | ||
"name": "@fastify/swagger-ui", | ||
"version": "1.10.2", | ||
"version": "2.0.0", | ||
"description": "Serve Swagger-ui for Fastify", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -308,2 +308,16 @@ # @fastify/swagger-ui | ||
#### validatorUrl | ||
[SwaggerUI](https://github.com/swagger-api/swagger-ui/) can automatically validate the given specification using an online validator. | ||
To enable this behavior you can pass the [`validatorUrl`](https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md) option | ||
to this plugin which will be forwarded to SwaggerUI. | ||
```js | ||
fastify.register('@fastify/swagger-ui', { | ||
validatorUrl: 'https://validator.swagger.io/validator' | ||
}) | ||
``` | ||
Note that this behavior is disabled by default in `@fastify/swagger-ui`. | ||
<a name="license"></a> | ||
@@ -310,0 +324,0 @@ ## License |
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
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
5169251
11994
326
2
15