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

Add NGSILD-Tenant header to all responses

parent e79f66ef
Loading
Loading
Loading
Loading
+192 −27
Original line number Diff line number Diff line
@@ -213,7 +213,9 @@ paths:
      summary: |
        Entity deletion by id
      description: |
        5.6.6 Delete Entity
        5.6.6 Delete entity.

        This operation allows deleting an NGSI-LD Entity.
      operationId: deleteEntity
      parameters:
        # Path params
@@ -231,10 +233,19 @@ paths:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          $ref: '#/components/responses/MultiStatus.BatchOperationResult'
        400:
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          $ref: '#/components/responses/BadRequest'
        404:
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
@@ -273,6 +284,9 @@ paths:
        204:
          description: |
            All the Attributes were merged successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          $ref: '#/components/responses/MultiStatus.BatchOperationResult'
        400:
@@ -302,7 +316,11 @@ paths:
        $ref: '#/components/requestBodies/EntityFragment'
      responses:
        204:
          description: The entity was replaced successfully.
          description: |
            The entity was replaced successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          $ref: '#/components/responses/MultiStatus.BatchOperationResult'
        400:
@@ -338,7 +356,11 @@ paths:
        $ref: '#/components/requestBodies/EntityFragment'
      responses:
        204:
          description: All the Attributes were appended successfully.
          description: |
            All the Attributes were appended successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          $ref: '#/components/responses/MultiStatus.UpdateResult'
        400:
@@ -371,7 +393,11 @@ paths:
        $ref: '#/components/requestBodies/EntityFragment'
      responses:
        204:
          description: All the Attributes were appended successfully.
          description: |
            All the Attributes were appended successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          $ref: '#/components/responses/MultiStatus.UpdateResult'
        400:
@@ -406,7 +432,11 @@ paths:
        $ref: '#/components/requestBodies/EntityFragment'
      responses:
        204:
          description: The attribute was updated successfully.
          description: |
            The attribute was updated successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          $ref: '#/components/responses/MultiStatus.UpdateResult'
        400:
@@ -434,7 +464,11 @@ paths:
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        204:
          description: The attribute was deleted successfully.
          description: |
            The attribute was deleted successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          $ref: '#/components/responses/MultiStatus.UpdateResult'
        400:
@@ -462,7 +496,11 @@ paths:
        $ref: '#/components/requestBodies/EntityFragment'
      responses:
        204:
          description: The attribute was replaced successfully.
          description: |
            The attribute was replaced successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          $ref: '#/components/responses/MultiStatus.UpdateResult'
        400:
@@ -494,6 +532,8 @@ paths:
            The HTTP response shall include a "Location" HTTP header that contains
            the resource URI of the created context source registration resource.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            Location:
              $ref: '#/components/headers/Location'
        400:
@@ -633,7 +673,11 @@ paths:
        $ref: '#/components/requestBodies/CsourceRegistrationFragment'
      responses:
        204:
          description: The context source registration was successfully updated.
          description: |
            The context source registration was successfully updated.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404:
@@ -655,7 +699,11 @@ paths:
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        204:
          description: No Content
          description: |
            No Content.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404:
@@ -684,6 +732,8 @@ paths:
            The HTTP response shall include a "Location" HTTP header that contains the resource URI
            of the created subscription resource.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            Location:
              $ref: '#/components/headers/Location'
        400:
@@ -800,7 +850,11 @@ paths:
        $ref: '#/components/requestBodies/SubscriptionFragment'
      responses:
        204:
          description: No Content
          description: |
            No Content.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404:
@@ -822,7 +876,11 @@ paths:
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        204:
          description: No Content
          description: |
            No Content.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404:
@@ -852,6 +910,8 @@ paths:
            The HTTP response shall include a "Location" HTTP header that contains
            the resource URI of the created context source registration subscription resource.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            Location:
              $ref: '#/components/headers/Location'
        400:
@@ -884,6 +944,8 @@ paths:
          description: |
            A response body containing a list of context source registration subscriptions.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            NGSILD-Results-Count:
              $ref: '#/components/headers/NGSILD-Results-Count'
          content:
@@ -928,6 +990,8 @@ paths:
            A response body containing the JSON-LD representation of
            the target context source registration subscription.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          content:
@@ -976,7 +1040,11 @@ paths:
        $ref: '#/components/requestBodies/SubscriptionFragment'
      responses:
        204:
          description: The context source registration subscription was successfully updated.
          description: |
            The context source registration subscription was successfully updated.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404:
@@ -998,7 +1066,11 @@ paths:
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        204:
          description: No Content
          description: |
            No Content.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404:
@@ -1008,8 +1080,12 @@ paths:
      tags:
        - Core API
        - Context Information Provision
      summary: Batch Entity creation.
      description: 5.6.7 Batch Entity Creation.
      summary: |
        Batch Entity creation.
      description: |
        5.6.7 Batch Entity Creation.

        This operation allows creating a batch of NGSI-LD Entities.
      operationId: createBatch
      parameters:
        # Local Query param
