Commit 536efb7c authored by Walter Featherstone's avatar Walter Featherstone
Browse files

Fixes to response codes and explicit inclusion of examples

Change-Id: Ib659e383574036e6b7cbf7cc2476f2d9f9a6eaf1
parent d743aa66
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -137,6 +137,38 @@ paths: ...@@ -137,6 +137,38 @@ paths:
properties: properties:
DnsRule: DnsRule:
$ref: '#/definitions/DnsRule' $ref: '#/definitions/DnsRule'
examples:
application/json:
DnsRule:
dnsRuleId: DnsRule1
domainName: www.example.com
ipAddressType: IP_V4
ipAddress: 146.241.7.3
ttl: 300
state: ACTIVE
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'/applications/{appInstanceId}/dns_rules/{dnsRuleId}': '/applications/{appInstanceId}/dns_rules/{dnsRuleId}':
parameters: parameters:
- $ref: '#/parameters/Path.AppInstanceId' - $ref: '#/parameters/Path.AppInstanceId'
...@@ -154,6 +186,38 @@ paths: ...@@ -154,6 +186,38 @@ paths:
properties: properties:
DnsRule: DnsRule:
$ref: '#/definitions/DnsRule' $ref: '#/definitions/DnsRule'
examples:
application/json:
DnsRule:
dnsRuleId: DnsRule1
domainName: www.example.com
ipAddressType: IP_V4
ipAddress: 146.241.7.3
ttl: 300
state: ACTIVE
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
put: put:
description: 'This method activates, de-activates or updates a traffic rule.' description: 'This method activates, de-activates or updates a traffic rule.'
operationId: ApplicationsDnsRule.PUT operationId: ApplicationsDnsRule.PUT
...@@ -169,6 +233,45 @@ paths: ...@@ -169,6 +233,45 @@ paths:
properties: properties:
DnsRule: DnsRule:
$ref: '#/definitions/DnsRule' $ref: '#/definitions/DnsRule'
examples:
application/json:
DnsRule:
dnsRuleId: DnsRule1
domainName: www.example.com
ipAddressType: IP_V4
ipAddress: 146.241.7.3
ttl: 300
state: ACTIVE
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'412':
description: Precondition Failed
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'/applications/{appInstanceId}/subscriptions': '/applications/{appInstanceId}/subscriptions':
parameters: parameters:
- $ref: '#/parameters/Path.AppInstanceId' - $ref: '#/parameters/Path.AppInstanceId'
...@@ -185,6 +288,29 @@ paths: ...@@ -185,6 +288,29 @@ paths:
properties: properties:
Mp1SubscriptionLinkList: Mp1SubscriptionLinkList:
$ref: '#/definitions/Mp1SubscriptionLinkList' $ref: '#/definitions/Mp1SubscriptionLinkList'
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
post: post:
description: 'The POST method may be used to create a new subscription. One example use case is to create a new subscription to the mobile edge service availability notifications. Upon success, the response contains entity body describing the created subscription.' description: 'The POST method may be used to create a new subscription. One example use case is to create a new subscription to the mobile edge service availability notifications. Upon success, the response contains entity body describing the created subscription.'
operationId: ApplicationsSubscriptions.POST operationId: ApplicationsSubscriptions.POST
...@@ -193,13 +319,36 @@ paths: ...@@ -193,13 +319,36 @@ paths:
parameters: parameters:
- $ref: '#/parameters/Body.AppTerminationNotificationSubscription' - $ref: '#/parameters/Body.AppTerminationNotificationSubscription'
responses: responses:
'200': '201':
description: Entity body in the request contains a subscription to the mobile edge service availability notifications that is to be created. description: Entity body in the request contains a subscription to the mobile edge service availability notifications that is to be created.
schema: schema:
type: object type: object
properties: properties:
AppTerminationNotificationSubscription: AppTerminationNotificationSubscription:
$ref: '#/definitions/AppTerminationNotificationSubscription.Response' $ref: '#/definitions/AppTerminationNotificationSubscription.Response'
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'/applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}': '/applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}':
parameters: parameters:
- $ref: '#/parameters/Path.AppInstanceId' - $ref: '#/parameters/Path.AppInstanceId'
...@@ -218,6 +367,29 @@ paths: ...@@ -218,6 +367,29 @@ paths:
properties: properties:
SerAvailabilityNotificationSubscription: SerAvailabilityNotificationSubscription:
$ref: '#/definitions/SerAvailabilityNotificationSubscription.Response' $ref: '#/definitions/SerAvailabilityNotificationSubscription.Response'
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
delete: delete:
description: This method deletes a meMp1Subscription. This method is typically used in "Unsubscribing from service availability event notifications" procedure. description: This method deletes a meMp1Subscription. This method is typically used in "Unsubscribing from service availability event notifications" procedure.
operationId: ApplicationsSubscription.DELETE operationId: ApplicationsSubscription.DELETE
...@@ -226,6 +398,22 @@ paths: ...@@ -226,6 +398,22 @@ paths:
responses: responses:
'204': '204':
description: No Content description: No Content
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'/applications/{appInstanceId}/traffic_rules': '/applications/{appInstanceId}/traffic_rules':
parameters: parameters:
- $ref: '#/parameters/Path.AppInstanceId' - $ref: '#/parameters/Path.AppInstanceId'
...@@ -244,6 +432,49 @@ paths: ...@@ -244,6 +432,49 @@ paths:
properties: properties:
TrafficRule: TrafficRule:
$ref: '#/definitions/TrafficRule' $ref: '#/definitions/TrafficRule'
examples:
application/json:
TrafficRule:
trafficRuleId: TrafficRule123
serName: ExampleService
filterType: FLOW
priority: 1
trafficFilter:
srcAddress:
- 192.168.2.0/24
- 192.168.3.0/24
dstAddress:
- 192.127.4.100/32
dstPort:
- 80
action: FORWARD_DECAPSULATED
dstInterface:
interfaceType: IP
dstIpAddress: 20.1.1.1
state: ACTIVE
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'/applications/{appInstanceId}/traffic_rules/{trafficRuleId}': '/applications/{appInstanceId}/traffic_rules/{trafficRuleId}':
parameters: parameters:
- $ref: '#/parameters/Path.AppInstanceId' - $ref: '#/parameters/Path.AppInstanceId'
...@@ -261,6 +492,49 @@ paths: ...@@ -261,6 +492,49 @@ paths:
properties: properties:
TrafficRule: TrafficRule:
$ref: '#/definitions/TrafficRule' $ref: '#/definitions/TrafficRule'
examples:
application/json:
TrafficRule:
trafficRuleId: TrafficRule123
serName: ExampleService
filterType: FLOW
priority: 1
trafficFilter:
srcAddress:
- 192.168.2.0/24
- 192.168.3.0/24
dstAddress:
- 192.127.4.100/32
dstPort:
- 80
action: FORWARD_DECAPSULATED
dstInterface:
interfaceType: IP
dstIpAddress: 20.1.1.1
state: ACTIVE
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
put: put:
description: This method retrieves information about all the traffic rules associated with a mobile edge application instance. description: This method retrieves information about all the traffic rules associated with a mobile edge application instance.
operationId: ApplicationsTrafficRules.PUT operationId: ApplicationsTrafficRules.PUT
...@@ -276,6 +550,56 @@ paths: ...@@ -276,6 +550,56 @@ paths:
properties: properties:
TrafficRule: TrafficRule:
$ref: '#/definitions/TrafficRule' $ref: '#/definitions/TrafficRule'
examples:
application/json:
TrafficRule:
trafficRuleId: TrafficRule123
serName: ExampleService
filterType: FLOW
priority: 1
trafficFilter:
srcAddress:
- 192.168.2.0/24
- 192.168.3.0/24
dstAddress:
- 192.127.4.100/32
dstPort:
- 80
action: FORWARD_DECAPSULATED
dstInterface:
interfaceType: IP
dstIpAddress: 20.1.1.1
state: ACTIVE
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'412':
description: Precondition Failed
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
/services: /services:
get: get:
description: This method retrieves information about a list of meService resources. This method is typically used in "service availability query" procedure description: This method retrieves information about a list of meService resources. This method is typically used in "service availability query" procedure
...@@ -296,6 +620,60 @@ paths: ...@@ -296,6 +620,60 @@ paths:
properties: properties:
ServiceInfo: ServiceInfo:
$ref: '#/definitions/ServiceInfo' $ref: '#/definitions/ServiceInfo'
examples:
application/json:
ServiceInfo:
serInstanceId: ServiceInstance123
serName: ExampleService
serCategory:
href: catItem1
id: id12345
name: RNI
version: version1
version: ServiceVersion1
state: ACTIVE
transportId: Rest1
transportInfo:
id: TransId12345
name: REST
description: REST API
type: JSON
protocol: HTTP
version: '2.0'
endpoint:
uris:
- /meMp1/service/EntryPoint
addresses:
- host: 192.0.2.0
port: '8080'
security.mp1:
oAuth2Info:
grantTypes: OAUTH2_CLIENT_CREDENTIALS
tokenEndpoint: /meMp1/security.mp1/TokenEndPoint
serializer: JSON
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
put: put:
description: This method is used to create a meService resource. This method is typically used in "service availability update and new service registration" procedure description: This method is used to create a meService resource. This method is typically used in "service availability update and new service registration" procedure
operationId: Services.POST operationId: Services.POST
...@@ -311,6 +689,60 @@ paths: ...@@ -311,6 +689,60 @@ paths:
properties: properties:
ServiceInfo: ServiceInfo:
$ref: '#/definitions/ServiceInfo' $ref: '#/definitions/ServiceInfo'
examples:
application/json:
ServiceInfo:
serInstanceId: ServiceInstance123
serName: ExampleService
serCategory:
href: catItem1
id: id12345
name: RNI
version: version1
version: ServiceVersion1
state: ACTIVE
transportId: Rest1
transportInfo:
id: TransId12345
name: REST
description: REST API
type: JSON
protocol: HTTP
version: '2.0'
endpoint:
uris:
- /meMp1/service/EntryPoint
addresses:
- host: 192.0.2.0
port: '8080'
security.mp1:
oAuth2Info:
grantTypes: OAUTH2_CLIENT_CREDENTIALS
tokenEndpoint: /meMp1/security.mp1/TokenEndPoint
serializer: JSON
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'/services/{serviceId}': '/services/{serviceId}':
parameters: parameters:
- $ref: '#/parameters/Path.ServiceId' - $ref: '#/parameters/Path.ServiceId'
...@@ -353,11 +785,34 @@ paths: ...@@ -353,11 +785,34 @@ paths:
addresses: addresses:
- host: 192.0.2.0 - host: 192.0.2.0
port: '8080' port: '8080'
security: security.mp1:
oAuth2Info: oAuth2Info:
grantTypes: OAUTH2_CLIENT_CREDENTIALS grantTypes: OAUTH2_CLIENT_CREDENTIALS
tokenEndpoint: /meMp1/mp1.security/TokenEndPoint tokenEndpoint: /meMp1/security.mp1/TokenEndPoint
serializer: JSON serializer: JSON
'400':
description: Bad Request
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'403':
description: Forbidden
schema:
type: object
required:
- ProblemDetails
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
'404':
description: Not Found
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
put: put:
description: This method updates the information about a meService resource description: This method updates the information about a meService resource
operationId: ServicesServiceId.PUT operationId: ServicesServiceId.PUT
...@@ -399,11 +854,41 @@ paths: ...@@ -399,11 +854,41 @@ paths:
addresses: addresses:
- host: 192.0.2.0 - host: 192.0.2.0
port: '8080' port: '8080'
security: security.mp1:
oAuth2Info: oAuth2Info:
grantTypes: OAUTH2_CLIENT_CREDENTIALS grantTypes: OAUTH2_CLIENT_CREDENTIALS
tokenEndpoint: /meMp1/mp1.security/TokenEndPoint tokenEndpoint: /meMp1/security.mp1/TokenEndPoint
serializer: JSON serializer: JSON
'400':
description: Bad Request
schema: