Unverified Commit 014821b6 authored by Daniel González-Sánchez's avatar Daniel González-Sánchez Committed by GitHub
Browse files

Merge pull request #5 from giros-dit/1.6.1-ops-context-info-consumption-rev

NGSI-LD Context Information Consumption Operations - OAS 1.6.1
parents 82741bac 8b38947f
Loading
Loading
Loading
Loading
+79 −59
Original line number Diff line number Diff line
@@ -153,11 +153,11 @@ paths:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Entity'
                    - type: object
                      properties:
                        '@context':
                          $ref:  '#/components/schemas/LdContext'
                    - $ref: '#/components/schemas/Entity'
                    - required:
                        - id
                        - type
@@ -220,11 +220,11 @@ paths:
            application/json+ld:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Entity'
                  - type: object
                    properties:
                      '@context':
                        $ref:  '#/components/schemas/LdContext'
                  - $ref: '#/components/schemas/Entity'
                  - required:
                      - id
                      - type
@@ -923,7 +923,7 @@ paths:
          $ref: '#/components/responses/Conflict'
    get:
      tags:
        - Context Information Consumption
        - Context Information Subscription
      summary: |
        Retrieve list of Subscriptions
      description: |
@@ -979,7 +979,7 @@ paths:
  /subscriptions/{subscriptionId}:
    get:
      tags:
        - Context Information Consumption
        - Context Information Subscription
      summary: |
        Subscription retrieval by id
      description: |
@@ -1790,7 +1790,7 @@ paths:
      summary: |
        Temporal Representation of Entity creation
      description: |
        5.6.11 Upsert Temporal Representation.
        5.6.11 Create or Update Temporal Representation of an Entity.

        This operation allows creating or updating (by adding new Attribute instances)
        a Temporal Representation of an Entity.
@@ -1862,6 +1862,7 @@ paths:
        - $ref: '#/components/parameters/Query.scopeQ'
        - $ref: '#/components/parameters/Query.limit'
        - $ref: '#/components/parameters/Query.options.temporal'
        - $ref: '#/components/parameters/Query.options.sysAttrs'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
@@ -1889,11 +1890,11 @@ paths:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/EntityTemporal'
                    - type: object
                      properties:
                        '@context':
                          $ref:  '#/components/schemas/LdContext'
                    - $ref: '#/components/schemas/EntityTemporal'
                    - required:
                        - id
                        - type
@@ -1921,17 +1922,14 @@ paths:
        - $ref: '#/components/parameters/Query.attrs'
        - $ref: '#/components/parameters/Query.timeproperty'
        - $ref: '#/components/parameters/Query.timerel'
          required: true
        - $ref: '#/components/parameters/Query.timeAt'
          required: true
        - $ref: '#/components/parameters/Query.endTimeAt'
        - $ref: '#/components/parameters/Query.lastN'
        - $ref: '#/components/parameters/Query.lang'
        - $ref: '#/components/parameters/Query.aggrMethods'
        - $ref: '#/components/parameters/Query.aggrPeriodDuration'
        - $ref: '#/components/parameters/Query.scopeQ'
        - $ref: '#/components/parameters/Query.limit'
        - $ref: '#/components/parameters/Query.options.temporal'
        - $ref: '#/components/parameters/Query.options.sysAttrs'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
@@ -1956,11 +1954,11 @@ paths:
            application/json+ld:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EntityTemporal'
                  - type: object
                    properties:
                      '@context':
                        $ref:  '#/components/schemas/LdContext'
                  - $ref: '#/components/schemas/EntityTemporal'
                  - required:
                      - id
                      - type
@@ -2005,7 +2003,7 @@ paths:
      summary: |
        Temporal Representation of Entity Attribute instance addition
      description: |
        5.6.12 Append Entity Attributes.
        5.6.12 Add Attributes to Temporal Representation of an Entity.

        This operation allows modifying a Temporal Representation of an Entity by adding new Attribute instances.
      operationId: appendAttrsTemporal
@@ -2184,11 +2182,11 @@ paths:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/EntityTemporal'
                    - type: object
                      properties:
                        '@context':
                          $ref:  '#/components/schemas/LdContext'
                    - $ref: '#/components/schemas/EntityTemporal'
                    - required:
                        - id
                        - type
@@ -2206,7 +2204,12 @@ paths:

        This operation allows retrieving a list of NGSI-LD entity types for which
        entity instances exist within the NGSI-LD system.
      operationId: retrieveTypes

        5.7.6  Retrieve Details of Available Entity Types.

        This operation allows retrieving a list with a detailed representation of
        NGSI-LD entity types for which entity instances exist within the NGSI-LD system.
      operationId: retrieveEntityTypes
      parameters:
        # Query params
        - name: details
@@ -2239,9 +2242,7 @@ paths:
            application/json:
              schema:
                oneOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/EntityTypeList'
                  - $ref: '#/components/schemas/EntityTypeList'
                  - type: array
                    items:
                      $ref: '#/components/schemas/EntityType'
@@ -2255,19 +2256,17 @@ paths:
                      properties:
                        '@context':
                          $ref:  '#/components/schemas/LdContext'
                    - $ref: '#/components/schemas/EntityTypeList'
                  - type: array
                    items:
                        $ref: '#/components/schemas/EntityTypeList'
                  - allOf:
                      allOf:
                        - type: object
                          required:
                            - '@context'
                          properties:
                            '@context':
                             $ref:  '#/components/schemas/LdContext'
                    - type: array
                      items:
                        $ref: '#/components/schemas/EntityType'
                        - $ref: '#/components/schemas/EntityType'
        '400':
          $ref: '#/components/responses/BadRequest'
  /types/{type}:
