private static void fillOutputPayload(Response swaggerResponse, org.restlet.ext.apispark.internal.model.Response response, Operation swaggerOperation, Contract contract, Map<String, Object> parameters) { Property property = swaggerResponse.getSchema(); if (property == null) { return; } PayLoad payload = null; if (property instanceof RefProperty) { RefProperty refProperty = (RefProperty) property; Object declaredPayload = parameters.get(refProperty.get$ref()); if (declaredPayload != null && declaredPayload instanceof PayLoad) { payload = (PayLoad) declaredPayload; } } if (payload == null) { payload = new PayLoad(); payload.setDescription(property.getDescription()); payload.setArray(property instanceof ArrayProperty); payload.setType(SwaggerTypes.toDefinitionType(property)); } Representation representation = contract.getRepresentation(payload.getType()); if (representation != null) { representation.addSections(swaggerOperation.getTags()); } response.setOutputPayLoad(payload); }
private static void fillOutputPayload(Response swaggerResponse, org.restlet.ext.platform.internal.model.Response response, Operation swaggerOperation, Contract contract, Map<String, Object> parameters) { Property property = swaggerResponse.getSchema(); if (property == null) { return; } PayLoad payload = null; if (property instanceof RefProperty) { RefProperty refProperty = (RefProperty) property; Object declaredPayload = parameters.get(refProperty.get$ref()); if (declaredPayload != null && declaredPayload instanceof PayLoad) { payload = (PayLoad) declaredPayload; } } if (payload == null) { payload = new PayLoad(); payload.setDescription(property.getDescription()); payload.setArray(property instanceof ArrayProperty); payload.setType(SwaggerTypes.toDefinitionType(property)); } Representation representation = contract.getRepresentation(payload.getType()); if (representation != null) { representation.addSections(swaggerOperation.getTags()); } response.setOutputPayLoad(payload); }
private static void fillOutputPayload(Response swaggerResponse, org.restlet.ext.platform.internal.model.Response response, Operation swaggerOperation, Contract contract, Map<String, Object> parameters) { Property property = swaggerResponse.getSchema(); if (property == null) { return; } PayLoad payload = null; if (property instanceof RefProperty) { RefProperty refProperty = (RefProperty) property; Object declaredPayload = parameters.get(refProperty.get$ref()); if (declaredPayload != null && declaredPayload instanceof PayLoad) { payload = (PayLoad) declaredPayload; } } if (payload == null) { payload = new PayLoad(); payload.setDescription(property.getDescription()); payload.setArray(property instanceof ArrayProperty); payload.setType(SwaggerTypes.toDefinitionType(property)); } Representation representation = contract.getRepresentation(payload.getType()); if (representation != null) { representation.addSections(swaggerOperation.getTags()); } response.setOutputPayLoad(payload); }
private static void fillOutputPayload(Response swaggerResponse, org.restlet.ext.platform.internal.model.Response response, Operation swaggerOperation, Contract contract, Map<String, Object> parameters) { Property property = swaggerResponse.getSchema(); if (property == null) { return; } PayLoad payload = null; if (property instanceof RefProperty) { RefProperty refProperty = (RefProperty) property; Object declaredPayload = parameters.get(refProperty.get$ref()); if (declaredPayload != null && declaredPayload instanceof PayLoad) { payload = (PayLoad) declaredPayload; } } if (payload == null) { payload = new PayLoad(); payload.setDescription(property.getDescription()); payload.setArray(property instanceof ArrayProperty); payload.setType(SwaggerTypes.toDefinitionType(property)); } Representation representation = contract.getRepresentation(payload.getType()); if (representation != null) { representation.addSections(swaggerOperation.getTags()); } response.setOutputPayLoad(payload); }
private static void fillOutputPayload(Response swaggerResponse, org.restlet.ext.platform.internal.model.Response response, Operation swaggerOperation, Contract contract, Map<String, Object> parameters) { Property property = swaggerResponse.getSchema(); if (property == null) { return; } PayLoad payload = null; if (property instanceof RefProperty) { RefProperty refProperty = (RefProperty) property; Object declaredPayload = parameters.get(refProperty.get$ref()); if (declaredPayload != null && declaredPayload instanceof PayLoad) { payload = (PayLoad) declaredPayload; } } if (payload == null) { payload = new PayLoad(); payload.setDescription(property.getDescription()); payload.setArray(property instanceof ArrayProperty); payload.setType(SwaggerTypes.toDefinitionType(property)); } Representation representation = contract.getRepresentation(payload.getType()); if (representation != null) { representation.addSections(swaggerOperation.getTags()); } response.setOutputPayLoad(payload); }