Commit 4b18cfbb authored by daniel-gonzalez-sanchez's avatar daniel-gonzalez-sanchez
Browse files

Recovering SubscriptionFragment Request Body definition. Generating a new Path...

Recovering SubscriptionFragment Request Body definition. Generating a new Path common schema for URI data type in path parameters. Generating a new SystemGeneratedAttributes for grouping subschemas of system-generated temporal attributes: createdAt, modifiedAt, and deletedAt, and updating references to it. Keeping NGSILD-Warning header only for HTTP GET operations performed over the resources /entities and /entities/{entity-id}.
parent f0bbf2cc
Loading
Loading
Loading
Loading
+62 −147
Original line number Diff line number Diff line
@@ -780,9 +780,6 @@ paths:
        '200':
          description: |
            A response body containing the JSON-LD representation of the target subscription.
          headers:
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          content:
            application/json:
              schema:
@@ -808,14 +805,8 @@ paths:
                    - endpoint
                    - '@context'
        '400':
          headers:
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          $ref: '#/components/responses/BadRequest'
        '404':
          headers:
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
@@ -1013,8 +1004,6 @@ paths:
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          content:
            application/json:
              schema:
@@ -1038,14 +1027,8 @@ paths:
                    - notification
                    - '@context'
        '400':
          headers:
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          $ref: '#/components/responses/BadRequest'
        '404':
          headers:
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
@@ -1068,7 +1051,7 @@ paths:
      requestBody:
        description: |
          Subscription Fragment including id, type and any other subscription field to be changed.
        $ref: '#/components/requestBodies/Subscription'
        $ref: '#/components/requestBodies/SubscriptionFragment'
      responses:
        '204':
          description: |
@@ -1231,8 +1214,6 @@ paths:
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          content:
            application/json:
              schema:
@@ -1256,14 +1237,8 @@ paths:
                    - notification
                    - '@context'
        '400':
          headers:
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          $ref: '#/components/responses/BadRequest'
        '404':
          headers:
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
@@ -1287,7 +1262,7 @@ paths:
        description: |
          Subscription Fragment including id, type and any other context
          source registration subscription field to be changed.
        $ref: '#/components/requestBodies/Subscription'
        $ref: '#/components/requestBodies/SubscriptionFragment'
      responses:
        '204':
          description: |
@@ -1388,8 +1363,7 @@ paths:
                items:
                  type: string
        '207':
          allOf:
            - $ref: '#/components/responses/MultiStatus.BatchOperationResult'
          $ref: '#/components/responses/MultiStatus.BatchOperationResult'
          description: |
            If only some or none of the entities have been successfully created, a response body containing the
            result of each operation contained in the batch is returned in a BatchOperationResult structure.
@@ -1913,9 +1887,6 @@ paths:
                        - type
                        - '@context'
        '400':
          headers:
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          $ref: '#/components/responses/BadRequest'
  /temporal/entities/{entityId}:
    get:
@@ -2730,8 +2701,7 @@ components:
        The Fully Qualified Name (FQN) as well as the short name can be used,
        given that the latter is part of the JSON-LD @context provided.
      schema:
        type: string
        format: uri
        $ref: '#/components/schemas/Path'
      required: true
    Path.contextId:
      name: contextId
@@ -2740,40 +2710,35 @@ components:
        Local identifier of the @context to be managed (served or deleted). For @contexts of kind "Cached"
        this can also be the original URL the Broker downloaded the @context from.
      schema:
        type: string
        format: uri
        $ref: '#/components/schemas/Path'
      required: true
    Path.entityId:
      name: entityId
      in: path
      description: Id (URI) of the entity to be retrieved.
      schema:
        type: string
        format: uri
        $ref: '#/components/schemas/Path'
      required: true
    Path.instanceId:
      name: instanceId
      in: path
      description: Id (URI) identifying a particular Attribute instance.
      schema:
        type: string
        format: uri
        $ref: '#/components/schemas/Path'
      required: true
    Path.registrationId:
      name: registrationId
      in: path
      description: Id (URI) of the context source registration.
      schema:
        type: string
        format: uri
        $ref: '#/components/schemas/Path'
      required: true
    Path.subscriptionId:
      name: subscriptionId
      in: path
      description: Id (URI) of the concerned subscription.
      schema:
        type: string
        format: uri
        $ref: '#/components/schemas/Path'
      required: true
    Path.type:
      name: type
@@ -2783,8 +2748,7 @@ components:
        The Fully Qualified Name (FQN) as well as the short name can be used,
        given that the latter is part of the JSON-LD @context provided.
      schema:
        type: string
        format: uri
        $ref: '#/components/schemas/Path'
      required: true
    Query.aggrMethods:
      name: aggrMethods
