Commit be1da771 authored by Ignacio Dominguez Martinez-Casanueva's avatar Ignacio Dominguez Martinez-Casanueva
Browse files

Add SubscriptionStatus schema for get operations

parent 9e786c97
Loading
Loading
Loading
Loading
+19 −31
Original line number Diff line number Diff line
@@ -800,7 +800,7 @@ paths:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Subscription'
                  $ref: '#/components/schemas/SubscriptionStatus'
            application/json+ld:
              schema:
                allOf:
@@ -812,7 +812,7 @@ paths:
                        $ref:  '#/components/schemas/LdContext'
                  - type: array
                    items:
                      $ref: '#/components/schemas/Subscription'
                      $ref: '#/components/schemas/SubscriptionStatus'
        '400':
          $ref: '#/components/responses/BadRequest'
  /subscriptions/{subscriptionId}:
@@ -843,7 +843,7 @@ paths:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
                $ref: '#/components/schemas/SubscriptionStatus'
            application/json+ld:
              schema:
                allOf:
@@ -853,7 +853,7 @@ paths:
                    properties:
                      '@context':
                        $ref:  '#/components/schemas/LdContext'
                  - $ref: '#/components/schemas/Subscription'
                  - $ref: '#/components/schemas/SubscriptionStatus'
        '400':
          headers:
            NGSILD-Warning:
@@ -3616,7 +3616,7 @@ components:
          format: date-time
      required:
        - startAt
    SubscriptionFragment.Core:
    SubscriptionCommon:
      description: |
        5.2.12 represents a Context Subscription.
      type: object
@@ -3709,7 +3709,7 @@ components:
          type: string
    SubscriptionFragment.Periodic:
      allOf:
        - $ref: '#/components/schemas/SubscriptionFragment.Core'
        - $ref: '#/components/schemas/SubscriptionCommon'
        - properties:
            timeInterval:
              description: |
@@ -3719,7 +3719,7 @@ components:
              minimum: 1
    SubscriptionFragment.OnChange:
      allOf:
        - $ref: '#/components/schemas/SubscriptionFragment.Core'
        - $ref: '#/components/schemas/SubscriptionCommon'
        - properties:
            watchedAttributes:
              description: |
@@ -3741,24 +3741,8 @@ components:
    Subscription.Periodic:
      allOf:
        - $ref: '#/components/schemas/SubscriptionFragment.Periodic'
        - type: object
          properties:
            # Clause 5.2.2 Common members. System-generated.
            createdAt:
              $ref: '#/components/schemas/CreatedAt'
            modifiedAt:
              $ref: '#/components/schemas/ModifiedAt'
            deletedAt:
              $ref: '#/components/schemas/DeletedAt'
            status:
              description: |
                Read-only. Provided by the system when querying the details of a subscription.
              type: string
              enum:
                - active
                - paused
                - expired
        - required:
          - id
          - type
          - notification
          - entities
@@ -3766,6 +3750,17 @@ components:
    Subscription.OnChange:
      allOf:
        - $ref: '#/components/schemas/SubscriptionFragment.OnChange'
        - required:
          - id
          - type
          - notification
    Subscription:
      oneOf:
        - $ref: '#/components/schemas/Subscription.Periodic'
        - $ref: '#/components/schemas/Subscription.OnChange'
    SubscriptionStatus:
      allOf:
        - $ref: '#/components/schemas/Subscription'
        - type: object
          properties:
            # Clause 5.2.2 Common members. System-generated.
@@ -3783,13 +3778,6 @@ components:
                - active
                - paused
                - expired
        - required:
          - type
          - notification
    Subscription:
      oneOf:
        - $ref: '#/components/schemas/Subscription.Periodic'
        - $ref: '#/components/schemas/Subscription.OnChange'
    GeoQuery:
      description: |
        5.2.13 represents a geoquery used for Subscriptions.