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

Refactor ngsi-ld-api.yaml to include required '@context' property in payload body schema

parent df86a34f
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -2508,7 +2508,6 @@ paths:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
          content:
            # TODO: Output data described in 5.13.3.5, but not formally defined in tables.
            application/json:
              schema:
                oneOf:
@@ -2549,10 +2548,7 @@ paths:
        - $ref: '#/components/parameters/Path.contextId'
        # Query params
        - $ref: '#/components/parameters/Query.details'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        '200':
@@ -2567,17 +2563,20 @@ paths:
          content:
            application/json:
              schema:
                type: object
                oneOf:
                  - type: object
                    properties:
                      '@context':
                        $ref: '#/components/schemas/LdContext'
                  - $ref: '#/components/schemas/LdContextMetadata'
            application/json+ld:
              schema:
                allOf:
                oneOf:
                  - type: object
                    required:
                      - '@context'
                    properties:
                      '@context':
                        $ref: '#/components/schemas/LdContext'
                  - type: object
                  - $ref: '#/components/schemas/LdContextMetadata'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':