aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorlapentafd <francesco.lapenta@est.tech>2023-01-30 12:04:35 +0000
committerFrancesco Davide Lapenta <francesco.lapenta@est.tech>2023-01-31 17:04:13 +0000
commitc4f23fa97e161133db6692f6331dbea13077e47b (patch)
tree44bb3fe15e45cf4ef41db89ea0d419bdd4f3c04c /main
parent1e82ff4b693e2920dfde67cdfc30bf0648f1b097 (diff)
Removing old swagger annotation in xacml-pdp
This commit removes the Swagger V2 annotations on the Rest Controllers in policy-xacml-pdp. The OpeApi annotations (Swagger v3 annotations) are on a generated Java Interface. Issue-ID: POLICY-3465 Change-Id: Ibdeacff9582bb95a21d9fcb7dd8bd3688fa165df Signed-off-by: lapentafd <francesco.lapenta@est.tech>
Diffstat (limited to 'main')
-rw-r--r--main/pom.xml53
-rw-r--r--main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java178
-rw-r--r--main/src/main/resources/openapi/openapi.yaml1089
3 files changed, 1162 insertions, 158 deletions
diff --git a/main/pom.xml b/main/pom.xml
index af1c8c5c..799f1b71 100644
--- a/main/pom.xml
+++ b/main/pom.xml
@@ -70,7 +70,7 @@
<dependency>
<groupId>org.onap.policy.common</groupId>
<artifactId>utils-test</artifactId>
- <version>${policy.common.version}</version>
+ <version>${policy.common.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -133,6 +133,12 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
+ <!-- Swagger v3 annotations -->
+ <dependency>
+ <groupId>io.swagger.core.v3</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>2.2.7</version>
+ </dependency>
</dependencies>
<build>
@@ -153,6 +159,51 @@
</excludes>
</resource>
</resources>
+ <plugins>
+ <!-- Controllers interfaces generation -->
+ <plugin>
+ <groupId>io.swagger.codegen.v3</groupId>
+ <artifactId>swagger-codegen-maven-plugin</artifactId>
+ <version>3.0.27</version>
+ <executions>
+ <execution>
+ <id>code-gen</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <inputSpec>${project.basedir}/src/main/resources/openapi/openapi.yaml</inputSpec>
+ <invokerPackage>org.onap.policy.pdpx.main.rest</invokerPackage>
+ <modelPackage>org.onap.policy.pdpx.main.rest.model</modelPackage>
+ <apiPackage>org.onap.policy.pdpx.main.rest</apiPackage>
+ <language>jaxrs-spec</language>
+ <generateModels>false</generateModels>
+ <generateSupportingFiles>false</generateSupportingFiles>
+ <sortParamsByRequiredFlag>false</sortParamsByRequiredFlag>
+ <importMappings>
+ HealthCheckReport=org.onap.policy.common.endpoints.report.HealthCheckReport,
+ DecisionException=org.onap.policy.models.decisions.concepts.DecisionException,
+ DecisionRequest=org.onap.policy.models.decisions.concepts.DecisionRequest,
+ DecisionResponse=org.onap.policy.models.decisions.concepts.DecisionResponse,
+ ErrorResponse=org.onap.policy.models.errors.concepts.ErrorResponse,
+ StatisticsReport=org.onap.policy.pdpx.main.rest.model.StatisticsReport,
+ DecisionProvider=org.onap.policy.pdpx.main.rest.provider.DecisionProvider,
+ HealthCheckProvider=org.onap.policy.pdpx.main.rest.provider.HealthCheckProvider,
+ StatisticsProvider=org.onap.policy.pdpx.main.rest.provider.StatisticsProvider,
+ Request=com.att.research.xacml.api.Request,
+ Response=javax.ws.rs.core.Response
+ </importMappings>
+ <configOptions>
+ <sourceFolder>src/gen/java</sourceFolder>
+ <dateLibrary>java11</dateLibrary>
+ <interfaceOnly>true</interfaceOnly>
+ <useTags>true</useTags>
+ </configOptions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
</project>
diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java
index 7844b1a5..05f40cc5 100644
--- a/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java
+++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021 Nordix Foundation.
+ * Modifications Copyright (C) 2021-2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,19 +22,6 @@
package org.onap.policy.pdpx.main.rest;
import com.att.research.xacml.api.Request;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import io.swagger.annotations.ApiResponse;
-import io.swagger.annotations.ApiResponses;
-import io.swagger.annotations.Authorization;
-import io.swagger.annotations.BasicAuthDefinition;
-import io.swagger.annotations.Extension;
-import io.swagger.annotations.ExtensionProperty;
-import io.swagger.annotations.Info;
-import io.swagger.annotations.ResponseHeader;
-import io.swagger.annotations.SecurityDefinition;
-import io.swagger.annotations.SwaggerDefinition;
import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
@@ -47,12 +34,8 @@ import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
-import org.onap.policy.common.endpoints.report.HealthCheckReport;
import org.onap.policy.models.decisions.concepts.DecisionException;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
-import org.onap.policy.models.decisions.concepts.DecisionResponse;
-import org.onap.policy.models.errors.concepts.ErrorResponse;
-import org.onap.policy.pdpx.main.rest.model.StatisticsReport;
import org.onap.policy.pdpx.main.rest.provider.DecisionProvider;
import org.onap.policy.pdpx.main.rest.provider.HealthCheckProvider;
import org.onap.policy.pdpx.main.rest.provider.StatisticsProvider;
@@ -64,99 +47,40 @@ import org.slf4j.LoggerFactory;
*
*/
@Path("/policy/pdpx/v1")
-@Api
@Produces({MediaType.APPLICATION_JSON, XacmlPdpRestController.APPLICATION_YAML})
@Consumes({MediaType.APPLICATION_JSON, XacmlPdpRestController.APPLICATION_YAML})
-@SwaggerDefinition(info = @Info(description = "Policy Xacml PDP Service", version = "1.0.0", title = "Policy Xacml PDP",
- extensions = {
- @Extension(
- properties = {
- @ExtensionProperty(name = "planned-retirement-date", value = "tbd"),
- @ExtensionProperty(name = "component", value = "Policy Framework")
- })
- }),
- schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS},
- securityDefinition = @SecurityDefinition(basicAuthDefinitions = {@BasicAuthDefinition(key = "basicAuth")}))
-public class XacmlPdpRestController {
+public class XacmlPdpRestController implements HealthcheckApi, StatisticsApi, DecisionApi, XacmlApi {
private static final Logger LOGGER = LoggerFactory.getLogger(XacmlPdpRestController.class);
public static final String APPLICATION_YAML = "application/yaml";
public static final String APPLICATION_XACML_JSON = "application/xacml+json";
public static final String APPLICATION_XACML_XML = "application/xacml+xml";
+ @Context private HttpServletRequest request;
@GET
@Path("/healthcheck")
- @ApiOperation(value = "Perform a system healthcheck",
- notes = "Provides healthy status of the Policy Xacml PDP component", response = HealthCheckReport.class,
- responseHeaders = {
- @ResponseHeader(name = "X-MinorVersion",
- description = "Used to request or communicate a MINOR version back from the client"
- + " to the server, and from the server back to the client",
- response = String.class),
- @ResponseHeader(name = "X-PatchVersion",
- description = "Used only to communicate a PATCH version in a response for"
- + " troubleshooting purposes only, and will not be provided by"
- + " the client on request",
- response = String.class),
- @ResponseHeader(name = "X-LatestVersion",
- description = "Used only to communicate an API's latest version", response = String.class),
- @ResponseHeader(name = "X-ONAP-RequestID",
- description = "Used to track REST transactions for logging purpose",
- response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"HealthCheck", },
- extensions = {
- @Extension(name = "interface info",
- properties = {
- @ExtensionProperty(name = "pdpx-version", value = "1.0.0"),
- @ExtensionProperty(name = "last-mod-release", value = "Dublin")
- })
- })
- @ApiResponses(value = {
- @ApiResponse(code = 401, message = "Authentication Error"),
- @ApiResponse(code = 403, message = "Authorization Error"),
- @ApiResponse(code = 500, message = "Internal Server Error")})
+ @Override
public Response healthcheck(
- @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
+ @HeaderParam("X-ONAP-RequestID") UUID requestId) {
return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
.entity(new HealthCheckProvider().performHealthCheck()).build();
}
@GET
@Path("/statistics")
- @ApiOperation(value = "Fetch current statistics",
- notes = "Provides current statistics of the Policy Xacml PDP component", response = StatisticsReport.class,
- responseHeaders = {
- @ResponseHeader(name = "X-MinorVersion",
- description = "Used to request or communicate a MINOR version back from the client"
- + " to the server, and from the server back to the client",
- response = String.class),
- @ResponseHeader(name = "X-PatchVersion",
- description = "Used only to communicate a PATCH version in a response for"
- + " troubleshooting purposes only, and will not be provided by"
- + " the client on request",
- response = String.class),
- @ResponseHeader(name = "X-LatestVersion",
- description = "Used only to communicate an API's latest version", response = String.class),
- @ResponseHeader(name = "X-ONAP-RequestID",
- description = "Used to track REST transactions for logging purpose",
- response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"Statistics", },
- extensions = {
- @Extension(name = "interface info",
- properties = {
- @ExtensionProperty(name = "pdpx-version", value = "1.0.0"),
- @ExtensionProperty(name = "last-mod-release", value = "Dublin")
- })
- })
- @ApiResponses(value = {
- @ApiResponse(code = 401, message = "Authentication Error"),
- @ApiResponse(code = 403, message = "Authorization Error"),
- @ApiResponse(code = 500, message = "Internal Server Error")})
+ @Override
public Response statistics(
- @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
+ @HeaderParam("X-ONAP-RequestID") UUID requestId) {
return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
.entity(new StatisticsProvider().fetchCurrentStatistics()).build();
}
+ @POST
+ @Path("/decision")
+ @Override
+ public Response decision(DecisionRequest body, @HeaderParam("X-ONAP-RequestID") UUID requestId) {
+ return decision(body, requestId, request);
+ }
+
/**
* Our decision entry point.
*
@@ -164,40 +88,8 @@ public class XacmlPdpRestController {
* @param requestId Unique request id
* @return DecisionResponse or ErrorResponse object
*/
- @POST
- @Path("/decision")
- @ApiOperation(value = "Fetch the decision using specified decision parameters",
- notes = "Returns the policy decision from Policy Xacml PDP", response = DecisionResponse.class,
- responseHeaders = {
- @ResponseHeader(name = "X-MinorVersion",
- description = "Used to request or communicate a MINOR version back from the client"
- + " to the server, and from the server back to the client",
- response = String.class),
- @ResponseHeader(name = "X-PatchVersion",
- description = "Used only to communicate a PATCH version in a response for"
- + " troubleshooting purposes only, and will not be provided by"
- + " the client on request",
- response = String.class),
- @ResponseHeader(name = "X-LatestVersion",
- description = "Used only to communicate an API's latest version", response = String.class),
- @ResponseHeader(name = "X-ONAP-RequestID",
- description = "Used to track REST transactions for logging purpose",
- response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"Decision", },
- extensions = {
- @Extension(name = "interface info",
- properties = {
- @ExtensionProperty(name = "pdpx-version", value = "1.0.0"),
- @ExtensionProperty(name = "last-mod-release", value = "Dublin")
- })
- })
- @ApiResponses(value = {
- @ApiResponse(code = 400, message = "Bad Request", response = ErrorResponse.class),
- @ApiResponse(code = 401, message = "Authentication Error"),
- @ApiResponse(code = 403, message = "Authorization Error"),
- @ApiResponse(code = 500, message = "Internal Server Error")})
- public Response decision(DecisionRequest body,
- @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId,
+ private Response decision(DecisionRequest body,
+ @HeaderParam("X-ONAP-RequestID") UUID requestId,
@Context HttpServletRequest request) {
try {
return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
@@ -222,39 +114,9 @@ public class XacmlPdpRestController {
@Path("/xacml")
@Produces({XacmlPdpRestController.APPLICATION_XACML_JSON, XacmlPdpRestController.APPLICATION_XACML_XML})
@Consumes({XacmlPdpRestController.APPLICATION_XACML_JSON, XacmlPdpRestController.APPLICATION_XACML_XML})
- @ApiOperation(value = "Fetch the decision using specified decision parameters",
- notes = "Returns the policy decision from Policy Xacml PDP",
- response = com.att.research.xacml.api.Response.class,
- responseHeaders = {
- @ResponseHeader(name = "X-MinorVersion",
- description = "Used to request or communicate a MINOR version back from the client"
- + " to the server, and from the server back to the client",
- response = String.class),
- @ResponseHeader(name = "X-PatchVersion",
- description = "Used only to communicate a PATCH version in a response for"
- + " troubleshooting purposes only, and will not be provided by"
- + " the client on request",
- response = String.class),
- @ResponseHeader(name = "X-LatestVersion",
- description = "Used only to communicate an API's latest version", response = String.class),
- @ResponseHeader(name = "X-ONAP-RequestID",
- description = "Used to track REST transactions for logging purpose",
- response = UUID.class)},
- authorizations = @Authorization(value = "basicAuth"), tags = {"Decision", },
- extensions = {
- @Extension(name = "interface info",
- properties = {
- @ExtensionProperty(name = "pdpx-version", value = "1.0.0"),
- @ExtensionProperty(name = "last-mod-release", value = "Frankfurt")
- })
- })
- @ApiResponses(value = {
- @ApiResponse(code = 400, message = "Bad Request", response = ErrorResponse.class),
- @ApiResponse(code = 401, message = "Authentication Error"),
- @ApiResponse(code = 403, message = "Authorization Error"),
- @ApiResponse(code = 500, message = "Internal Server Error")})
+ @Override
public Response xacml(Request body,
- @HeaderParam("X-ONAP-RequestID") @ApiParam("RequestID for http transaction") UUID requestId) {
+ @HeaderParam("X-ONAP-RequestID") UUID requestId) {
try {
return addLoggingHeaders(addVersionControlHeaders(Response.status(Response.Status.OK)), requestId)
.entity(new DecisionProvider().fetchNativeDecision(body)).build();
@@ -278,4 +140,6 @@ public class XacmlPdpRestController {
}
return rb.header("X-ONAP-RequestID", requestId);
}
-}
+
+
+} \ No newline at end of file
diff --git a/main/src/main/resources/openapi/openapi.yaml b/main/src/main/resources/openapi/openapi.yaml
new file mode 100644
index 00000000..3d6ffaa1
--- /dev/null
+++ b/main/src/main/resources/openapi/openapi.yaml
@@ -0,0 +1,1089 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2023 Nordix Foundation
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+openapi: 3.0.3
+info:
+ title: "Policy Xacml PDP Documentation"
+ description: Policy Xacml PDP Service
+ version: Swagger Server
+ x-component: Policy Framework
+ x-planned-retirement-date: tbd
+servers:
+- url: http://policy-xacml-pdp:6969/policy/pdpx/v1
+- url: https://policy-xacml-pdp:6969/policy/pdpx/v1
+tags:
+- name: Decision
+- name: Statistics
+- name: HealthCheck
+paths:
+ /decision:
+ post:
+ tags:
+ - Decision
+ summary: Fetch the decision using specified decision parameters
+ description: Returns the policy decision from Policy Xacml PDP
+ operationId: decision
+ parameters:
+ - name: X-ONAP-RequestID
+ in: header
+ description: RequestID for http transaction
+ schema:
+ type: string
+ format: uuid
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DecisionRequest'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/DecisionRequest'
+ required: false
+ responses:
+ 200:
+ description: successful operation
+ headers:
+ X-LatestVersion:
+ description: Used only to communicate an API's latest version
+ schema:
+ type: string
+ X-PatchVersion:
+ description: Used only to communicate a PATCH version in a response
+ for troubleshooting purposes only, and will not be provided by the
+ client on request
+ schema:
+ type: string
+ X-MinorVersion:
+ description: Used to request or communicate a MINOR version back from
+ the client to the server, and from the server back to the client
+ schema:
+ type: string
+ X-ONAP-RequestID:
+ description: Used to track REST transactions for logging purpose
+ schema:
+ type: string
+ format: uuid
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Response'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/Response'
+ 400:
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ 401:
+ description: Authentication Error
+ content: {}
+ 403:
+ description: Authorization Error
+ content: {}
+ 500:
+ description: Internal Server Error
+ content: {}
+ security:
+ - basicAuth: []
+ x-interface info:
+ last-mod-release: Dublin
+ pdpx-version: 1.0.0
+ x-codegen-request-body-name: body
+ /xacml:
+ post:
+ tags:
+ - Decision
+ summary: Fetch the decision using specified decision parameters
+ description: Returns the policy decision from Policy Xacml PDP
+ operationId: xacml
+ parameters:
+ - name: X-ONAP-RequestID
+ in: header
+ description: RequestID for http transaction
+ schema:
+ type: string
+ format: uuid
+ requestBody:
+ content:
+ application/xacml+json:
+ schema:
+ $ref: '#/components/schemas/Request'
+ application/xacml+xml:
+ schema:
+ $ref: '#/components/schemas/Request'
+ required: false
+ responses:
+ 200:
+ description: successful operation
+ headers:
+ X-LatestVersion:
+ description: Used only to communicate an API's latest version
+ schema:
+ type: string
+ X-PatchVersion:
+ description: Used only to communicate a PATCH version in a response
+ for troubleshooting purposes only, and will not be provided by the
+ client on request
+ schema:
+ type: string
+ X-MinorVersion:
+ description: Used to request or communicate a MINOR version back from
+ the client to the server, and from the server back to the client
+ schema:
+ type: string
+ X-ONAP-RequestID:
+ description: Used to track REST transactions for logging purpose
+ schema:
+ type: string
+ format: uuid
+ content:
+ application/xacml+json:
+ schema:
+ $ref: '#/components/schemas/Response'
+ application/xacml+xml:
+ schema:
+ $ref: '#/components/schemas/Response'
+ 400:
+ description: Bad Request
+ content:
+ application/xacml+json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ application/xacml+xml:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ 401:
+ description: Authentication Error
+ content: {}
+ 403:
+ description: Authorization Error
+ content: {}
+ 500:
+ description: Internal Server Error
+ content: {}
+ security:
+ - basicAuth: []
+ x-interface info:
+ last-mod-release: Frankfurt
+ pdpx-version: 1.0.0
+ x-codegen-request-body-name: body
+ /statistics:
+ get:
+ tags:
+ - Statistics
+ summary: Fetch current statistics
+ description: Provides current statistics of the Policy Xacml PDP component
+ operationId: statistics
+ parameters:
+ - name: X-ONAP-RequestID
+ in: header
+ description: RequestID for http transaction
+ schema:
+ type: string
+ format: uuid
+ responses:
+ 200:
+ description: successful operation
+ headers:
+ X-LatestVersion:
+ description: Used only to communicate an API's latest version
+ schema:
+ type: string
+ X-PatchVersion:
+ description: Used only to communicate a PATCH version in a response
+ for troubleshooting purposes only, and will not be provided by the
+ client on request
+ schema:
+ type: string
+ X-MinorVersion:
+ description: Used to request or communicate a MINOR version back from
+ the client to the server, and from the server back to the client
+ schema:
+ type: string
+ X-ONAP-RequestID:
+ description: Used to track REST transactions for logging purpose
+ schema:
+ type: string
+ format: uuid
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Response'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/Response'
+ 401:
+ description: Authentication Error
+ content: {}
+ 403:
+ description: Authorization Error
+ content: {}
+ 500:
+ description: Internal Server Error
+ content: {}
+ security:
+ - basicAuth: []
+ x-interface info:
+ last-mod-release: Dublin
+ pdpx-version: 1.0.0
+ /healthcheck:
+ get:
+ tags:
+ - HealthCheck
+ summary: Perform a system healthcheck
+ description: Provides healthy status of the Policy Xacml PDP component
+ operationId: healthcheck
+ parameters:
+ - name: X-ONAP-RequestID
+ in: header
+ description: RequestID for http transaction
+ schema:
+ type: string
+ format: uuid
+ responses:
+ 200:
+ description: successful operation
+ headers:
+ X-LatestVersion:
+ description: Used only to communicate an API's latest version
+ schema:
+ type: string
+ X-PatchVersion:
+ description: Used only to communicate a PATCH version in a response
+ for troubleshooting purposes only, and will not be provided by the
+ client on request
+ schema:
+ type: string
+ X-MinorVersion:
+ description: Used to request or communicate a MINOR version back from
+ the client to the server, and from the server back to the client
+ schema:
+ type: string
+ X-ONAP-RequestID:
+ description: Used to track REST transactions for logging purpose
+ schema:
+ type: string
+ format: uuid
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Response'
+ application/yaml:
+ schema:
+ $ref: '#/components/schemas/Response'
+ 401:
+ description: Authentication Error
+ content: {}
+ 403:
+ description: Authorization Error
+ content: {}
+ 500:
+ description: Internal Server Error
+ content: {}
+ security:
+ - basicAuth: []
+ x-interface info:
+ last-mod-release: Dublin
+ pdpx-version: 1.0.0
+components:
+ schemas:
+ DecisionResponse:
+ type: object
+ properties:
+ status:
+ type: string
+ message:
+ type: string
+ advice:
+ type: object
+ additionalProperties:
+ type: object
+ properties: {}
+ obligations:
+ type: object
+ additionalProperties:
+ type: object
+ properties: {}
+ policies:
+ type: object
+ additionalProperties:
+ type: object
+ properties: {}
+ attributes:
+ type: object
+ additionalProperties:
+ type: object
+ properties: {}
+ ErrorResponse:
+ type: object
+ properties:
+ responseCode:
+ type: string
+ enum:
+ - OK
+ - CREATED
+ - ACCEPTED
+ - NO_CONTENT
+ - RESET_CONTENT
+ - PARTIAL_CONTENT
+ - MOVED_PERMANENTLY
+ - FOUND
+ - SEE_OTHER
+ - NOT_MODIFIED
+ - USE_PROXY
+ - TEMPORARY_REDIRECT
+ - BAD_REQUEST
+ - UNAUTHORIZED
+ - PAYMENT_REQUIRED
+ - FORBIDDEN
+ - NOT_FOUND
+ - METHOD_NOT_ALLOWED
+ - NOT_ACCEPTABLE
+ - PROXY_AUTHENTICATION_REQUIRED
+ - REQUEST_TIMEOUT
+ - CONFLICT
+ - GONE
+ - LENGTH_REQUIRED
+ - PRECONDITION_FAILED
+ - REQUEST_ENTITY_TOO_LARGE
+ - REQUEST_URI_TOO_LONG
+ - UNSUPPORTED_MEDIA_TYPE
+ - REQUESTED_RANGE_NOT_SATISFIABLE
+ - EXPECTATION_FAILED
+ - PRECONDITION_REQUIRED
+ - TOO_MANY_REQUESTS
+ - REQUEST_HEADER_FIELDS_TOO_LARGE
+ - INTERNAL_SERVER_ERROR
+ - NOT_IMPLEMENTED
+ - BAD_GATEWAY
+ - SERVICE_UNAVAILABLE
+ - GATEWAY_TIMEOUT
+ - HTTP_VERSION_NOT_SUPPORTED
+ - NETWORK_AUTHENTICATION_REQUIRED
+ errorMessage:
+ type: string
+ errorDetails:
+ type: array
+ items:
+ type: string
+ warningDetails:
+ type: array
+ items:
+ type: string
+ DecisionRequest:
+ type: object
+ properties:
+ onapName:
+ type: string
+ onapComponent:
+ type: string
+ onapInstance:
+ type: string
+ requestId:
+ type: string
+ context:
+ type: object
+ additionalProperties:
+ type: object
+ properties: {}
+ action:
+ type: string
+ currentDateTime:
+ type: string
+ format: date-time
+ currentDate:
+ type: string
+ format: date
+ currentTime:
+ $ref: '#/components/schemas/OffsetTime'
+ timeZone:
+ $ref: '#/components/schemas/ZoneOffset'
+ resource:
+ type: object
+ additionalProperties:
+ type: object
+ properties: {}
+ Duration:
+ type: object
+ properties:
+ seconds:
+ type: integer
+ format: int64
+ nano:
+ type: integer
+ format: int32
+ negative:
+ type: boolean
+ units:
+ type: array
+ items:
+ $ref: '#/components/schemas/TemporalUnit'
+ zero:
+ type: boolean
+ LocalTime:
+ type: object
+ properties:
+ hour:
+ type: integer
+ format: int32
+ minute:
+ type: integer
+ format: int32
+ second:
+ type: integer
+ format: int32
+ nano:
+ type: integer
+ format: int32
+ OffsetTime:
+ type: object
+ properties:
+ offset:
+ $ref: '#/components/schemas/ZoneOffset'
+ nano:
+ type: integer
+ format: int32
+ hour:
+ type: integer
+ format: int32
+ minute:
+ type: integer
+ format: int32
+ second:
+ type: integer
+ format: int32
+ TemporalUnit:
+ type: object
+ properties:
+ durationEstimated:
+ type: boolean
+ dateBased:
+ type: boolean
+ timeBased:
+ type: boolean
+ duration:
+ $ref: '#/components/schemas/Duration'
+ ZoneOffset:
+ type: object
+ properties:
+ totalSeconds:
+ type: integer
+ format: int32
+ id:
+ type: string
+ rules:
+ $ref: '#/components/schemas/ZoneRules'
+ ZoneOffsetTransition:
+ type: object
+ properties:
+ offsetBefore:
+ $ref: '#/components/schemas/ZoneOffset'
+ offsetAfter:
+ $ref: '#/components/schemas/ZoneOffset'
+ gap:
+ type: boolean
+ overlap:
+ type: boolean
+ dateTimeAfter:
+ type: string
+ format: date-time
+ dateTimeBefore:
+ type: string
+ format: date-time
+ instant:
+ type: integer
+ format: int64
+ duration:
+ $ref: '#/components/schemas/Duration'
+ ZoneOffsetTransitionRule:
+ type: object
+ properties:
+ month:
+ type: string
+ enum:
+ - JANUARY
+ - FEBRUARY
+ - MARCH
+ - APRIL
+ - MAY
+ - JUNE
+ - JULY
+ - AUGUST
+ - SEPTEMBER
+ - OCTOBER
+ - NOVEMBER
+ - DECEMBER
+ timeDefinition:
+ type: string
+ enum:
+ - UTC
+ - WALL
+ - STANDARD
+ standardOffset:
+ $ref: '#/components/schemas/ZoneOffset'
+ offsetBefore:
+ $ref: '#/components/schemas/ZoneOffset'
+ offsetAfter:
+ $ref: '#/components/schemas/ZoneOffset'
+ dayOfWeek:
+ type: string
+ enum:
+ - MONDAY
+ - TUESDAY
+ - WEDNESDAY
+ - THURSDAY
+ - FRIDAY
+ - SATURDAY
+ - SUNDAY
+ dayOfMonthIndicator:
+ type: integer
+ format: int32
+ localTime:
+ $ref: '#/components/schemas/LocalTime'
+ midnightEndOfDay:
+ type: boolean
+ ZoneRules:
+ type: object
+ properties:
+ fixedOffset:
+ type: boolean
+ transitions:
+ type: array
+ items:
+ $ref: '#/components/schemas/ZoneOffsetTransition'
+ transitionRules:
+ type: array
+ items:
+ $ref: '#/components/schemas/ZoneOffsetTransitionRule'
+ Advice:
+ type: object
+ properties:
+ attributeAssignments:
+ type: array
+ items:
+ $ref: '#/components/schemas/AttributeAssignment'
+ id:
+ $ref: '#/components/schemas/Identifier'
+ Attribute:
+ type: object
+ properties:
+ issuer:
+ type: string
+ includeInResults:
+ type: boolean
+ values:
+ type: array
+ items:
+ $ref: '#/components/schemas/AttributeValueObject'
+ attributeId:
+ $ref: '#/components/schemas/Identifier'
+ category:
+ $ref: '#/components/schemas/Identifier'
+ AttributeAssignment:
+ type: object
+ properties:
+ attributeValue:
+ $ref: '#/components/schemas/AttributeValueObject'
+ issuer:
+ type: string
+ dataTypeId:
+ $ref: '#/components/schemas/Identifier'
+ attributeId:
+ $ref: '#/components/schemas/Identifier'
+ category:
+ $ref: '#/components/schemas/Identifier'
+ AttributeCategory:
+ type: object
+ properties:
+ category:
+ $ref: '#/components/schemas/Identifier'
+ attributes:
+ type: array
+ items:
+ $ref: '#/components/schemas/Attribute'
+ AttributeValue:
+ type: object
+ properties:
+ dataTypeId:
+ $ref: '#/components/schemas/Identifier'
+ xpathCategory:
+ $ref: '#/components/schemas/Identifier'
+ value:
+ type: object
+ properties: {}
+ AttributeValueObject:
+ type: object
+ properties:
+ dataTypeId:
+ $ref: '#/components/schemas/Identifier'
+ xpathCategory:
+ $ref: '#/components/schemas/Identifier'
+ value:
+ type: object
+ properties: {}
+ IdReference:
+ type: object
+ properties:
+ version:
+ $ref: '#/components/schemas/Version'
+ id:
+ $ref: '#/components/schemas/Identifier'
+ Identifier:
+ type: object
+ properties:
+ uri:
+ type: string
+ format: uri
+ MissingAttributeDetail:
+ type: object
+ properties:
+ issuer:
+ type: string
+ dataTypeId:
+ $ref: '#/components/schemas/Identifier'
+ attributeValues:
+ type: array
+ items:
+ $ref: '#/components/schemas/AttributeValueObject'
+ attributeId:
+ $ref: '#/components/schemas/Identifier'
+ category:
+ $ref: '#/components/schemas/Identifier'
+ Obligation:
+ type: object
+ properties:
+ attributeAssignments:
+ type: array
+ items:
+ $ref: '#/components/schemas/AttributeAssignment'
+ id:
+ $ref: '#/components/schemas/Identifier'
+ Response:
+ type: object
+ properties:
+ results:
+ type: array
+ items:
+ $ref: '#/components/schemas/Result'
+ Result:
+ type: object
+ properties:
+ status:
+ $ref: '#/components/schemas/Status'
+ decision:
+ type: string
+ enum:
+ - PERMIT
+ - DENY
+ - INDETERMINATE
+ - INDETERMINATE_PERMIT
+ - INDETERMINATE_DENY
+ - INDETERMINATE_DENYPERMIT
+ - NOTAPPLICABLE
+ obligations:
+ type: array
+ items:
+ $ref: '#/components/schemas/Obligation'
+ associatedAdvice:
+ type: array
+ items:
+ $ref: '#/components/schemas/Advice'
+ policyIdentifiers:
+ type: array
+ items:
+ $ref: '#/components/schemas/IdReference'
+ policySetIdentifiers:
+ type: array
+ items:
+ $ref: '#/components/schemas/IdReference'
+ attributes:
+ type: array
+ items:
+ $ref: '#/components/schemas/AttributeCategory'
+ Status:
+ type: object
+ properties:
+ statusCode:
+ $ref: '#/components/schemas/StatusCode'
+ statusMessage:
+ type: string
+ statusDetail:
+ $ref: '#/components/schemas/StatusDetail'
+ ok:
+ type: boolean
+ StatusCode:
+ type: object
+ properties:
+ statusCodeValue:
+ $ref: '#/components/schemas/Identifier'
+ child:
+ $ref: '#/components/schemas/StatusCode'
+ StatusDetail:
+ type: object
+ properties:
+ missingAttributeDetails:
+ type: array
+ items:
+ $ref: '#/components/schemas/MissingAttributeDetail'
+ Version:
+ type: object
+ properties:
+ version:
+ type: string
+ versionDigits:
+ type: array
+ items:
+ type: integer
+ format: int32
+ DOMConfiguration:
+ type: object
+ properties:
+ parameterNames:
+ $ref: '#/components/schemas/DOMStringList'
+ DOMImplementation:
+ type: object
+ DOMStringList:
+ type: object
+ properties:
+ length:
+ type: integer
+ format: int32
+ Document:
+ type: object
+ properties:
+ doctype:
+ $ref: '#/components/schemas/DocumentType'
+ inputEncoding:
+ type: string
+ xmlEncoding:
+ type: string
+ xmlStandalone:
+ type: boolean
+ xmlVersion:
+ type: string
+ strictErrorChecking:
+ type: boolean
+ documentURI:
+ type: string
+ domConfig:
+ $ref: '#/components/schemas/DOMConfiguration'
+ implementation:
+ $ref: '#/components/schemas/DOMImplementation'
+ documentElement:
+ $ref: '#/components/schemas/Element'
+ nodeName:
+ type: string
+ nodeValue:
+ type: string
+ firstChild:
+ $ref: '#/components/schemas/Node'
+ previousSibling:
+ $ref: '#/components/schemas/Node'
+ ownerDocument:
+ $ref: '#/components/schemas/Document'
+ prefix:
+ type: string
+ baseURI:
+ type: string
+ textContent:
+ type: string
+ localName:
+ type: string
+ childNodes:
+ $ref: '#/components/schemas/NodeList'
+ nodeType:
+ type: integer
+ format: int32
+ nextSibling:
+ $ref: '#/components/schemas/Node'
+ parentNode:
+ $ref: '#/components/schemas/Node'
+ lastChild:
+ $ref: '#/components/schemas/Node'
+ namespaceURI:
+ type: string
+ attributes:
+ $ref: '#/components/schemas/NamedNodeMap'
+ DocumentType:
+ type: object
+ properties:
+ notations:
+ $ref: '#/components/schemas/NamedNodeMap'
+ internalSubset:
+ type: string
+ publicId:
+ type: string
+ systemId:
+ type: string
+ entities:
+ $ref: '#/components/schemas/NamedNodeMap'
+ name:
+ type: string
+ nodeName:
+ type: string
+ nodeValue:
+ type: string
+ firstChild:
+ $ref: '#/components/schemas/Node'
+ previousSibling:
+ $ref: '#/components/schemas/Node'
+ ownerDocument:
+ $ref: '#/components/schemas/Document'
+ prefix:
+ type: string
+ baseURI:
+ type: string
+ textContent:
+ type: string
+ localName:
+ type: string
+ childNodes:
+ $ref: '#/components/schemas/NodeList'
+ nodeType:
+ type: integer
+ format: int32
+ nextSibling:
+ $ref: '#/components/schemas/Node'
+ parentNode:
+ $ref: '#/components/schemas/Node'
+ lastChild:
+ $ref: '#/components/schemas/Node'
+ namespaceURI:
+ type: string
+ attributes:
+ $ref: '#/components/schemas/NamedNodeMap'
+ Element:
+ type: object
+ properties:
+ schemaTypeInfo:
+ $ref: '#/components/schemas/TypeInfo'
+ tagName:
+ type: string
+ nodeName:
+ type: string
+ nodeValue:
+ type: string
+ firstChild:
+ $ref: '#/components/schemas/Node'
+ previousSibling:
+ $ref: '#/components/schemas/Node'
+ ownerDocument:
+ $ref: '#/components/schemas/Document'
+ prefix:
+ type: string
+ baseURI:
+ type: string
+ textContent:
+ type: string
+ localName:
+ type: string
+ childNodes:
+ $ref: '#/components/schemas/NodeList'
+ nodeType:
+ type: integer
+ format: int32
+ nextSibling:
+ $ref: '#/components/schemas/Node'
+ parentNode:
+ $ref: '#/components/schemas/Node'
+ lastChild:
+ $ref: '#/components/schemas/Node'
+ namespaceURI:
+ type: string
+ attributes:
+ $ref: '#/components/schemas/NamedNodeMap'
+ NamedNodeMap:
+ type: object
+ properties:
+ length:
+ type: integer
+ format: int32
+ Node:
+ type: object
+ properties:
+ nodeName:
+ type: string
+ nodeValue:
+ type: string
+ firstChild:
+ $ref: '#/components/schemas/Node'
+ previousSibling:
+ $ref: '#/components/schemas/Node'
+ ownerDocument:
+ $ref: '#/components/schemas/Document'
+ prefix:
+ type: string
+ baseURI:
+ type: string
+ textContent:
+ type: string
+ localName:
+ type: string
+ childNodes:
+ $ref: '#/components/schemas/NodeList'
+ nodeType:
+ type: integer
+ format: int32
+ nextSibling:
+ $ref: '#/components/schemas/Node'
+ parentNode:
+ $ref: '#/components/schemas/Node'
+ lastChild:
+ $ref: '#/components/schemas/Node'
+ namespaceURI:
+ type: string
+ attributes:
+ $ref: '#/components/schemas/NamedNodeMap'
+ NodeList:
+ type: object
+ properties:
+ length:
+ type: integer
+ format: int32
+ Request:
+ type: object
+ properties:
+ requestDefaults:
+ $ref: '#/components/schemas/RequestDefaults'
+ returnPolicyIdList:
+ type: boolean
+ requestAttributes:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestAttributes'
+ multiRequests:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestReference'
+ status:
+ $ref: '#/components/schemas/Status'
+ requestAttributesIncludedInResult:
+ type: array
+ items:
+ $ref: '#/components/schemas/AttributeCategory'
+ combinedDecision:
+ type: boolean
+ RequestAttributes:
+ type: object
+ properties:
+ contentRoot:
+ $ref: '#/components/schemas/Node'
+ xmlId:
+ type: string
+ category:
+ $ref: '#/components/schemas/Identifier'
+ attributes:
+ type: array
+ items:
+ $ref: '#/components/schemas/Attribute'
+ RequestAttributesReference:
+ type: object
+ properties:
+ referenceId:
+ type: string
+ RequestDefaults:
+ type: object
+ properties:
+ xpathVersion:
+ type: string
+ format: uri
+ RequestReference:
+ type: object
+ properties:
+ attributesReferences:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestAttributesReference'
+ TypeInfo:
+ type: object
+ properties:
+ typeNamespace:
+ type: string
+ typeName:
+ type: string
+ StatisticsReport:
+ type: object
+ properties:
+ code:
+ type: integer
+ format: int32
+ totalPolicyTypesCount:
+ type: integer
+ format: int64
+ totalPoliciesCount:
+ type: integer
+ format: int64
+ totalErrorCount:
+ type: integer
+ format: int64
+ permitDecisionsCount:
+ type: integer
+ format: int64
+ denyDecisionsCount:
+ type: integer
+ format: int64
+ deploySuccessCount:
+ type: integer
+ format: int64
+ deployFailureCount:
+ type: integer
+ format: int64
+ undeploySuccessCount:
+ type: integer
+ format: int64
+ undeployFailureCount:
+ type: integer
+ format: int64
+ indeterminantDecisionsCount:
+ type: integer
+ format: int64
+ notApplicableDecisionsCount:
+ type: integer
+ format: int64
+ applicationMetrics:
+ type: object
+ additionalProperties:
+ type: object
+ additionalProperties:
+ type: integer
+ format: int32
+ HealthCheckReport:
+ type: object
+ properties:
+ name:
+ type: string
+ url:
+ type: string
+ healthy:
+ type: boolean
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
+ HttpServletRequest:
+ type: object
+ securitySchemes:
+ basicAuth:
+ type: http
+ description: ""
+ scheme: basic