Commit df86a34f authored by Marco Cavalli's avatar Marco Cavalli
Browse files

Refactor ngsi-ld-api.yaml to include ngsildTenant parameter in createContext operation

parent cbb5b5df
Loading
Loading
Loading
Loading
+43 −21
Original line number Diff line number Diff line
@@ -2439,6 +2439,8 @@ paths:
        With this operation, a client can ask the Broker to store the full content
        of a specific @context, by giving it to the Broker.
      operationId: createContext
      parameters:
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      requestBody:
        description: |
          Payload body in the request contains a JSON object that has a root node named @context,
@@ -2495,10 +2497,7 @@ paths:
        # Query params
        - $ref: '#/components/parameters/Query.details'
        - $ref: '#/components/parameters/Query.kind'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        '200':
@@ -2519,31 +2518,17 @@ paths:
                      format: uri
                  - type: array
                    items:
                      type: object
                      $ref: '#/components/schemas/LdContextMetadata'
            application/json+ld:
              schema:
                oneOf:
                  - type: array
                    items:
                      allOf:
                        - type: string
                      type: string
                      format: uri
                        - type: object
                          required:
                            - '@context'
                          properties:
                            '@context':
                              $ref:  '#/components/schemas/LdContext'
                  - type: array
                    items:
                      allOf:
                        - type: object
                        - type: object
                          required:
                            - '@context'
                          properties:
                            '@context':
                              $ref:  '#/components/schemas/LdContext'
                      $ref: '#/components/schemas/LdContextMetadata'
        '400':
          $ref: '#/components/responses/BadRequest'
  /jsonldContexts/{contextId}:
@@ -4432,6 +4417,43 @@ components:
              - type: string
                format: uri
              - type: object
    LdContextMetadata:
      description: |
        JSON object which represents information (metadata)
        about an @context currently stored by the Broker as defined in 5.13.3.5. It contains information about the @context's
        original URL (if any), its local identifier in the Broker's storage, its kind ("Cached", "Hosted" and "ImplicitlyCreated"),
        its creation timestamp, its expiry date (if "Cached"), and additional optional information.
      type: array
      items:
        type: object
        properties:
          "URL": 
            type: string
            format: uri
          "localId":
            type: string
            format: uri
          "kind":
            type: string
            enum:
              - Cached
              - Hosted
              - ImplicitlyCreated
          "timestamp":
            type: string
            format: date-time
          "lastUsage":
            type: string
            format: date-time
          "numberOfHits":
            type: integer
          "extraInfo":
            type: object
        required:
          - "URL"
          - "localId"
          - "kind"
          - "timestamp"
    NotUpdatedDetails:
      description: |
        5.2.19 represents additional information provided by an implementation