syntax = "proto3";

package cosmos.reflection.v1;

import "google/protobuf/descriptor.proto";
import "cosmos/query/v1/query.proto";

// Package cosmos.reflection.v1 provides support for inspecting protobuf
// file descriptors.
service ReflectionService {
  // FileDescriptors queries all the file descriptors in the app in order
  // to enable easier generation of dynamic clients.
  rpc FileDescriptors(FileDescriptorsRequest) returns (FileDescriptorsResponse) {
    // NOTE: file descriptors SHOULD NOT be part of consensus because they
    // include changes to doc commands and module_query_safe should be kept as false.
    option (cosmos.query.v1.module_query_safe) = false;
  }
}

// FileDescriptorsRequest is the Query/FileDescriptors request type.
message FileDescriptorsRequest {}

// FileDescriptorsResponse is the Query/FileDescriptors response type.
message FileDescriptorsResponse {
  // files is the file descriptors.
  repeated google.protobuf.FileDescriptorProto files = 1;
}