packages feed

wireform-proto-0.1.0.0: test-conformance/protos/conformance.proto

// Vendored from https://github.com/protocolbuffers/protobuf/blob/main/conformance/conformance.proto
//
// This is the wire protocol the upstream conformance_test_runner
// uses to drive any test program. Each test sends one
// ConformanceRequest over stdin and expects one ConformanceResponse
// back over stdout. See the upstream README for the runner's
// command-line interface and the test categories it covers.
//
// We pull this in with loadProto in
// `Test.Conformance.RunnerInstances` so the runner binary's
// codecs come from the same machinery the rest of wireform-proto
// uses (and consequently a regression in the deriver shows up
// immediately as a conformance-suite mismatch).

syntax = "proto3";

package conformance;

enum WireFormat {
  UNSPECIFIED = 0;
  PROTOBUF = 1;
  JSON = 2;
  JSPB = 3;
  TEXT_FORMAT = 4;
}

enum TestCategory {
  UNSPECIFIED_TEST = 0;
  BINARY_TEST = 1;
  JSON_TEST = 2;
  JSON_IGNORE_UNKNOWN_PARSING_TEST = 3;
  JSPB_TEST = 4;
  TEXT_FORMAT_TEST = 5;
}

message TestStatus {
  string name = 1;
  string failure_message = 2;
  string matched_name = 3;
}

message FailureSet {
  repeated TestStatus test = 2;
}

message ConformanceRequest {
  // The upstream schema models payload as a oneof; we honour
  // that. The bridge's auto-detected oneof codec generates a
  // sum-of-tagged-singletons carrier (ConformanceRequest'Payload)
  // plus the wire round-trip in 'Proto.Derive.Internal'.
  oneof payload {
    bytes  protobuf_payload = 1;
    string json_payload     = 2;
    string jspb_payload     = 7;
    string text_payload     = 8;
  }

  WireFormat requested_output_format = 3;
  string message_type = 4;
  TestCategory test_category = 5;

  JspbEncodingConfig jspb_encoding_options = 6;
  bool print_unknown_fields = 9;
}

message ConformanceResponse {
  // The upstream schema is also a oneof. Routing our response
  // through the oneof carrier means the wire-format presence of
  // the chosen arm is preserved end-to-end, which the conformance
  // runner relies on (an empty 'protobuf_payload' must be
  // distinguishable from an absent one).
  oneof result {
    string parse_error      = 1;
    string serialize_error  = 6;
    string timeout_error    = 9;
    string runtime_error    = 2;
    bytes  protobuf_payload = 3;
    string json_payload     = 4;
    string skipped          = 5;
    string jspb_payload     = 7;
    string text_payload     = 8;
  }
}

message JspbEncodingConfig {
  bool use_jspb_array_any_format = 1;
}