Commit 34f8016e authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch '3.3.1-dev' of https://forge.etsi.org/gitlab/nfv/SOL012 into 3.3.1-dev

parents a9ecbf45 cf4531e9
Loading
Loading
Loading
Loading
Loading
+54 −60
Original line number Diff line number Diff line
@@ -47,10 +47,10 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/ContentType"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      requestBody:
        $ref: "#/components/requestBodies/PolicyCreationRequest"
        $ref: "#/components/requestBodies/CreatePolicyRequest"
      responses:
        "201":
          $ref: '#/components/responses/Policy.post.201'
          $ref: '#/components/responses/Policy.Post.201'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -71,6 +71,7 @@ paths:
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504

    get:
      description: >-
        The GET method queries information about multiple policies.
@@ -84,9 +85,9 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "200":
          $ref: '#/components/responses/Policy.get.200'
          $ref: '#/components/responses/Policy.Get.200'
        "400":
          $ref: '#/components/responses/Policy.get.400'
          $ref: '#/components/responses/Policy.Get.400'
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
@@ -122,7 +123,7 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "200":
          $ref: '#/components/responses/IndividualPolicy.get.200'
          $ref: '#/components/responses/IndividualPolicy.Get.200'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -143,6 +144,7 @@ paths:
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504

    patch:
      description: >
        The PATCH method modifies a policy.
@@ -157,10 +159,10 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/ContentType"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      requestBody:
        $ref: "#/components/requestBodies/ModifyPolicyRequest"
        $ref: "#/components/requestBodies/PolicyModifications"
      responses:
        "200":
          $ref: '#/components/responses/PolicyModifications.patch.200'
          $ref: '#/components/responses/PolicyModifications.Patch.200'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -174,7 +176,7 @@ paths:
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "409":
          $ref: '#/components/responses/PolicyModifications.patch.409'
          $ref: '#/components/responses/PolicyModifications.Patch.409'
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
@@ -196,7 +198,7 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "204":
          $ref: '#/components/responses/Policy.delete.204'
          $ref: '#/components/responses/Policy.Delete.204'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -210,7 +212,7 @@ paths:
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "409":
          $ref: '#/components/responses/Policy.delete.409'
          $ref: '#/components/responses/Policy.Delete.409'
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
@@ -238,7 +240,7 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "200":
          $ref: '#/components/responses/PolicySelectedVersion.get.200'
          $ref: '#/components/responses/PolicySelectedVersion.Get.200'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -246,7 +248,7 @@ paths:
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: '#/components/responses/PolicySelectedVersion.get.404'
          $ref: '#/components/responses/PolicySelectedVersion.Get.404'
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
@@ -277,7 +279,7 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "200":
          $ref: '#/components/responses/IndividualPolicyVersion.get.200'
          $ref: '#/components/responses/IndividualPolicyVersion.Get.200'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -298,6 +300,7 @@ paths:
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504

    put:
      description: >
        The PUT method transfers the content of a particular version of an individual policy.
@@ -307,11 +310,9 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/ContentType"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      requestBody:
        $ref: '#/components/requestBodies/PolicyVersionTransferRequest'
      responses:
        "201":
          $ref: '#/components/responses/PolicyVersionTransfer.put.201'
          $ref: '#/components/responses/PolicyVersionTransfer.Put.201'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -325,7 +326,7 @@ paths:
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "409":
          $ref: '#/components/responses/PolicyVersionTransfer.put.409'
          $ref: '#/components/responses/PolicyVersionTransfer.Put.409'
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
@@ -334,6 +335,7 @@ paths:
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504

    delete:
      description: >
        The DELETE method deletes a particular version of an individual policy.