@@ -1027,6 +1103,9 @@ paths:
            If all entities have been successfully created, an array of Strings containing URIs
            is returned in the response. Each URI represents the Entity Id of a created entity.
            There is no restriction as to the order of the Entity Ids.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1035,7 +1114,14 @@ paths:
                  type: string
            application/json+ld:
              schema:
                type: array
                allOf:
                  - type: object
                    required:
                      - '@context'
                    properties:
                      '@context':
                        $ref:  '#/components/schemas/LdContext'
                  - type: array
                    items:
                      type: string
        207:
@@ -1086,6 +1172,9 @@ paths:
            Entity Ids of the created entities only) is returned in the response. There is no restriction as to
            the order of the Entity Ids. The merely updated entities do not take part in the response
            (corresponding to 204 No Content returned in the case of updates).
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1100,6 +1189,9 @@ paths:
        204:
          description: |
            If all entities already existed and are successfully updated, there is no payload body in the response.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          description: |
            If only some or none of the entities have been successfully created, a response body containing the
@@ -1144,6 +1236,9 @@ paths:
        204:
          description: |
            If all entities already existed and are successfully updated, there is no payload body in the response.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          description: |
            If only some or none of the entities have been successfully created, a response body containing the
@@ -1185,6 +1280,9 @@ paths:
        204:
          description: |
            If all entities existed and have been successfully deleted, there is no payload body in the response.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          description: |
            If some or all of the entities have not been successfully deleted, or did not exist,
@@ -1225,7 +1323,11 @@ paths:
        $ref: '#/components/requestBodies/Query'
      responses:
        200:
          description: A response body containing the query result as a list of Entities.
          description: |
            A response body containing the query result as a list of Entities.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1268,6 +1370,9 @@ paths:
        204:
          description: |
            If all entities have been successfully merged, there is no payload body in the response.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        207:
          description: |
            If only some or none of the entities have been successfully merged, a response body containing the
@@ -1313,10 +1418,16 @@ paths:
            The HTTP response shall include a "Location" HTTP header that contains
            the resource URI of the created entity resource.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            Location:
              $ref: '#/components/headers/Location'
        204:
          description: Upon update success.
          description: |
            Upon update success.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        422:
@@ -1362,6 +1473,9 @@ paths:
        200:
          description: |
            A response body containing the query result as a list of temporal representation of Entities.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1421,6 +1535,9 @@ paths:
          description: |
            A response body containing the JSON-LD temporal representation
            of the target entity containing the selected Attributes.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1456,7 +1573,11 @@ paths:
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        204:
          description: No Content
          description: |
            No Content.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404:
@@ -1483,7 +1604,11 @@ paths:
        $ref: '#/components/requestBodies/EntityTemporalFragment'
      responses:
        204:
          description: All the Attributes were added successfully.
          description: |
            All the Attributes were added successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404:
@@ -1515,7 +1640,11 @@ paths:
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        204:
          description: The attribute was deleted successfully.
          description: |
            The attribute was deleted successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404:
@@ -1543,7 +1672,11 @@ paths:
        $ref: '#/components/requestBodies/EntityTemporalFragment'
      responses:
        204:
          description: The attribute was updated successfully.
          description: |
            The attribute was updated successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404:
@@ -1567,7 +1700,11 @@ paths:
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        204:
          description: The attribute instance was delete successfully.
          description: |
            The attribute instance was delete successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404:
@@ -1591,7 +1728,11 @@ paths:
        $ref: '#/components/requestBodies/Query'
      responses:
        200:
          description: A response body containing the query result as a list of Entities.
          description: |
            A response body containing the query result as a list of Entities.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1645,6 +1786,9 @@ paths:

            If details=true is specified, a response body containing a JSON-LD array
            with elements of the EntityType data structure (clause 5.2.25) is to be returned.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1701,6 +1845,9 @@ paths:
          description: |
            A response body containing the JSON-LD representation of
            the detailed information about the available entity type.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1752,6 +1899,9 @@ paths:

            If details=true is specified, a response body containing a JSON-LD array
            with elements of the Attribute data structure (clause 5.2.28) is to be returned.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1804,6 +1954,9 @@ paths:
          description: |
            A response body containing the JSON-LD representation of
            the detailed information about the available attribute.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1846,6 +1999,8 @@ paths:
           The HTTP response shall include a "Location" HTTP header that contains the
           local URI of the added @context.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            Location:
              $ref: '#/components/headers/Location'
        400:
@@ -1869,6 +2024,9 @@ paths:
          description: |
            A response body containing a list of URLs or a list of JSON Objects, as defined in clause 5.13.3.5,
            representing metadata about stored @contexts.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1920,6 +2078,9 @@ paths:
            has a root node named @context, which represents a JSON-LD "local context".
            If the parameter details is True, response body contains a JSON object as defined
            in clause 5.13.4.5, which metadata of a JSON-LD "local context".
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            application/json:
              schema:
@@ -1957,7 +2118,11 @@ paths:
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        204:
          description: No Content.
          description: |
            No Content.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        400:
          $ref: '#/components/responses/BadRequest'
        404: