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

Master to develop(fix erroneous revert) #15

Merged
merged 3 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 1 addition & 4 deletions .sanitizerconfig
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,7 @@ strategy:
identifier: null
modified_at: null
name: null
parkings_permitarea_allowed_users:
id: null
permitarea_id: null
user_id: null
permitted_user_id: null
parkings_permitareaitem:
area_id: null
end_time: null
Expand Down
120 changes: 0 additions & 120 deletions docs/api/description.md

This file was deleted.

14 changes: 8 additions & 6 deletions docs/api/enforcement.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
openapi: 3.0.1
info:
title: Parkkihubi Enforcement API
description:
$ref: ./description.md
description: >-
Parkkihubi Enforcement REST API Documentation
version: "1.2.0"
servers:
- url: https://parkki.turku.fi/enforcement/v1/
- url: https://api.parkkiopas.fi/enforcement/v1/
description: Production server
- url: https://testapi.parkkiopas.fi/enforcement/v1/
description: Test server
- url: http://localhost:8000/enforcement/v1/
description: Local development server
tags:
Expand Down Expand Up @@ -397,7 +399,7 @@ paths:
properties:
allowed:
description: >-
Allowance status of the parking or event parking.
Allowance status of the parking or event parking.
True if there exists a parking or permit in the system which is
valid for the specified registration number at the
specified location (and time), false otherwise.
Expand Down Expand Up @@ -599,7 +601,7 @@ paths:
type: object
example:
count: 100
next: "https://parkki.turku.fi/enforcement/v1/valid_permit_item/?page=2"
next: "https://api.parkkiopas.fi/enforcement/v1/valid_permit_item/?page=2"
previous: null
results:
- << : *validPermitItemExample
Expand Down Expand Up @@ -1083,4 +1085,4 @@ paths:
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
$ref: '#/components/responses/NotFound'
50 changes: 26 additions & 24 deletions docs/api/operator.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
openapi: 3.0.1
info:
title: Parkkihubi Operator API
description:
$ref: ./description.md
description: >-
Parkkihubi Operator REST API Documentation
version: "1.2.0"
servers:
- url: https://parkki.turku.fi/operator/v1/
- url: https://api.parkkiopas.fi/operator/v1/
description: Production server
- url: https://testapi.parkkiopas.fi/operator/v1/
description: Test server
- url: http://localhost:8000/operator/v1/
description: Local development server
tags:
Expand Down Expand Up @@ -180,7 +182,7 @@ components:
format: dateTime
readOnly: true
location: &eventParkingLocation
$ref: '#/components/schemas/Location'
$ref: '#/components/schemas/Location'
registration_number: &eventParkingRegistrationNumber
description: Registration number of the event parked vehicle
type: string
Expand All @@ -202,11 +204,11 @@ components:
description: The ID of the event area the event parking is assigned to
type: string
format: uuid
readOnly: true
readOnly: true
required:
- registration_number
- time_start
- event_area_id
- time_start
- event_area_id

Location:
description: Location in GeoJSON format
Expand All @@ -229,7 +231,7 @@ components:
items:
type: number
format: float

PaymentZone:
type: object
example:
Expand Down Expand Up @@ -658,7 +660,7 @@ paths:
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'

/event_parking/:
post:
tags: ['EventParkings']
Expand All @@ -668,11 +670,11 @@ paths:
requestBody:
required: true
description: >-
Event parking to add to the system. An active event area must be is assigned to the event parking.
The event area is assigned either based on the location or the event_area_id.
Event parking to add to the system. An active event area must be is assigned to the event parking.
The event area is assigned either based on the location or the event_area_id.
If event_area_id is not passed, the location must be inside an active event area.
The event area can be assigned by passing the id of the event area with the 'event_area_id' parameter.
If both location and evet_area_id is passed, the event_area_id will be used.
If both location and evet_area_id is passed, the event_area_id will be used.
content: &eventParkingBodyContent
application/json:
schema:
Expand All @@ -690,32 +692,32 @@ paths:
type: object
properties:
location:
<< : *eventParkingLocation
<< : *eventParkingLocation
registration_number:
<< : *eventParkingRegistrationNumber
time_start:
<< : *eventParkingTimeStart
time_end:
<< : *eventParkingTimeEnd
domain:
<< : *eventParkingDomain
<< : *eventParkingDomain
required:
- registration_number
- time_start
- time_start
oneOf:
- required:
- location
- required:
- event_area_id
- event_area_id
responses:
'201':
description: The event parking was created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/EventParking'
'400':
$ref: '#/components/responses/BadRequest'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
/event_parking/{event_parking_id}/:
Expand Down Expand Up @@ -776,7 +778,7 @@ paths:
time_end: "2016-12-25T22:00:00Z"
properties:
location:
<< : *eventParkingLocation
<< : *eventParkingLocation
registration_number:
<< : *eventParkingRegistrationNumber
time_start:
Expand All @@ -786,7 +788,7 @@ paths:
domain:
<< : *eventParkingDomain
event_area_id:
<< : *eventParkingEventAreaID
<< : *eventParkingEventAreaID
responses:
'200':
description: The event parking was updated successfully
Expand Down Expand Up @@ -824,9 +826,9 @@ paths:
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'



/payment_zone/:
get:
tags: ['Payment Zones']
Expand Down Expand Up @@ -1336,4 +1338,4 @@ paths:
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
$ref: '#/components/responses/NotFound'
Loading
Loading