@@ -345,7 +347,7 @@ paths:
        method as defined in clause 5.6.2.8.
      responses:
        "204":
          $ref: '#/components/responses/PolicyVersion.delete.204'
          $ref: '#/components/responses/PolicyVersion.Delete.204'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -359,7 +361,7 @@ paths:
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "409":
          $ref: '#/components/responses/PolicyVersion.delete.409'
          $ref: '#/components/responses/PolicyVersion.Delete.409'
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
@@ -386,12 +388,12 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/ContentType"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      requestBody:
        $ref: '#/components/requestBodies/PolicySubscriptionCreateRequest'
        $ref: '#/components/requestBodies/PolicySubscriptionRequest'
      responses:
        "201":
          $ref: '#/components/responses/Subscriptions.post.201'
          $ref: '#/components/responses/Subscriptions.Post.201'
        "303":
          $ref: '#/components/responses/Subscriptions.post.303'
          $ref: '#/components/responses/Subscriptions.Post.303'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -412,6 +414,7 @@ paths:
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504

    get:
      description: >-
        The GET method queries the list of active subscriptions of the functional block that invokes the method. 
@@ -426,9 +429,9 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/nextpage_opaque_marker"
      responses:
        "200":
          $ref: '#/components/responses/Subscriptions.get.200'
          $ref: '#/components/responses/Subscriptions.Get.200'
        "400":
          $ref: '#/components/responses/Subscriptions.get.400'
          $ref: '#/components/responses/Subscriptions.Get.400'
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
@@ -465,7 +468,7 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "200":
          $ref: '#/components/responses/IndividualSubscription.get.200'
          $ref: '#/components/responses/IndividualSubscription.Get.200'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -486,6 +489,7 @@ paths:
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504

    delete:
      description: >-
        The DELETE method terminates an individual subscription. This method shall follow the provisions specified 
@@ -499,7 +503,7 @@ paths:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "204":
          $ref: '#/components/responses/IndividualSubscription.delete.204'
          $ref: '#/components/responses/IndividualSubscription.Delete.204'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -780,7 +784,7 @@ components:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/PolicyOperationType"

  responses:
    Policy.post.201:
    Policy.Post.201:
      description: >
        201 Created

@@ -811,7 +815,7 @@ components:
          schema:
            $ref: "#/components/schemas/Policy"

    Policy.get.200:
    Policy.Get.200:
      description: >
        Shall be returned when information about zero or more policies has been queried successfully.
        The response body shall contain in an array the representations of zero or more policies, as defined
@@ -850,7 +854,7 @@ components:
            items:
              $ref: "#/components/schemas/Policy"

    Policy.get.400:
    Policy.Get.400:
      description: >
        Shall be returned upon the following error: Invalid attribute-based filtering expression.
        The response body shall contain a ProblemDetails structure, in which the "detail" attribute
@@ -877,7 +881,7 @@ components:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"

    IndividualPolicy.get.200:
    IndividualPolicy.Get.200:
      description: >
        Shall be returned when information about an individual policy has been read successfully.
        The response body shall contain a representation of the policy, as defined in clause 5.6.2.3.
@@ -899,7 +903,7 @@ components:
          schema:
            $ref: "#/components/schemas/Policy"

    PolicyModifications.patch.200:
    PolicyModifications.Patch.200:
      description: >
        200 OK

@@ -923,7 +927,7 @@ components:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/PolicyModifications"

    PolicyModifications.patch.409:
    PolicyModifications.Patch.409:
      description: >
        409 Conflict

@@ -954,7 +958,7 @@ components:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"

    Policy.delete.204:
    Policy.Delete.204:
      description: >
        204 No Content

@@ -974,7 +978,7 @@ components:
          schema:
            type: string

    Policy.delete.409:
    Policy.Delete.409:
      description: >
        409 Conflict

@@ -1001,7 +1005,7 @@ components:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"

    PolicySelectedVersion.get.200:
    PolicySelectedVersion.Get.200:
      description: >
        200 OK
        Shall be returned when the content of the selected version of an individual policy has been read successfully.
@@ -1031,7 +1035,7 @@ components:
            type: object
            additionalProperties: true

    PolicySelectedVersion.get.404:
    PolicySelectedVersion.Get.404:
      description: >
        404 Not Found