@@ -3317,11 +3281,11 @@ components:
        application/json+ld:
          schema:
            allOf:
              - $ref: '#/components/schemas/Subscription'
              - type: object
                properties:
                  '@context':
                    $ref:  '#/components/schemas/LdContext'
              - $ref: '#/components/schemas/Subscription'
              - required:
                - '@context'
  schemas:
@@ -3406,9 +3370,28 @@ components:
    #
    # Beginning of 4.8 Temporal Properties
    #
    SystemGeneratedAttributes:
      description: |
        5.2.2 Common members. 
        
        For grouping the subschemas of system-generated temporal attributes: createdAt, modifiedAt, and deletedAt.
      type: object
      properties:
        createdAt: 
          allOf:
            - $ref: '#/components/schemas/CreatedAt'
          readOnly: true
        modifiedAt:
          allOf:
            - $ref: '#/components/schemas/ModifiedAt'
          readOnly: true
        deletedAt:
          allOf:
            - $ref: '#/components/schemas/DeletedAt'
          readOnly: true
    CreatedAt:
      description: |
        Is defined as the temporal Property at which the Entity, Property or
        It is defined as the temporal Property at which the Entity, Property or
        Relationship was entered into an NGSI-LD system.

        Entity creation timestamp. See clause 4.8.
@@ -3416,7 +3399,7 @@ components:
      format: date-time
    ModifiedAt:
      description: |
        Is defined as the temporal Property at which the Entity, Property or Relationship
        It is defined as the temporal Property at which the Entity, Property or Relationship
        was last modified in an NGSI-LD system, e.g. in order to correct a previously entered incorrect value.

        Entity last modification timestamp. See clause 4.8.
@@ -3424,7 +3407,7 @@ components:
      format: date-time
    DeletedAt:
      description: |
        Is defined as the temporal Property at which the Entity, Property or Relationship was deleted from an NGSI-LD system.
        It is defined as the temporal Property at which the Entity, Property or Relationship was deleted from an NGSI-LD system.

        Entity deletion timestamp. See clause 4.8. It is only used in notifications reporting deletions and in the
        Temporal Representation of Entities (clause 4.5.6), Properties (clause 4.5.7), Relationships (clause 4.5.8)
@@ -3433,7 +3416,7 @@ components:
      format: date-time
    ObservedAt:
      description: |
        Is defined as the temporal Property at which a certain Property or Relationship became valid or was observed.
        It is defined as the temporal Property at which a certain Property or Relationship became valid or was observed.
        For example, a temperature Value was measured by the sensor at this point in time.
      type: string
      format: date-time
@@ -3748,19 +3731,10 @@ components:
            Holds additional optional registration management information that can be used
            to limit unnecessary distributed operation requests.
          $ref: '#/components/schemas/RegistrationManagementInfo'
        # Clause 5.2.2 Common members. System-generated
        createdAt:
        # Clause 5.2.2 Common members. System-generated temporal attributes.
        systemGeneratedAttrs:
          allOf:
            - $ref: '#/components/schemas/CreatedAt'
          readOnly: true
        modifiedAt:
          allOf:
            - $ref: '#/components/schemas/ModifiedAt'
          readOnly: true
        deletedAt:
          allOf:
            - $ref: '#/components/schemas/DeletedAt'
          readOnly: true
            - $ref: '#/components/schemas/SystemGeneratedAttributes'        
        status:
          description: |
            Read-only. Status of the Registration. It shall be "ok" if the last attempt to perform a distributed
@@ -3898,19 +3872,10 @@ components:
          description: |
            See clause 4.7.
          $ref: '#/components/schemas/GeoProperty'
        # Clause 5.2.2 Common members. System-generated
        createdAt:
        # Clause 5.2.2 Common members. System-generated temporal attributes.
        systemGeneratedAttrs:
          allOf:
            - $ref: '#/components/schemas/CreatedAt'
          readOnly: true
        modifiedAt:
          allOf:
            - $ref: '#/components/schemas/ModifiedAt'
          readOnly: true
        deletedAt:
          allOf:
            - $ref: '#/components/schemas/DeletedAt'
          readOnly: true
            - $ref: '#/components/schemas/SystemGeneratedAttributes'
      additionalProperties:
        oneOf:
          - $ref: '#/components/schemas/Property'
