SOL005 issueshttps://forge.etsi.org/rep/nfv/SOL005/-/issues2023-02-13T13:30:06Zhttps://forge.etsi.org/rep/nfv/SOL005/-/issues/36PUT /vnf_packages/{vnfPkgId}/package_content; Incorrect schema of the request...2023-02-13T13:30:06ZbanerjeesuPUT /vnf_packages/{vnfPkgId}/package_content; Incorrect schema of the request “#/components/requestBodies/VnfPackageContentRequest”As per the SOL003 (4.3.1) Spec, the VnfPackageContentRequest has no fields / properties prescribed. However, in the swagger (yaml) declarations, the properties “file” is defined as application/binary:
```
VnfPackageContentRequest:
...As per the SOL003 (4.3.1) Spec, the VnfPackageContentRequest has no fields / properties prescribed. However, in the swagger (yaml) declarations, the properties “file” is defined as application/binary:
```
VnfPackageContentRequest:
content:
application/binary:
schema:
properties:
file:
type: file
description: |
The payload body contains a ZIP file that represents the VNF package. The "Content-Type" HTTP header shall
be set according to the type of the file, i.e. to "application/zip" for a VNF Package as defined in ETSI GS NFV-SOL 004.
format: binary
required: true
```
This causes the Open-Api Code generator for the Spring-boot to nest a JSON field “file” within a wrapper class: “VnfPackagesVnfPkgIdPackageContentGetRequest.java”
So, the Spring framework rejects the request as Unsupported Media Type “application/zip”. Supported Media Types: [“application/json”]
```
/**
* Class: VnfPackagesVnfPkgIdPackageContentGetRequest
*/
@JsonTypeName("_vnf_packages__vnfPkgId__package_content_get_request")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2023-02-13T18:25:48.058910+05:30[Asia/Kolkata]")
public class VnfPackagesVnfPkgIdPackageContentGetRequest {
@JsonProperty("file")
private org.springframework.core.io.Resource file = null;
public VnfPackagesVnfPkgIdPackageContentGetRequest file(org.springframework.core.io.Resource file) {
this.file = file;
return this;
}
```
—--
> Fix required: The swagger SOL005/src/SOL005/VNFPackageManagement/VNFPackageManagement.yaml should NOT define a property “file”, given the request content in its entirety is a BINARY (and not a JSON/XML)https://forge.etsi.org/rep/nfv/SOL005/-/issues/23Cannot specify default NS instantiation level of InstantiateVnfData data type2022-07-29T09:53:10ZPietro PiscioneCannot specify default NS instantiation level of InstantiateVnfData data typeAccording to Note 4 of InstantiateVnfData data type: "[...] If none of the two attributes (vnfInstantiationLevelId or targetScaleLevelInfo) are present, the default instantiation level as declared in the VNFD shall be used."
It is not cl...According to Note 4 of InstantiateVnfData data type: "[...] If none of the two attributes (vnfInstantiationLevelId or targetScaleLevelInfo) are present, the default instantiation level as declared in the VNFD shall be used."
It is not clear in which attribute such default instantiation level should be placed.