hapi-swagger
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -162,4 +162,36 @@ 'use strict'; | ||
} | ||
},{ | ||
method: 'POST', | ||
path: '/time/1', | ||
config: { | ||
tags: ['api'], | ||
handler: (request, reply) => { | ||
reply({ 'time': request.params.timestamp }).type('application/json'); | ||
}, | ||
validate: { | ||
payload: { | ||
timestamp: Joi.date().timestamp().default(() => Date.now(), 'Current Timestamp').raw().example(1458333333333) | ||
} | ||
} | ||
} | ||
},{ | ||
method: 'POST', | ||
path: '/time/2', | ||
config: { | ||
tags: ['api'], | ||
handler: (request, reply) => { | ||
reply({ 'time': request.params.timestamp }).type('application/json'); | ||
}, | ||
validate: { | ||
payload: { | ||
timestamp: Joi.date().timestamp().default(() => Date.now(), 'Current Timestamp').raw().example(1458333333333) | ||
} | ||
} | ||
} | ||
}]; | ||
{ | ||
"name": "hapi-swagger", | ||
"description": "A swagger documentation UI generator plugin for hapi", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"author": "Glenn Jones", | ||
@@ -43,3 +43,4 @@ "repository": { | ||
"hapi-auth-bearer-token": "^4.0.2", | ||
"js2xmlparser": "^1.0.0" | ||
"js2xmlparser": "^1.0.0", | ||
"hapi-auth-jwt2": "^5.7.0" | ||
}, | ||
@@ -46,0 +47,0 @@ "scripts": { |
@@ -154,3 +154,2 @@ # hapi-swagger | ||
* `produces`: (array) The mimetypes produced - default: `['application/json']` | ||
* `security:`: (array) Containing [Security Requirement Object](https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#securityRequirementObject). No defaults are provided. | ||
* `order`: (int) The order in which endpoints are displayed, works with `options.sortEndpoints = 'ordered'` | ||
@@ -157,0 +156,0 @@ * `deprecated`: (boolean) Weather a endpoint has been deprecated - default: `false` |
Sorry, the diff of this file is not supported yet
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
3735916
101
43790
14
75363
632