@@ -4019,19 +3984,10 @@ components:
          description: |
            See clause 4.7.
          $ref: '#/components/schemas/GeoProperty'
        # Clause 5.2.2 Common members. System-generated
        createdAt:
        # Clause 5.2.2 Common members. System-generated temporal attributes.
        systemGeneratedAttrs:
          allOf:
            - $ref: '#/components/schemas/CreatedAt'
          readOnly: true
        modifiedAt:
          allOf:
            - $ref: '#/components/schemas/ModifiedAt'
          readOnly: true
        deletedAt:
          allOf:
            - $ref: '#/components/schemas/DeletedAt'
          readOnly: true
            - $ref: '#/components/schemas/SystemGeneratedAttributes'
      additionalProperties:
        oneOf:
          - type: array
@@ -4368,19 +4324,10 @@ components:
            It allows identifying a set or group of property values.
          type: string
          format: uri
        # Clause 5.2.2 Common members. System-generated
        createdAt:
          allOf:
            - $ref: '#/components/schemas/CreatedAt'
          readOnly: true
        modifiedAt:
        # Clause 5.2.2 Common members. System-generated temporal attributes.
        systemGeneratedAttrs:
          allOf:
            - $ref: '#/components/schemas/ModifiedAt'
          readOnly: true
        deletedAt:
          allOf:
            - $ref: '#/components/schemas/DeletedAt'
          readOnly: true
            - $ref: '#/components/schemas/SystemGeneratedAttributes'
        instanceId:
          description: |
            A URI uniquely identifying a Property instance,
@@ -4472,19 +4419,10 @@ components:
            It allows identifying a set or group of property values.
          type: string
          format: uri
        # Clause 5.2.2 Common members. System-generated
        createdAt:
        # Clause 5.2.2 Common members. System-generated temporal attributes.
        systemGeneratedAttrs:
          allOf:
            - $ref: '#/components/schemas/CreatedAt'
          readOnly: true
        modifiedAt:
          allOf:
            - $ref: '#/components/schemas/ModifiedAt'
          readOnly: true
        deletedAt:
          allOf:
            - $ref: '#/components/schemas/DeletedAt'
          readOnly: true
            - $ref: '#/components/schemas/SystemGeneratedAttributes'
        instanceId:
          description: |
            A URI uniquely identifying a Property instance,
@@ -4713,6 +4651,10 @@ components:
          format: date-time
      required:
        - endpoint
    Path:
      description: Common schema for URI data type in path parameters.
      type: string
      format: uri
    ######
    # "ProblemDetails" schema from ETSI NFV OAS (BEGIN)
    #
@@ -4806,19 +4748,10 @@ components:
            It allows identifying a set or group of property values.
          type: string
          format: uri
        # Clause 5.2.2 Common members. System-generated
        createdAt:
          allOf:
            - $ref: '#/components/schemas/CreatedAt'
          readOnly: true
        modifiedAt:
        # Clause 5.2.2 Common members. System-generated temporal attributes.
        systemGeneratedAttrs:
          allOf:
            - $ref: '#/components/schemas/ModifiedAt'
          readOnly: true
        deletedAt:
          allOf:
            - $ref: '#/components/schemas/DeletedAt'
          readOnly: true
            - $ref: '#/components/schemas/SystemGeneratedAttributes'
        instanceId:
          description: |
            A URI uniquely identifying a Property instance,
@@ -4994,19 +4927,10 @@ components:
            It allows identifying a set or group of target relationship objects.
          type: string
          format: uri
        # Clause 5.2.2 Common members. System-generated
        createdAt:
          allOf:
            - $ref: '#/components/schemas/CreatedAt'
          readOnly: true
        modifiedAt:
          allOf:
            - $ref: '#/components/schemas/ModifiedAt'
          readOnly: true
        deletedAt:
        # Clause 5.2.2 Common members. System-generated temporal attributes.
        systemGeneratedAttrs:
          allOf:
            - $ref: '#/components/schemas/DeletedAt'
          readOnly: true
            - $ref: '#/components/schemas/SystemGeneratedAttributes'          
        instanceId:
          description: |
            A URI uniquely identifying a Relationship instance
@@ -5123,19 +5047,10 @@ components:
          description: |
            Language filter to be applied to the query (clause 4.15).
          type: string
        # Clause 5.2.2 Common members. System-generated
        createdAt:
        # Clause 5.2.2 Common members. System-generated temporal attributes.
        systemGeneratedAttrs:
          allOf:
            - $ref: '#/components/schemas/CreatedAt'
          readOnly: true
        modifiedAt:
          allOf:
            - $ref: '#/components/schemas/ModifiedAt'
          readOnly: true
        deletedAt:
          allOf:
            - $ref: '#/components/schemas/DeletedAt'
          readOnly: true
            - $ref: '#/components/schemas/SystemGeneratedAttributes'        
        status:
          description: |
            Read-only. Provided by the system when querying the details of a subscription.