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
......@@ -15,4 +15,47 @@ responses:
$ref: '#/definitions/TrafficRule'
examples:
application/json:
$ref: '../examples/TrafficRule.json'
\ No newline at end of file
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'
\ No newline at end of file
......@@ -12,4 +12,43 @@ responses:
type: object
properties:
TrafficRule:
$ref: '#/definitions/TrafficRule'
\ No newline at end of file
$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'
\ No newline at end of file
......@@ -16,4 +16,58 @@ responses:
type: object
properties:
ServiceInfo:
$ref: '#/definitions/ServiceInfo'
\ No newline at end of file
$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'
\ No newline at end of file
......@@ -12,4 +12,58 @@ responses:
type: object
properties:
ServiceInfo:
$ref: '#/definitions/ServiceInfo'
\ No newline at end of file
$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'
\ No newline at end of file
......@@ -11,7 +11,57 @@ responses:
properties:
ServiceInfo:
$ref: '#/definitions/ServiceInfo'
examples:
application/json:
$ref: '../examples/ServiceInfo.json'
\ No newline at end of file
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'
\ No newline at end of file
......@@ -13,7 +13,64 @@ responses:
properties:
ServiceInfo:
$ref: '#/definitions/ServiceInfo'
examples:
application/json:
$ref: '../examples/ServiceInfo.json'
\ No newline at end of file
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'
412:
description: Precondition Failed
schema:
type: object
properties:
ProblemDetails:
$ref: '#/definitions/ProblemDetails'
\ No newline at end of file
......@@ -10,4 +10,27 @@ responses:
type: object
properties:
TimingCaps:
$ref: '#/definitions/TimingCaps'
\ No newline at end of file
$ref: '#/definitions/TimingCaps'
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'
\ No newline at end of file
......@@ -10,4 +10,27 @@ responses:
type: object
properties:
CurrentTime:
$ref: '#/definitions/CurrentTime'
\ No newline at end of file
$ref: '#/definitions/CurrentTime'
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'
\ No newline at end of file
......@@ -12,4 +12,27 @@ responses:
type: object
properties:
TransportInfo:
$ref: '#/definitions/TransportInfo'
\ No newline at end of file
$ref: '#/definitions/TransportInfo'
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'
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment