From 458d0f6ecc0967b75130dc3bc9995e2c7a371512 Mon Sep 17 00:00:00 2001 From: Ekrem Seren Date: Wed, 13 Dec 2023 00:46:23 +0300 Subject: [PATCH] move diagrams to service definitions --- proto/cmp/services/activity/v1alpha1/search.proto | 5 +++-- .../partner/v1alpha1/partner_configuration.proto | 9 +++++---- proto/cmp/services/ping/v1alpha1/ping.proto | 10 +++++----- proto/cmp/services/transport/v1alpha1/search.proto | 13 ++++++++----- .../services/transport/v1alpha1/trip_types.proto | 2 +- 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/proto/cmp/services/activity/v1alpha1/search.proto b/proto/cmp/services/activity/v1alpha1/search.proto index 32302a03..f88551bb 100644 --- a/proto/cmp/services/activity/v1alpha1/search.proto +++ b/proto/cmp/services/activity/v1alpha1/search.proto @@ -20,8 +20,6 @@ import "cmp/types/v1alpha1/traveller.proto"; // ### Activity Search Request // // Search request for Activities -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search.proto.dot.svg) message ActivitySearchRequest { // Message Header. Contains api version, message info string and end-user wallet address cmp.types.v1alpha1.Header header = 1; @@ -98,6 +96,9 @@ message ActivitySearchResponse { // ### Activity Search Service // // Takes `ActivitySearchRequest` message type and returns `ActivitySearchResponse` message type. +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/activity/v1alpha1/search.proto.dot.svg) service ActivitySearchService { rpc ActivitySearch(ActivitySearchRequest) returns (ActivitySearchResponse); } diff --git a/proto/cmp/services/partner/v1alpha1/partner_configuration.proto b/proto/cmp/services/partner/v1alpha1/partner_configuration.proto index ff5ad9c1..0a8f044b 100644 --- a/proto/cmp/services/partner/v1alpha1/partner_configuration.proto +++ b/proto/cmp/services/partner/v1alpha1/partner_configuration.proto @@ -7,9 +7,6 @@ import "cmp/types/v1alpha1/partner.proto"; // ### Partner Configuration message type // // This message type represents the partner configuration on T-Chain (not implemented yet) -// -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/partner/v1alpha1/partner_configuration.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/partner/v1alpha1/partner_configuration.proto.dot.svg) message PartnerConfiguration { // List of partners from the on-chain Partner Configuration repeated cmp.types.v1alpha1.Partner partners = 1; @@ -33,8 +30,12 @@ message GetPartnerConfigurationResponse { int32 current_block_height = 2; } +// ### Get Partner Configuration Service +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/partner/v1alpha1/partner_configuration.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/partner/v1alpha1/partner_configuration.proto.dot.svg) service GetPartnerConfigurationService { - // Get Partner Configuration Service + // #### GetPartnerConfiguration // // Takes `GetPartnerConfigurationRequest` which contains optional block height // and partner wallet addresses and returns `GetPartnerConfigurationResponse` diff --git a/proto/cmp/services/ping/v1alpha1/ping.proto b/proto/cmp/services/ping/v1alpha1/ping.proto index cb4bcd41..d83bb36f 100644 --- a/proto/cmp/services/ping/v1alpha1/ping.proto +++ b/proto/cmp/services/ping/v1alpha1/ping.proto @@ -9,32 +9,32 @@ import "google/protobuf/timestamp.proto"; // The ping message is designed to test the availability of a provider service // and to test the network latency as in the gRPC metadata information the // DateTime is stored of each hop. -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/ping/v1alpha1/ping.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/ping/v1alpha1/ping.proto.dot.svg) message PingRequest { // Message Header - // Contains api version, message info string and end user wallet address cmp.types.v1alpha1.Header header = 1; // Ping message string ping_message = 2; + // DateTime of the ping request google.protobuf.Timestamp timestamp = 3; } message PingResponse { // Message Header - // Contains api version, message info string, sender & receiver wallet - // addresses cmp.types.v1alpha1.Header header = 1; // Ping message string ping_message = 2; + // DateTime of the ping response google.protobuf.Timestamp timestamp = 3; } // The Ping Service definition +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/ping/v1alpha1/ping.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/ping/v1alpha1/ping.proto.dot.svg) service PingService { // Ping Method rpc Ping(PingRequest) returns (PingResponse); diff --git a/proto/cmp/services/transport/v1alpha1/search.proto b/proto/cmp/services/transport/v1alpha1/search.proto index 3ae51001..bb7e1c60 100644 --- a/proto/cmp/services/transport/v1alpha1/search.proto +++ b/proto/cmp/services/transport/v1alpha1/search.proto @@ -1,10 +1,12 @@ syntax = "proto3"; -// ## This is the package level description for Transport Service +// ## Transport Service // // The Transport Service is used for flights, trains, and buses. // -// Any search message response in the Camino Messenger Protocol only includes dynamic data. Static data can be cached and kept up to data with the Product List and Product Details messages. +// Any search message response in the Camino Messenger Protocol only includes dynamic +// data. Static data can be cached and kept up to data with the Product List and +// Product Details messages. // // This package is a WIP. package cmp.services.transport.v1alpha1; @@ -17,8 +19,6 @@ import "cmp/types/v1alpha1/search.proto"; import "cmp/types/v1alpha1/traveller.proto"; // ### Transport Search Request -// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search.proto.dot.xs.svg) -// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search.proto.dot.svg) message TransportSearchRequest { // Message Header. Contains api version, message info string and end-user wallet address cmp.types.v1alpha1.Header header = 1; @@ -71,9 +71,12 @@ message TransportSearchResponse { repeated TransportSearchResult results = 4; } -// ## Transport Search Service +// ### Transport Search Service // // Takes `TransportSearchRequest` message type and returns `TransportSearchResponse` message type. +// +// ![Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search.proto.dot.xs.svg) +// [Open Message Diagram](https://storage.googleapis.com/docs-cmp-files/diagrams/proto/cmp/services/transport/v1alpha1/search.proto.dot.svg) service TransportSearchService { rpc TransportSearch(TransportSearchRequest) returns (TransportSearchResponse); } diff --git a/proto/cmp/services/transport/v1alpha1/trip_types.proto b/proto/cmp/services/transport/v1alpha1/trip_types.proto index 4c5d5efa..e9cb1474 100644 --- a/proto/cmp/services/transport/v1alpha1/trip_types.proto +++ b/proto/cmp/services/transport/v1alpha1/trip_types.proto @@ -44,7 +44,7 @@ message TripSegment { // Ex: "BC" string retailer_code = 3; - // Sub Provider Code, replacing Operating carrier or identifying sub contracted services + // Sub Provider Code, replacing Operating carrier or identifying sub contracted services // provided by other suppliers // Ex: "BC" string sub_provider_code = 4;