ritz078 / transform

A polyglot web converter.
https://transform.tools
MIT License
8.03k stars 593 forks source link

json to protobuf message title `undefined` #257

Open wulei opened 3 years ago

wulei commented 3 years ago

json Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Example Schema",
  "type": "object",
  "properties": {
    "firstName": {
      "type": "string"
    },
    "lastName": {
      "type": "string"
    },
    "age": {
      "description": "Age in years",
      "type": "integer",
      "minimum": 0
    },
    "height": {
      "type": ["number", "null"]
    },
    "favoriteFoods": {
      "type": "array",
      "minItems": 0,
      "maxItems": 2,
      "items": {
        "type": "string"
      }
    },
    "likesDogs": {
      "type": "boolean"
    }
  },
  "required": ["firstName", "lastName"]
}

transform protobuf

syntax = "proto2";

message undefined {
  required string firstName = 1;
  required string lastName = 2;
  optional int32 age = 3;
  optional number,null height = 4;
  repeated string favoriteFoods = 5;
  optional bool likesDogs = 6;
}
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.