aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api
diff options
context:
space:
mode:
authorChenfei Gao <cgao@research.att.com>2019-09-16 22:35:47 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-10-15 16:08:56 +0000
commitf22846dd8b032876addae750a5d24fd6339b7c4b (patch)
tree1020d36c8adb9cb2945ddc7f5dc4f12d09e8e21d /docs/api
parent09ed59bc86f78ad25076c326f7240f5473c6e6c6 (diff)
Update api swagger docs to reflect application/yaml support
Issue-ID: POLICY-2102 Change-Id: I46c9146d7c35edd1dfdc75b1efc82e89a1b726ef Signed-off-by: Chenfei Gao <cgao@research.att.com>
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/api.rst2
-rw-r--r--docs/api/swagger/guard-policy-api.json14
-rw-r--r--docs/api/swagger/healthcheck-api.json2
-rw-r--r--docs/api/swagger/operational-policy-api.json12
-rw-r--r--docs/api/swagger/policy-api.json16
-rw-r--r--docs/api/swagger/policytype-api.json14
-rw-r--r--docs/api/swagger/statistics-api.json2
7 files changed, 31 insertions, 31 deletions
diff --git a/docs/api/api.rst b/docs/api/api.rst
index fc0f106f..ecaf4151 100644
--- a/docs/api/api.rst
+++ b/docs/api/api.rst
@@ -125,7 +125,7 @@ x-onap-requestid is used to track REST transactions for logging purpose, as desc
.. swaggerv2doc:: swagger/policy-api.json
It is worth noting that in POST policy API, client needs to provide a policy payload encoded in well-formed TOSCA Service Template, and
-in the JSON payload, "type" field value should strictly match the policy type name embedded in the API path (case sensitive).
+in the JSON/YAML payload, "type" field value should strictly match the policy type name embedded in the API path (case sensitive).
Otherwise, it will complain the policy type does not exist. Please check out the sample policies in above policy table.
.. swaggerv2doc:: swagger/guard-policy-api.json
diff --git a/docs/api/swagger/guard-policy-api.json b/docs/api/swagger/guard-policy-api.json
index 7bb6c99a..87b45081 100644
--- a/docs/api/swagger/guard-policy-api.json
+++ b/docs/api/swagger/guard-policy-api.json
@@ -12,7 +12,7 @@
"summary" : "Retrieve the latest version of a particular guard policy",
"description" : "Returns the latest version of the specified guard policy",
"operationId" : "getLatestVersionOfGuardPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyId",
"in" : "path",
@@ -84,7 +84,7 @@
"summary" : "Retrieve deployed versions of a particular guard policy in pdp groups",
"description" : "Returns deployed versions of a specified guard policy in pdp groups",
"operationId" : "getDeployedVersionsOfGuardPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyId",
"in" : "path",
@@ -156,7 +156,7 @@
"summary" : "Retrieve one version of a particular guard policy",
"description" : "Returns a particular version of a specified guard policy",
"operationId" : "getSpecificVersionOfGuardPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyId",
"in" : "path",
@@ -232,8 +232,8 @@
"summary" : "Delete a particular version of a guard policy",
"description" : "Delete a particular version of a guard policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted",
"operationId" : "deleteSpecificVersionOfGuardPolicy",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
+ "consumes" : [ "application/json", "application/yaml" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyId",
"in" : "path",
@@ -314,8 +314,8 @@
"summary" : "Create a new guard policy",
"description" : "Create a new guard policy. Client should provide entity body of the new guard policy",
"operationId" : "createGuardPolicy",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
+ "consumes" : [ "application/json", "application/yaml" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "X-ONAP-RequestID",
"in" : "header",
diff --git a/docs/api/swagger/healthcheck-api.json b/docs/api/swagger/healthcheck-api.json
index 6605ee57..fefd595a 100644
--- a/docs/api/swagger/healthcheck-api.json
+++ b/docs/api/swagger/healthcheck-api.json
@@ -12,7 +12,7 @@
"summary" : "Perform a system healthcheck",
"description" : "Returns healthy status of the Policy API component",
"operationId" : "getHealthCheck",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [{
"name" : "X-ONAP-RequestID",
"in" : "header",
diff --git a/docs/api/swagger/operational-policy-api.json b/docs/api/swagger/operational-policy-api.json
index 0306f737..63d36dfe 100644
--- a/docs/api/swagger/operational-policy-api.json
+++ b/docs/api/swagger/operational-policy-api.json
@@ -12,7 +12,7 @@
"summary" : "Retrieve the latest version of a particular operational policy",
"description" : "Returns the latest version of the specified operational policy",
"operationId" : "getLatestVersionOfOperationalPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyId",
"in" : "path",
@@ -81,7 +81,7 @@
"summary" : "Retrieve deployed versions of a particular operational policy in pdp groups",
"description" : "Returns deployed versions of a specified operational policy in pdp groups",
"operationId" : "getDeployedVersionsOfOperationalPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyId",
"in" : "path",
@@ -153,7 +153,7 @@
"summary" : "Retrieve one version of a particular operational policy",
"description" : "Returns a particular version of a specified operational policy",
"operationId" : "getSpecificVersionOfOperationalPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyId",
"in" : "path",
@@ -226,7 +226,7 @@
"summary" : "Delete a particular version of a specified operational policy",
"description" : "Delete a particular version of an operational policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted",
"operationId" : "deleteSpecificVersionOfOperationalPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyId",
"in" : "path",
@@ -304,8 +304,8 @@
"summary" : "Create a new operational policy",
"description" : "Create a new operational policy. Client should provide entity body of the new operational policy",
"operationId" : "createOperationalPolicy",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
+ "consumes" : [ "application/json", "application/yaml" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "X-ONAP-RequestID",
"in" : "header",
diff --git a/docs/api/swagger/policy-api.json b/docs/api/swagger/policy-api.json
index 17c5d505..c95c960b 100644
--- a/docs/api/swagger/policy-api.json
+++ b/docs/api/swagger/policy-api.json
@@ -12,7 +12,7 @@
"summary" : "Retrieve all versions of a policy created for a particular policy type version",
"description" : "Returns a list of all versions of specified policy created for the specified policy type version",
"operationId" : "getAllPolicies",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyTypeId",
"in" : "path",
@@ -85,8 +85,8 @@
"summary" : "Create a new policy for a policy type version",
"description" : "Create a new policy for a policy type. Client should provide TOSCA body of the new policy",
"operationId" : "createPolicy",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
+ "consumes" : [ "application/json", "application/yaml" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyTypeId",
"in" : "path",
@@ -173,7 +173,7 @@
"summary" : "Retrieve all version details of a policy created for a particular policy type version",
"description" : "Returns a list of all version details of the specified policy",
"operationId" : "getAllVersionsOfPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyTypeId",
"in" : "path",
@@ -254,7 +254,7 @@
"summary" : "Retrieve one version of a policy created for a particular policy type version",
"description" : "Returns a particular version of specified policy created for the specified policy type version",
"operationId" : "getSpecificVersionOfPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyTypeId",
"in" : "path",
@@ -339,7 +339,7 @@
"summary" : "Delete a particular version of a policy",
"description" : "Delete a particular version of a policy. It must follow one rule. Rule: the version that has been deployed in PDP group(s) cannot be deleted",
"operationId" : "deleteSpecificVersionOfPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyTypeId",
"in" : "path",
@@ -429,7 +429,7 @@
"summary" : "Retrieve the latest version of a particular policy",
"description" : "Returns the latest version of specified policy",
"operationId" : "getLatestVersionOfPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyTypeId",
"in" : "path",
@@ -510,7 +510,7 @@
"summary" : "Retrieve deployed versions of a particular policy in pdp groups",
"description" : "Returns deployed versions of specified policy in pdp groups",
"operationId" : "getDeployedVersionsOfPolicy",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyTypeId",
"in" : "path",
diff --git a/docs/api/swagger/policytype-api.json b/docs/api/swagger/policytype-api.json
index 22151645..5f2de048 100644
--- a/docs/api/swagger/policytype-api.json
+++ b/docs/api/swagger/policytype-api.json
@@ -12,7 +12,7 @@
"summary" : "Retrieve existing policy types",
"description" : "Returns a list of existing policy types stored in Policy Framework",
"operationId" : "getAllPolicyTypes",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "X-ONAP-RequestID",
"in" : "header",
@@ -70,8 +70,8 @@
"summary" : "Create a new policy type",
"description" : "Create a new policy type. Client should provide TOSCA body of the new policy type",
"operationId" : "createPolicyType",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
+ "consumes" : [ "application/json", "application/yaml" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"in" : "body",
"name" : "body",
@@ -143,7 +143,7 @@
"summary" : "Retrieve all available versions of a policy type",
"description" : "Returns a list of all available versions for the specified policy type",
"operationId" : "getAllVersionsOfPolicyType",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyTypeId",
"in" : "path",
@@ -212,7 +212,7 @@
"summary" : "Retrieve one particular version of a policy type",
"description" : "Returns a particular version for the specified policy type",
"operationId" : "getSpecificVersionOfPolicyType",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyTypeId",
"in" : "path",
@@ -285,7 +285,7 @@
"summary" : "Delete one version of a policy type",
"description" : "Delete one version of a policy type. It must follow two rules. Rule 1: pre-defined policy types cannot be deleted; Rule 2: policy types that are in use (parameterized by a TOSCA policy) cannot be deleted. The parameterizing TOSCA policies must be deleted first.",
"operationId" : "deleteSpecificVersionOfPolicyType",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyTypeId",
"in" : "path",
@@ -363,7 +363,7 @@
"summary" : "Retrieve latest version of a policy type",
"description" : "Returns latest version for the specified policy type",
"operationId" : "getLatestVersionOfPolicyType",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "policyTypeId",
"in" : "path",
diff --git a/docs/api/swagger/statistics-api.json b/docs/api/swagger/statistics-api.json
index a55f03c8..f41900c0 100644
--- a/docs/api/swagger/statistics-api.json
+++ b/docs/api/swagger/statistics-api.json
@@ -12,7 +12,7 @@
"summary" : "Retrieve current statistics",
"description" : "Returns current statistics including the counters of API invocation",
"operationId" : "getStatistics",
- "produces" : [ "application/json" ],
+ "produces" : [ "application/json", "application/yaml" ],
"parameters" : [ {
"name" : "X-ONAP-RequestID",
"in" : "header",