@@ -1061,7 +1065,7 @@ components:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"

    IndividualPolicyVersion.get.200:
    IndividualPolicyVersion.Get.200:
      description: >
        200 OK

@@ -1092,7 +1096,7 @@ components:
            type: object
            additionalProperties: true

    PolicyVersionTransfer.put.201:
    PolicyVersionTransfer.Put.201:
      description: >
        201 Created

@@ -1112,7 +1116,7 @@ components:
          schema:
            type: string

    PolicyVersionTransfer.put.409:
    PolicyVersionTransfer.Put.409:
      description: >
        409 Conflict

@@ -1139,7 +1143,7 @@ components:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"

    PolicyVersion.delete.204:
    PolicyVersion.Delete.204:
      description: >
        204 No Content

@@ -1159,7 +1163,7 @@ components:
          schema:
            type: string

    PolicyVersion.delete.409:
    PolicyVersion.Delete.409:
      description: >
        409 Conflict

@@ -1186,7 +1190,7 @@ components:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"

    Subscriptions.post.201:
    Subscriptions.Post.201:
      description: >
        201 Created

@@ -1218,7 +1222,7 @@ components:
          schema:
            $ref: "#/components/schemas/PolicySubscription"

    Subscriptions.post.303:
    Subscriptions.Post.303:
      description: >
        303 See Other

@@ -1246,7 +1250,7 @@ components:
            type: string
            format: url
        
    Subscriptions.get.200:
    Subscriptions.Get.200:
      description: >
        200 OK

@@ -1286,7 +1290,7 @@ components:
            items:
              $ref: "#/components/schemas/PolicySubscription"

    Subscriptions.get.400:
    Subscriptions.Get.400:
      description: >
        400 Bad Request

@@ -1315,7 +1319,7 @@ components:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"
        
    IndividualSubscription.get.200:
    IndividualSubscription.Get.200:
      description: >
        200 OK

@@ -1339,7 +1343,7 @@ components:
          schema: 
            $ref: "#/components/schemas/PolicySubscription"
        
    IndividualSubscription.delete.204:
    IndividualSubscription.Delete.204:
      description: >
        204 No Content

@@ -1359,7 +1363,7 @@ components:
            type: string        

  requestBodies:
    PolicyCreationRequest:
    CreatePolicyRequest:
      description: >
        This type represents request parameters for creating a policy. It shall comply with the provisions defined
        in table 5.6.2.2-1.
@@ -1369,7 +1373,7 @@ components:
           $ref: "#/components/schemas/CreatePolicyRequest"
      required: true

    ModifyPolicyRequest:
    PolicyModifications:
      description: >
        The parameter for the policy modifications, as defined in clause 5.6.2.4.
      content:
