Missing `type: file` and relevant content-type/accept headers in some endpoints in NSDManagement and VNFPackageManagement
In branch 2.8.1, 2.7.1-maintenance and possibly others, there are missing definitions on operations that accept or return files and relevant header restrictions. Here's two patches for the NSDManagement and VNFPackageManagement:
diff --git a/src/SOL005/NSDManagement/NSDManagement.yaml b/src/SOL005/NSDManagement/NSDManagement.yaml
index f3dd8cc..eff8fd1 100644
--- a/src/SOL005/NSDManagement/NSDManagement.yaml
+++ b/src/SOL005/NSDManagement/NSDManagement.yaml
@@ -601,6 +601,8 @@ paths:
Content-Type:
description: The MIME type of the body of the response.
type: string
+ enum:
+ - application/zip
maximum: 1
minimum: 1
WWW-Authenticate:
@@ -617,6 +619,8 @@ paths:
type: string
maximum: 1
minimum: 1
+ schema:
+ type: file
206:
# description: >
# 206 PARTIAL CONTENT
@@ -702,6 +706,15 @@ paths:
type: string
enum:
- application/zip
+ - in: formData
+ name: file
+ required: false
+ type: file
+ description: >
+ The payload body contains a ZIP file that represents the NSD archive, as specified above.
+ The request shall set the "Content-Type" HTTP header to "application/zip"
+ consumes:
+ - multipart/form-data
responses:
202:
description: >
diff --git a/src/SOL005/VNFPackageManagement/VNFPackageManagement.yaml b/src/SOL005/VNFPackageManagement/VNFPackageManagement.yaml
index f53a644..f150517 100644
--- a/src/SOL005/VNFPackageManagement/VNFPackageManagement.yaml
+++ b/src/SOL005/VNFPackageManagement/VNFPackageManagement.yaml
@@ -540,6 +538,8 @@ paths:
Content-Type:
description: The MIME type of the body of the response.
type: string
+ enum:
+ - application/zip
maximum: 1
minimum: 1
WWW-Authenticate:
@@ -556,6 +556,8 @@ paths:
type: string
maximum: 1
minimum: 1
+ schema:
+ type: file
400:
$ref: "../responses/SOL005_resp.yaml#/responses/400"
401:
@@ -834,6 +832,9 @@ paths:
Content-Type:
description: The MIME type of the body of the response.
type: string
+ enum:
+ - text/plain
+ - application/zip
maximum: 1
minimum: 1
WWW-Authenticate:
@@ -850,6 +851,8 @@ paths:
type: string
maximum: 1
minimum: 1
+ schema:
+ type: file
400:
$ref: "../responses/SOL005_resp.yaml#/responses/400"
401:
@@ -941,6 +944,8 @@ paths:
Content-Type:
description: The MIME type of the body of the response.
type: string
+ enum:
+ - application/zip
maximum: 1
minimum: 1
WWW-Authenticate:
@@ -957,6 +962,8 @@ paths:
type: string
maximum: 1
minimum: 1
+ schema:
+ type: file
206:
$ref: "../responses/SOL005_resp.yaml#/responses/206"
409:
@@ -996,7 +1003,7 @@ paths:
consumes:
- multipart/form-data
parameters:
- - name: Accept
+ - name: Content-Type
description: >
Content-Types that are acceptable for the response.
in: header
@@ -1181,6 +1188,8 @@ paths:
Content-Type:
description: The MIME type of the body of the response.
type: string
+ enum:
+ - application/zip
maximum: 1
minimum: 1
WWW-Authenticate:
@@ -1197,6 +1206,8 @@ paths:
type: string
maximum: 1
minimum: 1
+ schema:
+ type: file
206:
description: >
206 Partial Content.
@@ -1220,6 +1231,8 @@ paths:
Content-Type:
description: The MIME type of the body of the response.
type: string
+ enum:
+ - application/zip
maximum: 1
minimum: 1
WWW-Authenticate:
@@ -1230,6 +1243,8 @@ paths:
has provided an invalid authorization token.
maximum: 1
minimum: 0
+ schema:
+ type: file
400:
$ref: "../responses/SOL005_resp.yaml#/responses/400"
401:
@@ -1460,6 +1475,8 @@ paths:
type: string
maximum: 1
minimum: 1
+ schema:
+ type: file
206:
description: >
Partial Content.
@@ -1497,6 +1514,8 @@ paths:
has provided an invalid authorization token.
maximum: 1
minimum: 0
+ schema:
+ type: file
400:
$ref: "../responses/SOL005_resp.yaml#/responses/400"
401: