Skip to content

Releases: pubg/protoc-gen-jsonschema

v0.6.2

08 Nov 11:08
00cc2ce
Compare
Choose a tag to compare

Changelog

  • 00cc2ce fix: Fix bug circular dependent message (#9)
  • 8e90b70 fix: Change testcase name for clarity

v0.6.1

08 Nov 10:37
Compare
Choose a tag to compare

Changelog

  • 833077e fix: Adjust minimum and maximum values in the test case for clarity
  • b14038a fix: properly assign inclusive minimum/maximum (#4)

v0.6.0

08 Nov 05:57
be0b8dc
Compare
Choose a tag to compare

Breaking Change

The preserve_proto_field_names plugin option has been added. It can be used with the command line option --jsonschema_opt=preserve_proto_field_names.

By default, all property names in the JSON schema are now converted to snake_case. If you want to use the previous behavior, enable --jsonschema_opt=preserve_proto_field_names=true.

Changelog

  • be0b8dc fix: Fix pluginOptions passed as nil and add testcases and update docs (#7)
  • 54ee33e feat: use canonical lowerCamelCase format for field names (#6)

v0.6.0-jsonname+1

08 Nov 02:37
Compare
Choose a tag to compare
v0.6.0-jsonname+1 Pre-release
Pre-release

This is beta version of protoc-gen-jsonschema.

Now this can respoects protobuf`s json_name field.

The api or option of plugin would be change!

Source protobuf:

message Message {
  float foo_bar_baz = 1 [
    json_name = "fooBarBaz",
    (pubg.jsonschema.field) = {numeric : {exclusive_minimum : 0}}
  ];
}

Destination json schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "#/$defs/.Message",
  "$defs": {
    ".Message": {
      "properties": {
        "fooBarBaz": {
          "$ref": "#/$defs/.Message.foo_bar_baz"
        }
      },
      "type": "object",
      "required": [
        "fooBarBaz"
      ]
    },
    ".Message.foo_bar_baz": {
      "type": "number",
      "exclusiveMinimum": 0
    }
  },
  "type": "object"
}

Changelog

  • e08295e feat: Respect json_name option

v0.5.0

24 Sep 06:38
3cf3558
Compare
Choose a tag to compare

Changelog

v0.4.1

19 Sep 03:42
Compare
Choose a tag to compare

Changelog

v0.4.0

18 Sep 10:14
Compare
Choose a tag to compare

Changelog

  • 1cf500e feat: Add k8s well-known messages

v0.3.2

18 Sep 08:34
Compare
Choose a tag to compare

Changelog

v0.3.1

18 Sep 08:31
Compare
Choose a tag to compare

Changelog

  • 1695fd3 fix: repeated treat as optional

v0.3.0

18 Sep 08:19
Compare
Choose a tag to compare

Changelog

  • c096734 feat: Add mandatory_nullable and int64 as string option