Commit 82872ed8 authored by piscione's avatar piscione
Browse files

Updated specifications: fix on examples, callback and minor.

parent ec634281
Pipeline #9807 failed with stage
in 0 seconds
...@@ -5,16 +5,26 @@ info: ...@@ -5,16 +5,26 @@ info:
contact: contact:
url: https://forge.etsi.org/rep/mec/gs028-wai-api url: https://forge.etsi.org/rep/mec/gs028-wai-api
version: '2.2.1' version: '2.2.1'
license:
name: BSD-3-Clause
url: 'https://forge.etsi.org/legal-matters'
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
servers: servers:
- url: https://localhost/wai/v2 - url: https://localhost/wai/v2
variables: {} variables: {}
externalDocs:
description: ETSI MEC028 V2.2.1 WLAN Information API
url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/028/02.02.01_60/gs_mec028v020201p.pdf
tags:
- name: wai
paths: paths:
/queries/ap/ap_information: /queries/ap/ap_information:
get: get:
tags: tags:
- wai - wai
summary: apInfoGET summary: 'Queries information about existing WLAN Access Points'
description: Queries information about existing WLAN Access Points description: Queries information about existing WLAN Access Points
operationId: apInfoGET operationId: apInfoGET
parameters: parameters:
...@@ -119,7 +129,7 @@ paths: ...@@ -119,7 +129,7 @@ paths:
get: get:
tags: tags:
- wai - wai
summary: staInfoGET summary: 'Queries information about existing WLAN stations'
description: Queries information about existing WLAN stations description: Queries information about existing WLAN stations
operationId: staInfoGET operationId: staInfoGET
parameters: parameters:
...@@ -224,7 +234,7 @@ paths: ...@@ -224,7 +234,7 @@ paths:
get: get:
tags: tags:
- wai - wai
summary: subscriptionLinkList_subscriptionsGET summary: 'Queries information on subscriptions for notifications'
description: Queries information on subscriptions for notifications description: Queries information on subscriptions for notifications
operationId: subscriptionLinkList_subscriptionsGET operationId: subscriptionLinkList_subscriptionsGET
parameters: parameters:
...@@ -243,6 +253,15 @@ paths: ...@@ -243,6 +253,15 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/SubscriptionLinkList' $ref: '#/components/schemas/SubscriptionLinkList'
examples:
example-of-subscription-link-list:
value:
_links:
self:
href: 'http://meAppServer.example.com/wai/v2/subscriptions'
subscription:
- href: http://meAppServer.example.com/wai/v2/subscriptions/sub123
subscriptionType: AssocStaSubscription
'400': '400':
description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.'
headers: {} headers: {}
...@@ -289,7 +308,7 @@ paths: ...@@ -289,7 +308,7 @@ paths:
post: post:
tags: tags:
- wai - wai
summary: subscriptionsPOST summary: 'Creates a new subscription to WLAN Access Information notifications'
description: Creates a new subscription to WLAN Access Information notifications description: Creates a new subscription to WLAN Access Information notifications
operationId: subscriptionsPOST operationId: subscriptionsPOST
parameters: [] parameters: []
...@@ -316,18 +335,20 @@ paths: ...@@ -316,18 +335,20 @@ paths:
ipAddress: ipAddress:
- 10.10.100.1 - 10.10.100.1
contentMediaType: application/json contentMediaType: application/json
example: examples:
subscriptionType: AssocStaSubscription example-of-AssocStaSubscription:
callbackReference: http://meAppClient.example.com/wai/v2/notifications/1 value:
expiryDeadline: subscriptionType: AssocStaSubscription
seconds: 1977836800 callbackReference: http://meAppClient.example.com/wai/v2/notifications/1
nanoSeconds: 0 expiryDeadline:
apId: seconds: 1977836800
bssid: 005C0A0A0A0A nanoSeconds: 0
ssid: apId:
- myNetworkSsid bssid: 005C0A0A0A0A
ipAddress: ssid:
- 10.10.100.1 - myNetworkSsid
ipAddress:
- 10.10.100.1
required: true required: true
responses: responses:
'201': '201':
...@@ -356,21 +377,23 @@ paths: ...@@ -356,21 +377,23 @@ paths:
ipAddress: ipAddress:
- 10.10.100.1 - 10.10.100.1
contentMediaType: application/json contentMediaType: application/json
example: examples:
subscriptionType: AssocStaSubscription example-of-assoc--sta-subscription:
callbackReference: http://meAppClient.example.com/wai/v2/notifications/1 value:
_links: subscriptionType: AssocStaSubscription
self: callbackReference: http://meAppClient.example.com/wai/v2/notifications/1
href: http://meAppServer.example.com/wai/v2/subscriptions/sub123 _links:
expiryDeadline: self:
seconds: 1977836800 href: http://meAppServer.example.com/wai/v2/subscriptions/sub123
nanoSeconds: 0 expiryDeadline:
apId: seconds: 1977836800
bssid: 005C0A0A0A0A nanoSeconds: 0
ssid: apId:
- myNetworkSsid bssid: 005C0A0A0A0A
ipAddress: ssid:
- 10.10.100.1 - myNetworkSsid
ipAddress:
- 10.10.100.1
'400': '400':
description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.'
headers: {} headers: {}
...@@ -420,13 +443,14 @@ paths: ...@@ -420,13 +443,14 @@ paths:
application/problem+json: application/problem+json:
schema: schema:
$ref: '#/components/schemas/ProblemDetails' $ref: '#/components/schemas/ProblemDetails'
example: examples:
application/problem+json: application/problem+json:
type: https://meAppServer.example.com/wai/v2/probs/too-many targets value:
title: Too many targets type: https://meAppServer.example.com/wai/v2/probs/too-many targets
status: '422' title: Too many targets
detail: The target area for the request is considered too large status: 422
instance: /meAppClient.example.com/77777/msgs/abc detail: The target area for the request is considered too large
instance: /meAppClient.example.com/77777/msgs/abc
'429': '429':
description: 'Too Many Requests : used when a rate limiter has triggered.' description: 'Too Many Requests : used when a rate limiter has triggered.'
headers: {} headers: {}
...@@ -435,12 +459,52 @@ paths: ...@@ -435,12 +459,52 @@ paths:
schema: schema:
$ref: '#/components/schemas/ProblemDetails' $ref: '#/components/schemas/ProblemDetails'
deprecated: false deprecated: false
callbacks:
notification:
'{$request.body#/callbackReference}':
post:
summary: Callback POST used to send a notification
description: 'Notification from WAIS, content based on subscription type'
operationId: notificationPOST
requestBody:
description: Subscription notification
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/InlineNotification'
examples:
example-assoc-sta-notification:
value:
notificationType: AssocStaNotification
timeStamp:
seconds: 1977836800
nanoSeconds: 0
apId:
bssid: 005C0A0A0A0A
ssid:
- myNetworkSsid
ipAddress:
- 10.10.100.1
staId:
macId: 005C01111111
ssid:
- myNetworkSsid
- myOtherNetworkSsid
aid: '1122'
ipAddress:
- 10.10.1.255
responses:
'204':
description: "No content"
parameters: [] parameters: []
/subscriptions/{subscriptionId}: /subscriptions/{subscriptionId}:
get: get:
tags: tags:
- wai - wai
summary: subscriptionsGET summary: 'Queries information about an existing subscription, identified by its self-referring URI returned on creation (initial POST)'
description: Queries information about an existing subscription, identified by its self-referring URI returned on creation (initial POST) description: Queries information about an existing subscription, identified by its self-referring URI returned on creation (initial POST)
operationId: subscriptionsGET operationId: subscriptionsGET
parameters: parameters:
...@@ -478,21 +542,23 @@ paths: ...@@ -478,21 +542,23 @@ paths:
ipAddress: ipAddress:
- 10.10.100.1 - 10.10.100.1
contentMediaType: application/json contentMediaType: application/json
example: examples:
subscriptionType: AssocStaSubscription example-of-assoc-sta-subscription:
callbackReference: http://meAppClient.example.com/wai/v2/notifications/1 value:
_links: subscriptionType: AssocStaSubscription
self: callbackReference: http://meAppClient.example.com/wai/v2/notifications/1
href: http://meAppServer.example.com/wai/v2/subscriptions/sub123 _links:
expiryDeadline: self:
seconds: 1977836800 href: http://meAppServer.example.com/wai/v2/subscriptions/sub123
nanoSeconds: 0 expiryDeadline:
apId: seconds: 1977836800
bssid: 005C0A0A0A0A nanoSeconds: 0
ssid: apId:
- myNetworkSsid bssid: 005C0A0A0A0A
ipAddress: ssid:
- 10.10.100.1 - myNetworkSsid
ipAddress:
- 10.10.100.1
'400': '400':
description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.'
headers: {} headers: {}
...@@ -539,7 +605,7 @@ paths: ...@@ -539,7 +605,7 @@ paths:
put: put:
tags: tags:
- wai - wai
summary: subscriptionsPUT summary: 'Updates an existing subscription, identified by its self-referring URI returned on creation (initial POST)'
description: Updates an existing subscription, identified by its self-referring URI returned on creation (initial POST) description: Updates an existing subscription, identified by its self-referring URI returned on creation (initial POST)
operationId: subscriptionsPUT operationId: subscriptionsPUT
parameters: parameters:
...@@ -576,21 +642,24 @@ paths: ...@@ -576,21 +642,24 @@ paths:
ipAddress: ipAddress:
- 10.10.100.1 - 10.10.100.1
contentMediaType: application/json contentMediaType: application/json
example: examples:
subscriptionType: AssocStaSubscription example-of-assoc-sta-subscription:
callbackReference: http://meAppClient.example.com/wai/v2/notifications/1 value:
_links:
self: subscriptionType: AssocStaSubscription
href: http://meAppServer.example.com/wai/v2/subscriptions/sub123 callbackReference: http://meAppClient.example.com/wai/v2/notifications/1
expiryDeadline: _links:
seconds: 1977836800 self:
nanoSeconds: 0 href: http://meAppServer.example.com/wai/v2/subscriptions/sub123
apId: expiryDeadline:
bssid: 005C0A0A0A0A seconds: 1977836800
ssid: nanoSeconds: 0
- myNetworkSsid apId:
ipAddress: bssid: 005C0A0A0A0A
- 10.10.100.1 ssid:
- myNetworkSsid
ipAddress:
- 10.10.100.1
required: true required: true
responses: responses:
'200': '200':
...@@ -615,17 +684,20 @@ paths: ...@@ -615,17 +684,20 @@ paths:
ipAddress: ipAddress:
- 10.10.100.1 - 10.10.100.1
contentMediaType: application/json contentMediaType: application/json
example: examples:
_links: example-sub-type:
self: value:
subscriptionType: "AssocStaSubscription"
_links:
self:
href: http://[hostIP]/sbox-xyz123/wai/v2/subscriptions/sub123 href: http://[hostIP]/sbox-xyz123/wai/v2/subscriptions/sub123
callbackReference: http://my.callback.com/wai/some-id callbackReference: http://my.callback.com/wai/some-id
apId: apId:
bssid: 005C0A0A0A0A bssid: 005C0A0A0A0A
ssid: ssid:
- myNetworkSsid - myNetworkSsid
ipAddress: ipAddress:
- 10.10.100.1 - 10.10.100.1
'400': '400':
description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.'
headers: {} headers: {}
...@@ -675,13 +747,14 @@ paths: ...@@ -675,13 +747,14 @@ paths:
application/problem+json: application/problem+json:
schema: schema:
$ref: '#/components/schemas/ProblemDetails' $ref: '#/components/schemas/ProblemDetails'
example: examples:
application/problem+json: application/problem+json:
type: https://meAppServer.example.com/wai/v2/probs/too-many targets value:
title: Too many targets type: https://meAppServer.example.com/wai/v2/probs/too-many targets
status: '422' title: Too many targets
detail: The target area for the request is considered too large status: 422
instance: /meAppClient.example.com/77777/msgs/abc detail: The target area for the request is considered too large
instance: /meAppClient.example.com/77777/msgs/abc
'429': '429':
description: 'Too Many Requests : used when a rate limiter has triggered.' description: 'Too Many Requests : used when a rate limiter has triggered.'
headers: {} headers: {}
...@@ -693,7 +766,7 @@ paths: ...@@ -693,7 +766,7 @@ paths:
delete: delete:
tags: tags:
- wai - wai
summary: subscriptionsDELETE summary: 'Cancels an existing subscription, identified by its self-referring URI returned on creation (initial POST)'
description: Cancels an existing subscription, identified by its self-referring URI returned on creation (initial POST) description: Cancels an existing subscription, identified by its self-referring URI returned on creation (initial POST)
operationId: subscriptionsDELETE operationId: subscriptionsDELETE
parameters: parameters:
...@@ -743,7 +816,7 @@ paths: ...@@ -743,7 +816,7 @@ paths:
get: get:
tags: tags:
- wai - wai
summary: measurementLinkList_measurementsGET summary: 'Queries information on measurements configuration'
description: Queries information on measurements configuration description: Queries information on measurements configuration
operationId: measurementLinkList_measurementsGET operationId: measurementLinkList_measurementsGET
parameters: [] parameters: []
...@@ -755,13 +828,15 @@ paths: ...@@ -755,13 +828,15 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/MeasurementConfigLinkList' $ref: '#/components/schemas/MeasurementConfigLinkList'
example: examples:
_links: example-measurement:
self: value:
href: http://meAppServer.example.com/wai/v2/measurements _links:
measurementConfig: self:
- href: http://meAppServer.example.com/wai/v2/measurements/meas123 href: http://meAppServer.example.com/wai/v2/measurements
measurementId: myId1 measurementConfig:
- href: http://meAppServer.example.com/wai/v2/measurements/meas123
measurementId: myId1
'400': '400':
description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.'
headers: {} headers: {}
...@@ -808,7 +883,7 @@ paths: ...@@ -808,7 +883,7 @@ paths:
post: post:
tags: tags:
- wai - wai
summary: measurementsPOST summary: 'Creates a new measurement configuration'
description: Creates a new measurement configuration description: Creates a new measurement configuration
operationId: measurementsPOST operationId: measurementsPOST
parameters: [] parameters: []
...@@ -818,6 +893,16 @@ paths: ...@@ -818,6 +893,16 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/MeasurementConfig' $ref: '#/components/schemas/MeasurementConfig'
examples:
example-body:
value:
staId:
- macId: 005C01111111
ssid:
- myNetworkSsid
- myOtherNetworkSsid
measurementId: myId1
measurementInfo: {}
required: true required: true
responses: responses:
'201': '201':
...@@ -827,6 +912,19 @@ paths: ...@@ -827,6 +912,19 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/MeasurementConfig' $ref: '#/components/schemas/MeasurementConfig'
examples:
example-response:
value:
_links:
self:
href: 'http://meAppServer.example.com/wai/v2/measurements/meas123'
staId:
- macId: 005C01111111
ssid:
- myNetworkSsid
- myOtherNetworkSsid
measurementId: myId1
measurementInfo: {}
'400': '400':
description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.'
headers: {} headers: {}
...@@ -876,13 +974,14 @@ paths: ...@@ -876,13 +974,14 @@ paths:
application/problem+json: application/problem+json:
schema: schema:
$ref: '#/components/schemas/ProblemDetails' $ref: '#/components/schemas/ProblemDetails'
example: examples:
application/problem+json: application/problem+json:
type: https://meAppServer.example.com/wai/v2/probs/too-many targets value:
title: Too many targets type: https://meAppServer.example.com/wai/v2/probs/too-many targets
status: '422' title: Too many targets
detail: The target area for the request is considered too large status: 422
instance: /meAppClient.example.com/77777/msgs/abc detail: The target area for the request is considered too large
instance: /meAppClient.example.com/77777/msgs/abc
'429': '429':
description: 'Too Many Requests : used when a rate limiter has triggered.' description: 'Too Many Requests : used when a rate limiter has triggered.'
headers: {} headers: {}
...@@ -896,7 +995,7 @@ paths: ...@@ -896,7 +995,7 @@ paths:
get: get:
tags: tags:
- wai - wai
summary: measurementsGET summary: 'Queries information about an existing measurement configuration, identified by its self-referring URI returned on creation (initial POST)'
description: Queries information about an existing measurement configuration, identified by its self-referring URI returned on creation (initial POST) description: Queries information about an existing measurement configuration, identified by its self-referring URI returned on creation (initial POST)
operationId: measurementsGET operationId: measurementsGET
parameters: parameters:
...@@ -915,6 +1014,21 @@ paths: ...@@ -915,6 +1014,21 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/MeasurementConfig' $ref: '#/components/schemas/MeasurementConfig'
examples:
response-example:
value:
_links:
self:
href: 'http://meAppServer.example.com/wai/v2/measurements/meas123'
staId:
- macId: 005C01111111
ssid:
- myNetworkSsid
- myOtherNetworkSsid
measurementId: myId1
measurementInfo: {}
'400': '400':
description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.'
headers: {} headers: {}
...@@ -961,7 +1075,7 @@ paths: ...@@ -961,7 +1075,7 @@ paths:
put: put:
tags: tags:
- wai - wai
summary: measurementsPUT summary: 'Updates an existing measurement configuration, identified by its self-referring URI returned on creation (initial POST)'
description: Updates an existing measurement configuration, identified by its self-referring URI returned on creation (initial POST) description: Updates an existing measurement configuration, identified by its self-referring URI returned on creation (initial POST)
operationId: measurementsPUT operationId: measurementsPUT
parameters: parameters:
...@@ -1036,13 +1150,14 @@ paths: ...@@ -1036,13 +1150,14 @@ paths:
application/problem+json: application/problem+json:
schema: schema:
$ref: '#/components/schemas/ProblemDetails' $ref: '#/components/schemas/ProblemDetails'
example: examples:
application/problem+json: application/problem+json:
type: https://meAppServer.example.com/wai/v2/probs/too-many targets value:
title: Too many targets type: https://meAppServer.example.com/wai/v2/probs/too-many targets
status: '422' title: Too many targets
detail: The target area for the request is considered too large