forked from loafle/openapi-generator-original
Unit tests should not be skipped when MediaType defines its underlying structure as json
(*/*+json
, according to [RFC6838, section 4.2.8](https://tools.ietf.org/html/rfc6838#section-4.2.8)). (#2390)
This commit is contained in:
parent
218c2e75ab
commit
8bb01ed149
@ -802,7 +802,8 @@ public class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme
|
|||||||
if (operation.consumes != null ) {
|
if (operation.consumes != null ) {
|
||||||
if (operation.consumes.size() == 1) {
|
if (operation.consumes.size() == 1) {
|
||||||
Map<String, String> consume = operation.consumes.get(0);
|
Map<String, String> consume = operation.consumes.get(0);
|
||||||
if (! "application/json".equals(consume.get(MEDIA_TYPE))) {
|
if (!("application/json".equals(consume.get(MEDIA_TYPE))
|
||||||
|
|| consume.get(MEDIA_TYPE).endsWith("+json"))) {
|
||||||
skipTests.put("reason", consume.get(MEDIA_TYPE) + " not supported by Connexion");
|
skipTests.put("reason", consume.get(MEDIA_TYPE) + " not supported by Connexion");
|
||||||
if ("multipart/form-data".equals(consume.get(MEDIA_TYPE))) {
|
if ("multipart/form-data".equals(consume.get(MEDIA_TYPE))) {
|
||||||
operation.isMultipart = Boolean.TRUE;
|
operation.isMultipart = Boolean.TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user