@@ -1377,17 +1381,7 @@ components:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/PolicyModifications"

    PolicyVersionTransferRequest:
      description: >
        The payload body contains a copy of the policy content.
        The "Content-Type" HTTP header shall be set according to the type of the policy content.
      content:
        application/*:
          schema:
            type: object
            additionalProperties: true

    PolicySubscriptionCreateRequest:
    PolicySubscriptionRequest:
      description: >
        Details of the subscription to be created.
      content:
+123 −15
Original line number Diff line number Diff line
openapi: 3.0.2
info:
  version: 1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
  title: SOL012 - Policy Management Interface
  title: SOL012 - Policy Management Notification Interface
  description: >
    SOL012 - Policy Management Interface
    SOL012 - Policy Management Notification Interface


    IMPORTANT: Please note that this file might be not aligned to the current version of the ETSI Group Specification
@@ -26,7 +26,7 @@ servers:
  - url: https://127.0.0.1/callback/v1

paths:
  /URI_is_provided_by_the_API_consumer_when_creating_the_subscription_PolicyManagementNotification:
  /URI_is_provided_by_the_API_consumer_when_creating_the_subscription_PolicyChangeNotification:
    description: >-
      This resource represents a notification endpoint for policy management.
      The API producer can use this resource to send notifications related to policy management events to 
@@ -47,10 +47,10 @@ paths:
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/ContentType"
      requestBody:
        $ref: "#/components/requestBodies/NotificationCreateRequest"
        $ref: "#/components/requestBodies/PolicyChangeNotification"
      responses:
        "204":
          $ref: '#/components/responses/Notification.post.204'
          $ref: '#/components/responses/PolicyChangeNotification.Post.204'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -65,6 +65,71 @@ paths:
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503

    get:
      description: >-
        The GET method allows the API producer to test the notification endpoint that is provided by the 
        API consumer, e.g. during subscription.
        This method shall follow the provisions specified in the tables 5.5.9.3.2-1 and 5.5.9.3.2-2 for 
        URI query parameters, request and response data structures, and response codes.
      responses:
        "204":
          $ref: '#/components/responses/PolicyChangeNotification.Get.204'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503

  /URI_is_provided_by_the_API_consumer_when_creating_the_subscription_PolicyConflictNotification:
    description: >-
      This resource represents a notification endpoint for policy management.
      The API producer can use this resource to send notifications related to policy management events to 
      a subscribed API consumer, which has provided the URI of this resource during the subscription process.
    parameters:
      - $ref: "../components/SOL012_params.yaml#/components/parameters/Version"
      - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
      - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
    post:
      description: >-
        The POST method delivers a notification regarding a policy management event from the API producer 
        to an API consumer. The API consumer shall have previously created an "Individual subscription" 
        resource with a matching filter.
        This method shall follow the provisions specified in the tables 5.5.9.3.1-1 and 5.5.9.3.1-2 for 
        URI query parameters, request and response data structures, and response codes.
        Each notification request body shall include exactly one of the alternatives defined 
        in table 5.5.9.3.1-2.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/ContentType"
      requestBody:
        $ref: "#/components/requestBodies/PolicyConflictNotification"
      responses:
        "204":
          $ref: '#/components/responses/PolicyConflictNotification.Post.204'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503

    get:
      description: >-
        The GET method allows the API producer to test the notification endpoint that is provided by the 
@@ -73,7 +138,7 @@ paths:
        URI query parameters, request and response data structures, and response codes.
      responses:
        "204":
          $ref: '#/components/responses/Notification.get.204'
          $ref: '#/components/responses/PolicyConflictNotification.Get.204'
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
@@ -251,7 +316,7 @@ components:
        - _links
      
  responses:
    Notification.post.204:
    PolicyChangeNotification.Post.204:
      description: >
        204 No Content

@@ -269,7 +334,7 @@ components:
          schema:
            type: string
        
    Notification.get.204:
    PolicyChangeNotification.Get.204:
      description: >
        204 No Content

@@ -288,15 +353,58 @@ components:
          schema:
            type: string

  requestBodies:
    NotificationCreateRequest:
    PolicyConflictNotification.Post.204:
      description: >
        204 No Content

        Shall be returned when the notification has been delivered successfully.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided authorization, or error details 
            if the corresponding HTTP request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        
    PolicyConflictNotification.Get.204:
      description: >
        204 No Content

        Shall be returned to indicate that the notification endpoint has been tested successfully.
        The response body shall be empty.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided authorization, or error details 
            if the corresponding HTTP request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
        This type represents request parameters for creating a notification.
        Each notification request body shall include exactly one of the alternatives defined in table 5.5.9.3.1-2.
            Version of the API used in the response.
          schema:
            type: string

  requestBodies:
    PolicyChangeNotification:
      description: |
        A notification about policy changes.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/PolicyChangeNotification"
      required: true
    
    PolicyConflictNotification:
      description: |
        A notification about a detected policy conflict.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: "#/components/schemas/PolicyChangeNotification"
              - $ref: "#/components/schemas/PolicyConflictNotification"
            $ref: "#/components/schemas/PolicyConflictNotification"
      required: true