Commit d4cdb9a6 authored by Daniel González Sánchez's avatar Daniel González Sánchez
Browse files

Merge branch '1.7.1' into 'main'

Update main branch with changes relative to NGSI-LD OAS v1.7.1

See merge request !3
parents 461d2901 6f76eaff
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -4,9 +4,10 @@ This repository contains the OpenAPI Specification (OAS) for the NGSI-LD API spe


## Online Documentation
## Online Documentation


### Specification Document
### Specification Documents


* [ETSI GS CIM 009](https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.07.01_60/gs_CIM009v010701p.pdf)
* [ETSI GS CIM 047 V1.1.2](https://www.etsi.org/deliver/etsi_gs/CIM/001_099/047/01.01.02_60/gs_CIM047v010102p.pdf)
* [ETSI GS CIM 009 v1.7.1](https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.07.01_60/gs_CIM009v010701p.pdf)


### Navigate API
### Navigate API


+315 −0
Original line number Original line Diff line number Diff line
openapi: 3.0.3
info:
  title: Example schemas for vehicle information
  version: 0.0.1
  description: |
    Example schemas compliant with the NGSI-LD OAS metamodel according to ETSI GS CIM 009.
paths: {}
components:
  schemas:
    Vehicle:
      description: | 
        NGSI-LD Entity Type that represents a vehicle.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Entity'
        - type: object
          properties:
            type:
              description: NGSI-LD Entity identifier. It has to be Vehicle.
              type: string
              enum:
                - Vehicle
              default: Vehicle
            brandName:
              $ref: '#/components/schemas/BrandName'
            street:
              $ref: '#/components/schemas/Street'
            isParked:
              $ref: '#/components/schemas/IsParked'
            category:
              $ref: '#/components/schemas/Category'
            tyreTreadDepths:
              $ref: '#/components/schemas/TyreTreadDepths'
            passengers:
              $ref: '#/components/schemas/Passengers'
            route:
              $ref: '#/components/schemas/Route'
        - required:
            - type
            - brandName
    BrandName:
      description: | 
        NGSI-LD Property Type. The vehicle brand name.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Property'
        - type: object
          properties: 
            value:
              type: string
          required:
            - value 
      additionalProperties: false 
    Street:
      description: | 
        NGSI-LD LanguageProperty Type. The vehicle street.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/LanguageProperty'
        - type: object
          properties:
            languageMap:
              type: object
          required:
            - languageMap 
      additionalProperties: false 
    IsParked:
      additionalProperties: false
      description: |
        NGSI-LD Relationship type to identify the parking where is the vehicle (i.e., the identifier of an NGSI-LD Entity of type OffStreetParking).
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Relationship'
        - type: object
          properties:
            object:
              type: string
              format: uri            
            objectType:
              type: string
              format: uri
            providedBy: 
              $ref: '#/components/schemas/ProvidedBy'
          required:
            - object 
    ProvidedBy:
      additionalProperties: false
      description: |
        NGSI-LD Relationship type to identify the entity that provides something (i.e., the identifier of an NGSI-LD Entity of particular type).
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Relationship'
        - type: object
          properties:
            object:
              type: string 
              format: uri           
          required:
            - object 
    Category:
      description: | 
        NGSI-LD VocabProperty Type. The vehicle category.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/VocabProperty'
        - type: object
          properties: 
            vocab:
              type: string
          required:
            - vocab
      additionalProperties: false  
    TyreTreadDepths:
      description: | 
        NGSI-LD ListProperty Type. The vehicle tyre tread depths.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/ListProperty'
        - type: object
          properties: 
            valueList:
              items:
                type: string
          required:
            - valueList 
      additionalProperties: false
    Passengers:
      description: |
        NGSI-LD Relationship type to identify the passengers of the vehicle (i.e., the identifier of an NGSI-LD Entity of type Person).
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Relationship'
        - type: object
          properties:
            object:
              type: array
              items:
                type: string
                format: uri
            objectType:
              type: string
              format: uri
          required:
            - object 
      additionalProperties: false
    Route:
      description: |
        NGSI-LD ListRelationship type to identify the route of the vehicle (i.e., the list of identifier of NGSI-LD Entities of type City).
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/ListRelationship'
        - type: object
          properties:
            objectList:
              type: array
              items:
                type: object
                format: uri
            objectType:
              type: string
              format: uri
          required:
            - objectList 
      additionalProperties: false
    OffStreetParking:
      description: | 
        NGSI-LD Entity Type that represents a parking.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Entity'
        - type: object
          properties:
            type:
              description: NGSI-LD Entity identifier. It has to be OffStreetParking.
              type: string
              enum:
                - OffStreetParking
              default: OffStreetParking
            name:
              $ref: '#/components/schemas/Name'
            availableSpotNumber:
              $ref: '#/components/schemas/AvailableSpotNumber'
            totalSpotNumber:
              $ref: '#/components/schemas/TotalSpotNumber' 
            operatedBy:
              $ref: '#/components/schemas/OperatedBy'
        - required:
            - type
            - name
    AvailableSpotNumber:
      description: | 
        NGSI-LD Property Type. The available spot number.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Property'
        - type: object
          properties: 
            value:
              type: number
            reliability:
              $ref: '#/components/schemas/Reliability'
            providedBy:
              $ref: '#/components/schemas/ProvidedBy'
          required:
            - value 
      additionalProperties: false
    Reliability:
      description: | 
        NGSI-LD Property Type. The reliability of the available spot number.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Property'
        - type: object
          properties: 
            value:
              type: number
          required:
            - value 
      additionalProperties: false      
    TotalSpotNumber:
      description: | 
        NGSI-LD Property Type. The total spot number.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Property'
        - type: object
          properties: 
            value:
              type: number
          required:
            - value 
      additionalProperties: false
    Person:
      description: | 
        NGSI-LD Entity Type that represents a person.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Entity'
        - type: object
          properties:
            type:
              description: NGSI-LD Entity identifier. It has to be Person.
              type: string
              enum:
                - Person
              default: Person
            name:
              $ref: '#/components/schemas/Name'
        - required:
            - type
            - name
    City:
      description: | 
        NGSI-LD Entity Type that represents a city.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Entity'
        - type: object
          properties:
            type:
              description: NGSI-LD Entity identifier. It has to be City.
              type: string
              enum:
                - City
              default: City
            name:
              $ref: '#/components/schemas/Name'
        - required:
            - type
            - name
    Camera:
      description: | 
        NGSI-LD Entity Type that represents a camera.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Entity'
        - type: object
          properties:
            type:
              description: NGSI-LD Entity identifier. It has to be Camera.
              type: string
              enum:
                - Camera
              default: Camera
            name:
              $ref: '#/components/schemas/Name'
        - required:
            - type
            - name
    Company:
      description: | 
        NGSI-LD Entity Type that represents a company.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Entity'
        - type: object
          properties:
            type:
              description: NGSI-LD Entity identifier. It has to be Company.
              type: string
              enum:
                - Company
              default: Company
            name:
              $ref: '#/components/schemas/Name'
        - required:
            - type
            - name
    Name:
      description: | 
        NGSI-LD Property Type. The natural name of an entity.
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Property'
        - type: object
          properties: 
            value:
              type: string
          required:
            - value 
      additionalProperties: false 
    OperatedBy:
      description: |
        NGSI-LD Relationship type to identify the company that operates the parking (i.e., the identifier of an NGSI-LD Entity of type Company).
      allOf:
        - $ref: '../../openapi-3.0.3/ngsi-ld-api.yaml#/components/schemas/Relationship'
        - type: object
          properties:
            object:
              type: string
          required:
            - object 
      additionalProperties: false
 No newline at end of file