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: ...@@ -15,4 +15,47 @@ responses:
$ref: '#/definitions/TrafficRule' $ref: '#/definitions/TrafficRule'
examples: examples:
application/json: application/json:
$ref: '../examples/TrafficRule.json' TrafficRule:
\ No newline at end of file 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: ...@@ -12,4 +12,43 @@ responses:
type: object type: object
properties: properties:
TrafficRule: TrafficRule:
$ref: '#/definitions/TrafficRule' $ref: '#/definitions/TrafficRule'
\ No newline at end of file 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: ...@@ -16,4 +16,58 @@ responses:
type: object type: object
properties: properties:
ServiceInfo: ServiceInfo:
$ref: '#/definitions/ServiceInfo' $ref: '#/definitions/ServiceInfo'
\ No newline at end of file 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: ...@@ -12,4 +12,58 @@ responses:
type: object type: object
properties: properties:
ServiceInfo: ServiceInfo:
$ref: '#/definitions/ServiceInfo' $ref: '#/definitions/ServiceInfo'
\ No newline at end of file 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: ...@@ -11,7 +11,57 @@ responses:
properties: properties:
ServiceInfo: ServiceInfo:
$ref: '#/definitions/ServiceInfo' $ref: '#/definitions/ServiceInfo'
examples: examples:
application/json: application/json:
$ref: '../examples/ServiceInfo.json' ServiceInfo:
\ No newline at end of file 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: ...@@ -13,7 +13,64 @@ responses:
properties: properties:
ServiceInfo: ServiceInfo:
$ref: '#/definitions/ServiceInfo' $ref: '#/definitions/ServiceInfo'
examples: examples:
application/json: application/json:
$ref: '../examples/ServiceInfo.json' ServiceInfo:
\ No newline at end of file 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: ...@@ -10,4 +10,27 @@ responses:
type: object type: object
properties: properties:
TimingCaps: TimingCaps:
$ref: '#/definitions/TimingCaps' $ref: '#/definitions/TimingCaps'
\ No newline at end of file 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: ...@@ -10,4 +10,27 @@ responses:
type: object type: object
properties: properties:
CurrentTime: CurrentTime:
$ref: '#/definitions/CurrentTime' $ref: '#/definitions/CurrentTime'
\ No newline at end of file 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: ...@@ -12,4 +12,27 @@ responses:
type: object type: object
properties: properties:
TransportInfo: TransportInfo:
$ref: '#/definitions/TransportInfo' $ref: '#/definitions/TransportInfo'
\ No newline at end of file 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
Supports Markdown
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