Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Swagger #8

Merged
merged 26 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion OffStreetParking/model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ OffStreetParking:
- $ref: >-
https://smart-data-models.github.io/data-models/ngsi-ld.yaml#/Common
type: object
description: Off street parking
description: >-
A site, off street, intended to park vehicles, managed independently and with suitable and clearly marked access points (entrances and exits).
If necessary, and for management purposes or to deal with multi-location parking sites,
it can be divided into different zones modelled by the entity type ParkingGroup .
In DATEX 2 version 2.3 terminology it corresponds to a UrbanParkingSite of type offStreetParking.
properties:
acceptedPaymentMethod:
x-ngsi:
Expand Down
53 changes: 53 additions & 0 deletions OffStreetParking/swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
components:
schemas:
OffStreetParking:
$ref: "https://smart-data-models.github.io/dataModel.Parking/OffStreetParking/model.yaml#/OffStreetParking"
info:
description: >-
A site, off street, intended to park vehicles, managed independently and with suitable and clearly marked access points (entrances and exits).
If necessary, and for management purposes or to deal with multi-location parking sites,
it can be divided into different zones modelled by the entity type ParkingGroup .
In DATEX 2 version 2.3 terminology it corresponds to a UrbanParkingSite of type offStreetParking.
title: OffStreetParking
version: "1.0.0"
openapi: "3.0.0"

# These paths are merely representative.
paths:
/ngsi-ld/v1/entities:
get:
description: "Retrieve a set of entities which matches a specific query from an NGSI-LD system"
parameters:
-
in: query
name: type
required: true
schema:
enum:
- OffStreetParking
type: string
responses:
? "200"
:
content:
application/ld+json:
examples:
keyvalues:
summary: "Key-Values Pairs"
value:
-
$ref: "https://smart-data-models.github.io/dataModel.Parking/OffStreetParking/examples/example-normalized.json"
normalized:
summary: "Normalized NGSI-LD"
value:
-
$ref: "https://smart-data-models.github.io/dataModel.Parking/OffStreetParking/examples/example-normalized-ld.jsonld"
description: OK
tags:
- ngsi-ld
tags:
-

description: "NGSI-LD Linked-data Format"
name: ngsi-ld
5 changes: 4 additions & 1 deletion OnStreetParking/model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ OnStreetParking:
- $ref: >-
https://smart-data-models.github.io/data-models/ngsi-ld.yaml#/Common
type: object
description: On street parking
description: >-
A site, open space zone, on street, (metered or not) with direct access from a road,
intended to park vehicles. In DATEX 2 version 2.3 terminology
it corresponds to a UrbanParkingSite of type onStreetParking.
properties:
address:
$ref: >-
Expand Down
52 changes: 52 additions & 0 deletions OnStreetParking/swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
components:
schemas:
OnStreetParking:
$ref: "https://smart-data-models.github.io/dataModel.Parking/OnStreetParking/model.yaml#/OnStreetParking"
info:
description: >-
A site, open space zone, on street, (metered or not) with direct access from a road,
intended to park vehicles. In DATEX 2 version 2.3 terminology it
corresponds to a UrbanParkingSite of type onStreetParking.
title: OnStreetParking
version: "1.0.0"
openapi: "3.0.0"

# These paths are merely representative.
paths:
/ngsi-ld/v1/entities:
get:
description: "Retrieve a set of entities which matches a specific query from an NGSI-LD system"
parameters:
-
in: query
name: type
required: true
schema:
enum:
- OnStreetParking
type: string
responses:
? "200"
:
content:
application/ld+json:
examples:
keyvalues:
summary: "Key-Values Pairs"
value:
-
$ref: "https://smart-data-models.github.io/dataModel.Parking/OnStreetParking/examples/example-normalized.json"
normalized:
summary: "Normalized NGSI-LD"
value:
-
$ref: "https://smart-data-models.github.io/dataModel.Parking/OnStreetParking/examples/example-normalized-ld.jsonld"
description: OK
tags:
- ngsi-ld
tags:
-

description: "NGSI-LD Linked-data Format"
name: ngsi-ld
3 changes: 2 additions & 1 deletion ParkingAccess/model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ ParkingAccess:
- $ref: >-
https://smart-data-models.github.io/data-models/ngsi-ld.yaml#/Common
type: object
description: 'Parking Access - TODO: Provide a complete Schema'
description: >-
Represents an access point to a parking site, normally an offstreet parking.
properties:
address:
$ref: >-
Expand Down
50 changes: 50 additions & 0 deletions ParkingAccess/swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
components:
schemas:
ParkingAccess:
$ref: "https://smart-data-models.github.io/dataModel.Parking/ParkingAccess/model.yaml#/ParkingAccess"
info:
description: >-
Represents an access point to a parking site, normally an offstreet parking.
title: ParkingAccess
version: "1.0.0"
openapi: "3.0.0"

# These paths are merely representative.
paths:
/ngsi-ld/v1/entities:
get:
description: "Retrieve a set of entities which matches a specific query from an NGSI-LD system"
parameters:
-
in: query
name: type
required: true
schema:
enum:
- ParkingAccess
type: string
responses:
? "200"
:
content:
application/ld+json:
examples:
keyvalues:
summary: "Key-Values Pairs"
value:
-
$ref: "https://smart-data-models.github.io/dataModel.Parking/ParkingAccess/examples/example-normalized.json"
normalized:
summary: "Normalized NGSI-LD"
value:
-
$ref: "https://smart-data-models.github.io/dataModel.Parking/ParkingAccess/examples/example-normalized-ld.jsonld"
description: OK
tags:
- ngsi-ld
tags:
-

description: "NGSI-LD Linked-data Format"
name: ngsi-ld
7 changes: 6 additions & 1 deletion ParkingGroup/model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ ParkingGroup:
- $ref: >-
https://smart-data-models.github.io/data-models/ngsi-ld.yaml#/Common
type: object
description: 'Parking Group - TODO: Provide a complete Schema'
description: >-
A group of parking spots. Granularity level can vary. It can be an storey on a parking garage,
an specific zone belonging to a big parking lot, or just a group of spots intended for parking a certain vehicle type or
subject to certain restrictions (disabled, residents, ...).
For the sake of simplicity only one vehicle type per parking group is allowed. Similarly,
one required permit is only allowed per group type.
properties:
alternateName:
$ref: >-
Expand Down
54 changes: 54 additions & 0 deletions ParkingGroup/swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
components:
schemas:
ParkingAccess:
$ref: "https://smart-data-models.github.io/dataModel.Parking/ParkingAccess/model.yaml#/ParkingAccess"
info:
description: >-
A group of parking spots. Granularity level can vary. It can be an storey on a parking garage,
an specific zone belonging to a big parking lot, or just a group of spots intended for parking a certain vehicle type or
subject to certain restrictions (disabled, residents, ...).
For the sake of simplicity only one vehicle type per parking group is allowed. Similarly,
one required permit is only allowed per group type.
title: ParkingAccess
version: "1.0.0"
openapi: "3.0.0"

# These paths are merely representative.
paths:
/ngsi-ld/v1/entities:
get:
description: "Retrieve a set of entities which matches a specific query from an NGSI-LD system"
parameters:
-
in: query
name: type
required: true
schema:
enum:
- ParkingAccess
type: string
responses:
? "200"
:
content:
application/ld+json:
examples:
keyvalues:
summary: "Key-Values Pairs"
value:
-
$ref: "https://smart-data-models.github.io/dataModel.Parking/ParkingAccess/examples/example-normalized.json"
normalized:
summary: "Normalized NGSI-LD"
value:
-
$ref: "https://smart-data-models.github.io/dataModel.Parking/ParkingAccess/examples/example-normalized-ld.jsonld"
description: OK
tags:
- ngsi-ld
tags:
-

description: "NGSI-LD Linked-data Format"
name: ngsi-ld
53 changes: 53 additions & 0 deletions ParkingSpot/swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
components:
schemas:
ParkingSpot:
$ref: "https://smart-data-models.github.io/dataModel.Parking/ParkingSpot/model.yaml#/ParkingSpot"
info:
description: >-
A parking spot is an area well delimited where one vehicle can be parked.
The aim of this entity type is to monitor the status of parking spots individually.
Thus, an entity of type ParkingSpot cannot exist without a containing entity of type (OnStreetParking, OffStreetParking).
A parking spot might belong to one group.
title: ParkingSpot
version: "1.0.0"
openapi: "3.0.0"

# These paths are merely representative.
paths:
/ngsi-ld/v1/entities:
get:
description: "Retrieve a set of entities which matches a specific query from an NGSI-LD system"
parameters:
-
in: query
name: type
required: true
schema:
enum:
- ParkingSpot
type: string
responses:
? "200"
:
content:
application/ld+json:
examples:
keyvalues:
summary: "Key-Values Pairs"
value:
-
$ref: "https://smart-data-models.github.io/dataModel.Parking/ParkingSpot/examples/example-normalized.json"
normalized:
summary: "Normalized NGSI-LD"
value:
-
$ref: "https://smart-data-models.github.io/dataModel.Parking/ParkingSpot/examples/example-normalized-ld.jsonld"
description: OK
tags:
- ngsi-ld
tags:
-

description: "NGSI-LD Linked-data Format"
name: ngsi-ld