Newest Swagger UI requires application/x-www-form-urlencoded.
UI will fail to POST if this consumes type is not specified.
This commit is contained in:
parent
8a166083fe
commit
d98a7877d4
|
@ -26,8 +26,8 @@ function Swagger(loopbackApplication, swaggerApp, opts) {
|
||||||
swaggerVersion: '1.2',
|
swaggerVersion: '1.2',
|
||||||
basePath: loopbackApplication.get('restApiRoot') || '/api',
|
basePath: loopbackApplication.get('restApiRoot') || '/api',
|
||||||
resourcePath: 'resources',
|
resourcePath: 'resources',
|
||||||
// Default consumes/produces to application/json
|
// Default consumes/produces
|
||||||
consumes: ['application/json'],
|
consumes: ['application/json', 'application/x-www-form-urlencoded'],
|
||||||
produces: ['application/json'],
|
produces: ['application/json'],
|
||||||
version: getVersion()
|
version: getVersion()
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue