[V4.3.1] Incorrect Responce type for vnfLcmOpOccsGet in VnLcmOpOccsApi.java
Using Openapi Code-generator 6.2.1 for "Spring-Boot" (https://github.com/OpenAPITools/openapi-generator) generated the VnfLcmOpOccsApi.java,
the type of response should be List<VnfLcmOpOcc>
instead of <VnfLcmOpOcc>
default ResponseEntity<VnfLcmOpOcc> vnfLcmOpOccsGet(String accept, String version, String authorization, String filter, String allFields, String fields, String excludeFields, String excludeDefault, String nextpageOpaqueMarker) {
getRequest().ifPresent(request -> {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
String exampleString = "{ \"lcmCoordinations\" : [ \"{}\", \"{}\" ], \"grantId\" : \"grantId\", \"_links\" : \"{}\", \"warnings\" : [ \"warnings\", \"warnings\" ], \"error\" : { \"instance\" : \"instance\", \"detail\" : \"detail\", \"type\" : \"type\", \"title\" : \"title\", \"status\" : 0 }, \"vnfInstanceId\" : \"vnfInstanceId\", \"resourceChanges\" : \"{}\", \"vnfSnapshotInfoId\" : \"vnfSnapshotInfoId\", \"rejectedLcmCoordinations\" : [ \"{}\", \"{}\" ], \"operationParams\" : \"{}\", \"modificationsTriggeredByVnfPkgChange\" : { \"vnfProductName\" : \"vnfProductName\", \"metadata\" : \"{}\", \"extensions\" : \"{}\", \"vnfdVersion\" : \"vnfdVersion\", \"vimConnectionInfo\" : { \"key\" : { \"vimType\" : \"vimType\", \"vimId\" : \"vimId\", \"extra\" : \"{}\", \"interfaceInfo\" : \"{}\", \"accessInfo\" : \"{}\" } }, \"vnfProvider\" : \"vnfProvider\", \"vnfConfigurableProperties\" : \"{}\", \"vnfdId\" : \"vnfdId\", \"vnfSoftwareVersion\" : \"vnfSoftwareVersion\" }, \"stateEnteredTime\" : \"2000-01-23T04:56:07.000+00:00\", \"affectedVipCps\" : [ { \"cpdId\" : \"cpdId\", \"changeType\" : \"ADDED\", \"vnfdId\" : \"vnfdId\", \"cpInstanceId\" : \"cpInstanceId\" }, { \"cpdId\" : \"cpdId\", \"changeType\" : \"ADDED\", \"vnfdId\" : \"vnfdId\", \"cpInstanceId\" : \"cpInstanceId\" } ], \"changedInfo\" : { \"vnfProductName\" : \"vnfProductName\", \"metadata\" : \"{}\", \"extensions\" : \"{}\", \"vimConnectionInfo\" : { \"key\" : { \"vimType\" : \"vimType\", \"vimId\" : \"vimId\", \"extra\" : \"{}\", \"interfaceInfo\" : \"{}\", \"accessInfo\" : \"{}\" } }, \"vnfdVersion\" : \"vnfdVersion\", \"vnfProvider\" : \"vnfProvider\", \"vnfConfigurableProperties\" : \"{}\", \"vnfdId\" : \"vnfdId\", \"vnfInstanceName\" : \"vnfInstanceName\", \"vnfInstanceDescription\" : \"vnfInstanceDescription\", \"vnfSoftwareVersion\" : \"vnfSoftwareVersion\" }, \"changedExtConnectivity\" : [ { \"resourceHandle\" : { \"containerNamespace\" : \"containerNamespace\", \"resourceId\" : \"resourceId\", \"vimConnectionId\" : \"vimConnectionId\", \"vimLevelAdditionalResourceInfo\" : { \"hostName\" : \"hostName\", \"persistentVolume\" : \"persistentVolume\", \"additionalInfo\" : \"{}\" }, \"vimLevelResourceType\" : \"vimLevelResourceType\", \"resourceProviderId\" : \"resourceProviderId\" }, \"extNetAttDefResource\" : [ { \"associatedExtCpId\" : [ null, null ], \"netAttDefResource\" : { \"containerNamespace\" : \"containerNamespace\", \"resourceId\" : \"resourceId\", \"vimConnectionId\" : \"vimConnectionId\", \"vimLevelAdditionalResourceInfo\" : { \"hostName\" : \"hostName\", \"persistentVolume\" : \"persistentVolume\", \"additionalInfo\" : \"{}\" }, \"vimLevelResourceType\" : \"vimLevelResourceType\", \"resourceProviderId\" : \"resourceProviderId\" }, \"associatedVnfcCpId\" : [ null, null ], \"netAttDefResourceInfoId\" : \"netAttDefResourceInfoId\" }, { \"associatedExtCpId\" : [ null, null ], \"netAttDefResource\" : { \"containerNamespace\" : \"containerNamespace\", \"resourceId\" : \"resourceId\", \"vimConnectionId\" : \"vimConnectionId\", \"vimLevelAdditionalResourceInfo\" : { \"hostName\" : \"hostName\", \"persistentVolume\" : \"persistentVolume\", \"additionalInfo\" : \"{}\" }, \"vimLevelResourceType\" : \"vimLevelResourceType\", \"resourceProviderId\" : \"resourceProviderId\" }, \"associatedVnfcCpId\" : [ null, null ], \"netAttDefResourceInfoId\" : \"netAttDefResourceInfoId\" } ], \"extLinkPorts\" : [ { \"resourceHandle\" : { \"containerNamespace\" : \"containerNamespace\", \"resourceId\" : \"resourceId\", \"vimConnectionId\" : \"vimConnectionId\", \"vimLevelAdditionalResourceInfo\" : { \"hostName\" : \"hostName\", \"persistentVolume\" : \"persistentVolume\", \"additionalInfo\" : \"{}\" }, \"vimLevelResourceType\" : \"vimLevelResourceType\", \"resourceProviderId\" : \"resourceProviderId\" }, \"secondaryCpInstanceId\" : \"secondaryCpInstanceId\", \"trunkResourceId\" : \"trunkResourceId\", \"id\" : \"id\", \"cpInstanceId\" : \"cpInstanceId\" }, { \"resourceHandle\" : { \"containerNamespace\" : \"containerNamespace\", \"resourceId\" : \"resourceId\", \"vimConnectionId\" : \"vimConnectionId\", \"vimLevelAdditionalResourceInfo\" : { \"hostName\" : \"hostName\", \"persistentVolume\" : \"persistentVolume\", \"additionalInfo\" : \"{}\" }, \"vimLevelResourceType\" : \"vimLevelResourceType\", \"resourceProviderId\" : \"resourceProviderId\" }, \"secondaryCpInstanceId\" : \"secondaryCpInstanceId\", \"trunkResourceId\" : \"trunkResourceId\", \"id\" : \"id\", \"cpInstanceId\" : \"cpInstanceId\" } ], \"id\" : \"id\", \"currentVnfExtCpData\" : [ { \"cpdId\" : \"cpdId\", \"cpConfig\" : { \"key\" : { \"linkPortId\" : \"linkPortId\", \"cpProtocolData\" : [ { \"virtualCpAddress\" : { \"loadBalancerIp\" : \"loadBalancerIp\", \"type\" : \"IPV4\" }, \"ipOverEthernet\" : { \"macAddress\" : \"macAddress\", \"segmentationType\" : \"VLAN\", \"ipAddresses\" : [ \"{}\", \"{}\" ], \"segmentationId\" : \"segmentationId\" }, \"layerProtocol\" : \"IP_OVER_ETHERNET\" }, { \"virtualCpAddress\" : { \"loadBalancerIp\" : \"loadBalancerIp\", \"type\" : \"IPV4\" }, \"ipOverEthernet\" : { \"macAddress\" : \"macAddress\", \"segmentationType\" : \"VLAN\", \"ipAddresses\" : [ \"{}\", \"{}\" ], \"segmentationId\" : \"segmentationId\" }, \"layerProtocol\" : \"IP_OVER_ETHERNET\" } ], \"parentCpConfigId\" : \"parentCpConfigId\", \"netAttDefResourceId\" : [ null, null ], \"createExtLinkPort\" : true } } }, { \"cpdId\" : \"cpdId\", \"cpConfig\" : { \"key\" : { \"linkPortId\" : \"linkPortId\", \"cpProtocolData\" : [ { \"virtualCpAddress\" : { \"loadBalancerIp\" : \"loadBalancerIp\", \"type\" : \"IPV4\" }, \"ipOverEthernet\" : { \"macAddress\" : \"macAddress\", \"segmentationType\" : \"VLAN\", \"ipAddresses\" : [ \"{}\", \"{}\" ], \"segmentationId\" : \"segmentationId\" }, \"layerProtocol\" : \"IP_OVER_ETHERNET\" }, { \"virtualCpAddress\" : { \"loadBalancerIp\" : \"loadBalancerIp\", \"type\" : \"IPV4\" }, \"ipOverEthernet\" : { \"macAddress\" : \"macAddress\", \"segmentationType\" : \"VLAN\", \"ipAddresses\" : [ \"{}\", \"{}\" ], \"segmentationId\" : \"segmentationId\" }, \"layerProtocol\" : \"IP_OVER_ETHERNET\" } ], \"parentCpConfigId\" : \"parentCpConfigId\", \"netAttDefResourceId\" : [ null, null ], \"createExtLinkPort\" : true } } } ] }, { \"resourceHandle\" : { \"containerNamespace\" : \"containerNamespace\", \"resourceId\" : \"resourceId\", \"vimConnectionId\" : \"vimConnectionId\", \"vimLevelAdditionalResourceInfo\" : { \"hostName\" : \"hostName\", \"persistentVolume\" : \"persistentVolume\", \"additionalInfo\" : \"{}\" }, \"vimLevelResourceType\" : \"vimLevelResourceType\", \"resourceProviderId\" : \"resourceProviderId\" }, \"extNetAttDefResource\" : [ { \"associatedExtCpId\" : [ null, null ], \"netAttDefResource\" : { \"containerNamespace\" : \"containerNamespace\", \"resourceId\" : \"resourceId\", \"vimConnectionId\" : \"vimConnectionId\", \"vimLevelAdditionalResourceInfo\" : { \"hostName\" : \"hostName\", \"persistentVolume\" : \"persistentVolume\", \"additionalInfo\" : \"{}\" }, \"vimLevelResourceType\" : \"vimLevelResourceType\", \"resourceProviderId\" : \"resourceProviderId\" }, \"associatedVnfcCpId\" : [ null, null ], \"netAttDefResourceInfoId\" : \"netAttDefResourceInfoId\" }, { \"associatedExtCpId\" : [ null, null ], \"netAttDefResource\" : { \"containerNamespace\" : \"containerNamespace\", \"resourceId\" : \"resourceId\", \"vimConnectionId\" : \"vimConnectionId\", \"vimLevelAdditionalResourceInfo\" : { \"hostName\" : \"hostName\", \"persistentVolume\" : \"persistentVolume\", \"additionalInfo\" : \"{}\" }, \"vimLevelResourceType\" : \"vimLevelResourceType\", \"resourceProviderId\" : \"resourceProviderId\" }, \"associatedVnfcCpId\" : [ null, null ], \"netAttDefResourceInfoId\" : \"netAttDefResourceInfoId\" } ], \"extLinkPorts\" : [ { \"resourceHandle\" : { \"containerNamespace\" : \"containerNamespace\", \"resourceId\" : \"resourceId\", \"vimConnectionId\" : \"vimConnectionId\", \"vimLevelAdditionalResourceInfo\" : { \"hostName\" : \"hostName\", \"persistentVolume\" : \"persistentVolume\", \"additionalInfo\" : \"{}\" }, \"vimLevelResourceType\" : \"vimLevelResourceType\", \"resourceProviderId\" : \"resourceProviderId\" }, \"secondaryCpInstanceId\" : \"secondaryCpInstanceId\", \"trunkResourceId\" : \"trunkResourceId\", \"id\" : \"id\", \"cpInstanceId\" : \"cpInstanceId\" }, { \"resourceHandle\" : { \"containerNamespace\" : \"containerNamespace\", \"resourceId\" : \"resourceId\", \"vimConnectionId\" : \"vimConnectionId\", \"vimLevelAdditionalResourceInfo\" : { \"hostName\" : \"hostName\", \"persistentVolume\" : \"persistentVolume\", \"additionalInfo\" : \"{}\" }, \"vimLevelResourceType\" : \"vimLevelResourceType\", \"resourceProviderId\" : \"resourceProviderId\" }, \"secondaryCpInstanceId\" : \"secondaryCpInstanceId\", \"trunkResourceId\" : \"trunkResourceId\", \"id\" : \"id\", \"cpInstanceId\" : \"cpInstanceId\" } ], \"id\" : \"id\", \"currentVnfExtCpData\" : [ { \"cpdId\" : \"cpdId\", \"cpConfig\" : { \"key\" : { \"linkPortId\" : \"linkPortId\", \"cpProtocolData\" : [ { \"virtualCpAddress\" : { \"loadBalancerIp\" : \"loadBalancerIp\", \"type\" : \"IPV4\" }, \"ipOverEthernet\" : { \"macAddress\" : \"macAddress\", \"segmentationType\" : \"VLAN\", \"ipAddresses\" : [ \"{}\", \"{}\" ], \"segmentationId\" : \"segmentationId\" }, \"layerProtocol\" : \"IP_OVER_ETHERNET\" }, { \"virtualCpAddress\" : { \"loadBalancerIp\" : \"loadBalancerIp\", \"type\" : \"IPV4\" }, \"ipOverEthernet\" : { \"macAddress\" : \"macAddress\", \"segmentationType\" : \"VLAN\", \"ipAddresses\" : [ \"{}\", \"{}\" ], \"segmentationId\" : \"segmentationId\" }, \"layerProtocol\" : \"IP_OVER_ETHERNET\" } ], \"parentCpConfigId\" : \"parentCpConfigId\", \"netAttDefResourceId\" : [ null, null ], \"createExtLinkPort\" : true } } }, { \"cpdId\" : \"cpdId\", \"cpConfig\" : { \"key\" : { \"linkPortId\" : \"linkPortId\", \"cpProtocolData\" : [ { \"virtualCpAddress\" : { \"loadBalancerIp\" : \"loadBalancerIp\", \"type\" : \"IPV4\" }, \"ipOverEthernet\" : { \"macAddress\" : \"macAddress\", \"segmentationType\" : \"VLAN\", \"ipAddresses\" : [ \"{}\", \"{}\" ], \"segmentationId\" : \"segmentationId\" }, \"layerProtocol\" : \"IP_OVER_ETHERNET\" }, { \"virtualCpAddress\" : { \"loadBalancerIp\" : \"loadBalancerIp\", \"type\" : \"IPV4\" }, \"ipOverEthernet\" : { \"macAddress\" : \"macAddress\", \"segmentationType\" : \"VLAN\", \"ipAddresses\" : [ \"{}\", \"{}\" ], \"segmentationId\" : \"segmentationId\" }, \"layerProtocol\" : \"IP_OVER_ETHERNET\" } ], \"parentCpConfigId\" : \"parentCpConfigId\", \"netAttDefResourceId\" : [ null, null ], \"createExtLinkPort\" : true } } } ] } ], \"startTime\" : \"2000-01-23T04:56:07.000+00:00\", \"id\" : \"id\", \"isAutomaticInvocation\" : true, \"isCancelPending\" : true }";
ApiUtil.setExampleResponse(request, "application/json", exampleString);
break;
}
}
});
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
Edited by Varun Guguloth