From 96407807fa1d29b2896054828edcafb3c5d9a4e3 Mon Sep 17 00:00:00 2001 From: "M. Hamza" Date: Thu, 29 Dec 2022 12:23:34 +0500 Subject: [PATCH] add example request bodies in vis-api.yaml --- config/api/vis-api.yaml | 83 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/config/api/vis-api.yaml b/config/api/vis-api.yaml index 6bc0775..e5b565e 100644 --- a/config/api/vis-api.yaml +++ b/config/api/vis-api.yaml @@ -167,6 +167,11 @@ paths: application/json: schema: $ref: '#/components/schemas/V2xMsgPublication' + example: + msgContent: 'Hello World' + msgEncodeFormat: 'base64' + msgType: '1' + stdOrganization: 'ETSI' responses: '204': $ref: '#/components/responses/204' @@ -204,6 +209,16 @@ paths: application/json: schema: $ref: '#/components/schemas/SubscriptionLinkList' + example: + _links: + self: + href: 'http://meAppServer.example.com/vis/v2/subscriptions' + subscription: + - _links: + self: + href: 'http://meAppServer.example.com/vis/v2/subscriptions/123' + callbackReference: 'http://my.callback.com/vis-v2x-msg/some-id' + subscriptionType: V2xMsgSubscription '400': $ref: '#/components/responses/400' '401': @@ -232,6 +247,17 @@ paths: - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - $ref: '#/components/schemas/ProvChgPc5Subscription' - $ref: '#/components/schemas/V2xMsgSubscription' + example: + subscriptionType: V2xMsgSubscription + callbackReference: 'http://my.callback.com/vis-v2x-msg/some-id' + filterCriteria: + stdOrganization: 'ETSI' + msgType: + - 1 + - 2 + expiryDeadline: + seconds: 1977836800 + nanoseconds: 0 responses: '201': description: 'In the returned NotificationSubscription structure, the created subscription is described using the appropriate data type.' @@ -243,6 +269,20 @@ paths: - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - $ref: '#/components/schemas/ProvChgPc5Subscription' - $ref: '#/components/schemas/V2xMsgSubscription' + example: + subscriptionType: V2xMsgSubscription + callbackReference: 'http://my.callback.com/vis-v2x-msg/some-id' + _links: + self: + href: 'http://meAppServer.example.com/vis/v2/subscriptions/123' + filterCriteria: + stdOrganization: 'ETSI' + msgType: + - 1 + - 2 + expiryDeadline: + seconds: 1977836800 + nanoseconds: 0 '400': $ref: '#/components/responses/400' '401': @@ -309,6 +349,20 @@ paths: - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - $ref: '#/components/schemas/ProvChgPc5Subscription' - $ref: '#/components/schemas/V2xMsgSubscription' + example: + subscriptionType: V2xMsgSubscription + callbackReference: 'http://my.callback.com/vis-v2x-msg/some-id' + _links: + self: + href: 'http://meAppServer.example.com/vis/v2/subscriptions/123' + filterCriteria: + stdOrganization: 'ETSI' + msgType: + - 1 + - 2 + expiryDeadline: + seconds: 1977836800 + nanoseconds: 0 '400': $ref: '#/components/responses/400' '401': @@ -338,6 +392,20 @@ paths: - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - $ref: '#/components/schemas/ProvChgPc5Subscription' - $ref: '#/components/schemas/V2xMsgSubscription' + example: + subscriptionType: V2xMsgSubscription + callbackReference: 'http://my.callback.com/vis-v2x-msg/some-id' + _links: + self: + href: 'http://meAppServer.example.com/vis/v2/subscriptions/123' + filterCriteria: + stdOrganization: 'ETSI' + msgType: + - 1 + - 2 + expiryDeadline: + seconds: 1977836800 + nanoseconds: 0 responses: '200': description: 'A response body containing data type describing the updated subscription is returned' @@ -349,6 +417,21 @@ paths: - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - $ref: '#/components/schemas/ProvChgPc5Subscription' - $ref: '#/components/schemas/V2xMsgSubscription' + example: + example: + subscriptionType: V2xMsgSubscription + callbackReference: 'http://my.callback.com/vis-v2x-msg/some-id' + _links: + self: + href: 'http://meAppServer.example.com/vis/v2/subscriptions/123' + filterCriteria: + stdOrganization: 'ETSI' + msgType: + - 1 + - 2 + expiryDeadline: + seconds: 1977836800 + nanoseconds: 0 '400': $ref: '#/components/responses/400' '401': -- GitLab