@@ -2285,7 +2284,7 @@ paths:
        instances and details about attributes that existing instances of this entity type have, including
        their name (as short name if available in the provided @context) and a list of types the attribute
        can have (e.g. Property, Relationship or GeoProperty).
      operationId: retrieveTypeInfo
      operationId: retrieveEntityTypeInfo
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.type'
@@ -2309,13 +2308,13 @@ paths:
            application/json+ld:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EntityTypeInfo'
                  - type: object
                    required:
                      - '@context'
                    properties:
                      '@context':
                        $ref:  '#/components/schemas/LdContext'
                  - $ref: '#/components/schemas/EntityTypeInfo'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
@@ -2325,13 +2324,18 @@ paths:
      tags:
        - Context Information Consumption
      summary: |
        Retrieve Available Attributes
        Available attributes
      description: |
        5.7.8 Retrieve Available attributes.
        5.7.8 Retrieve Available Attributes.

        This operation allows retrieving a list of NGSI-LD attributes that belong to
        entity instances existing within the NGSI- LD system.
      operationId: retrieveAttributes

        5.7.9 Retrieve Details of Available Attributes.

        This operation allows retrieving a list with a detailed representation of NGSI-LD 
        attributes that belong to entity instances existing within the NGSI-LD system.
      operationId: retrieveAttrTypes
      parameters:
        # Query params
        - name: details
@@ -2372,23 +2376,23 @@ paths:
              schema:
                oneOf:
                  - allOf:
                    - $ref: '#/components/schemas/AttributeList'
                    - type: object
                      required:
                        - '@context'
                      properties:
                        '@context':
                          $ref:  '#/components/schemas/LdContext'
                  - allOf:
                    - $ref: '#/components/schemas/AttributeList'
                  - type: array
                    items:
                        $ref: '#/components/schemas/Attribute'
                      allOf:
                        - type: object
                          required:
                            - '@context'
                          properties:
                            '@context':
                             $ref:  '#/components/schemas/LdContext'
                        - $ref: '#/components/schemas/Attribute'
        '400':
          $ref: '#/components/responses/BadRequest'
  /attributes/{attrId}:
@@ -2396,16 +2400,16 @@ paths:
      tags:
        - Context Information Consumption
      summary: |
        Retrieve Available Attribute Information
        Details about available attribute
      description: |
        5.7.10 Retrieve Available Attribute information.
        5.7.10 Retrieve Available Attribute Information.

        This operation allows retrieving detailed attribute information about a specified NGSI-LD attribute
        that belongs to entity instances existing within the NGSI-LD system. The detailed representation includes
        the attribute name (as short name if available in the provided @context) and the type names
        for which entity instances exist that have the respective attribute, a count of available
        attribute instances and a list of types the attribute can have (e.g. Property, Relationship or GeoProperty).
      operationId: retrieveAttrInfo
      operationId: retrieveAttrTypeInfo
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.attrId'
@@ -2429,13 +2433,13 @@ paths:
            application/json+ld:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Attribute'
                  - type: object
                    required:
                      - '@context'
                    properties:
                      '@context':
                        $ref:  '#/components/schemas/LdContext'
                  - $ref: '#/components/schemas/Attribute'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
@@ -2809,6 +2813,7 @@ components:
      explode: false
      schema:
        type: string
        default: '0'
      required: false
    Query.attrs:
      name: attrs
@@ -2823,7 +2828,6 @@ components:
        type: array
        items:
          type: string
          format: uri
      required: false
    Query.coordinates:
      name: coordinates
@@ -2965,6 +2969,11 @@ components:
      explode: true
      schema:
        type: string
        enum:
          - location
          - observationSpace
          - operationSpace
        default: location
      required: false
    Query.georel:
      name: georel
@@ -3020,7 +3029,7 @@ components:
      explode: true
      schema:
        type: integer
        minimum: 0
        minimum: 1
      required: false
    Query.limit:
      name: limit
@@ -3166,6 +3175,7 @@ components:
          - createdAt
          - modifiedAt
          - deletedAt
        default: observedAt
      required: false
    Query.timerel:
      name: timerel
@@ -3258,11 +3268,11 @@ components:
        application/json+ld:
          schema:
            allOf:
              - $ref: '#/components/schemas/Query.temporal'
              - type: object
                properties:
                  '@context':
                    $ref:  '#/components/schemas/LdContext'
              - $ref: '#/components/schemas/Query.temporal'
              - required:
                - '@context'
    Subscription:
@@ -3313,7 +3323,9 @@ components:
        - noOverwrite
    options.representation:
      description: |
        6.3.7 Representation of Entities. When its value includes the keyword "normalized", a normalized
        6.3.7 Representation of Entities. 
        
        When its value includes the keyword "normalized", a normalized
        representation of Entities shall be provided as defined by clause 4.5.1, with Attributes returned
        in the normalized representation as defined in clauses 4.5.2.2, 4.5.3.2 and 4.5.18.2.

@@ -3332,8 +3344,15 @@ components:
        - normalized
        - concise
        - keyValues
        - simplified
    options.sysAttrs:
      description: 6.3.11 Including system generated attributes.
      description: | 
        6.3.11 Including system generated attributes.

        When its value includes the keyword "sysAttrs", a representation of NGSI-LD Elements shall be 
        provided so that the system generated attributes createdAt, modifiedAt are included in the response 
        payload body. In the case of temporal representations, also the system generated attribute deletedAt 
        is included, if the NGSI-LD Element has been deleted.
      type: string
      enum:
        - sysAttrs
@@ -5105,6 +5124,7 @@ components:
            - createdAt
            - modifiedAt
            - deletedAt
          default: observedAt
      required:
        - timerel
        - timeAt