From 241380e2051df197b6023f803264121a611eb773 Mon Sep 17 00:00:00 2001 From: featherstone Date: Fri, 11 Jan 2019 15:24:07 +0000 Subject: [PATCH] Bug 83 OpenAPI examples and documentation mismatch Signed-off-by: featherstone --- Mp1.json | 12 +-- Mp1.yaml | 108 ++++++++++++------------- paths/ApplicationsDnsRules.GET.yaml | 14 ++-- paths/ApplicationsTrafficRule.GET.yaml | 28 +++---- paths/Services.GET.yaml | 58 ++++++------- 5 files changed, 110 insertions(+), 110 deletions(-) diff --git a/Mp1.json b/Mp1.json index a69d600..338aa12 100644 --- a/Mp1.json +++ b/Mp1.json @@ -175,7 +175,7 @@ } }, "examples": { - "application/json": { + "application/json": [{ "DnsRule": { "dnsRuleId": "DnsRule1", "domainName": "www.example.com", @@ -184,7 +184,7 @@ "ttl": 300, "state": "ACTIVE" } - } + }] } }, "400": { @@ -652,7 +652,7 @@ } }, "examples": { - "application/json": { + "application/json": [{ "TrafficRule": { "trafficRuleId": "TrafficRule123", "serName": "ExampleService", @@ -677,7 +677,7 @@ }, "state": "ACTIVE" } - } + }] } }, "400": { @@ -946,7 +946,7 @@ } }, "examples": { - "application/json": { + "application/json": [{ "ServiceInfo": { "serInstanceId": "ServiceInstance123", "serName": "ExampleService", @@ -986,7 +986,7 @@ }, "serializer": "JSON" } - } + }] } }, "400": { diff --git a/Mp1.yaml b/Mp1.yaml index 2b51c89..a2dc71a 100644 --- a/Mp1.yaml +++ b/Mp1.yaml @@ -139,13 +139,13 @@ paths: $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 + - DnsRule: + dnsRuleId: DnsRule1 + domainName: www.example.com + ipAddressType: IP_V4 + ipAddress: 146.241.7.3 + ttl: 300 + state: ACTIVE '400': description: Bad Request schema: @@ -439,24 +439,24 @@ paths: $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 + - 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: @@ -627,35 +627,35 @@ paths: $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: - oAuth2Info: - grantTypes: OAUTH2_CLIENT_CREDENTIALS - tokenEndpoint: /meMp1/security/TokenEndPoint - serializer: 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: + oAuth2Info: + grantTypes: OAUTH2_CLIENT_CREDENTIALS + tokenEndpoint: /meMp1/security/TokenEndPoint + serializer: JSON '400': description: Bad Request schema: diff --git a/paths/ApplicationsDnsRules.GET.yaml b/paths/ApplicationsDnsRules.GET.yaml index 1d24a0c..88b4af3 100644 --- a/paths/ApplicationsDnsRules.GET.yaml +++ b/paths/ApplicationsDnsRules.GET.yaml @@ -15,13 +15,13 @@ responses: $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 + - DnsRule: + dnsRuleId: DnsRule1 + domainName: www.example.com + ipAddressType: IP_V4 + ipAddress: 146.241.7.3 + ttl: 300 + state: ACTIVE 400: description: Bad Request schema: diff --git a/paths/ApplicationsTrafficRule.GET.yaml b/paths/ApplicationsTrafficRule.GET.yaml index cddc21d..66e6e9c 100644 --- a/paths/ApplicationsTrafficRule.GET.yaml +++ b/paths/ApplicationsTrafficRule.GET.yaml @@ -13,20 +13,20 @@ responses: $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 + - 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: diff --git a/paths/Services.GET.yaml b/paths/Services.GET.yaml index 0ee0a97..c69f908 100644 --- a/paths/Services.GET.yaml +++ b/paths/Services.GET.yaml @@ -19,35 +19,35 @@ responses: $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: - oAuth2Info: - grantTypes: OAUTH2_CLIENT_CREDENTIALS - tokenEndpoint: /meMp1/security/TokenEndPoint - serializer: 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: + oAuth2Info: + grantTypes: OAUTH2_CLIENT_CREDENTIALS + tokenEndpoint: /meMp1/security/TokenEndPoint + serializer: JSON 400: description: Bad Request schema: -- GitLab