-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix bug circular dependent message (#9)
- Loading branch information
Showing
5 changed files
with
85 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
syntax = "proto3"; | ||
|
||
package tests; | ||
|
||
import "jsonschema.proto"; | ||
|
||
option (pubg.jsonschema.file) = {entrypoint_message: "Values"}; | ||
|
||
message Values { | ||
SelfReference entry = 1; | ||
} | ||
|
||
//message CircularDependentTwoDepth { | ||
// CircularDependentTwoDepth0 child = 1; | ||
//} | ||
// | ||
//message CircularDependentTwoDepth0 { | ||
// CircularDependentTwoDepth parent = 1; | ||
//} | ||
|
||
message SelfReference { | ||
SelfReference self = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$ref": "#/$defs/.tests.Values", | ||
"$defs": { | ||
".tests.Values": { | ||
"properties": { | ||
"entry": { | ||
"$ref": "#/$defs/.tests.Values.entry" | ||
} | ||
}, | ||
"type": "object", | ||
"required": [ | ||
"entry" | ||
] | ||
}, | ||
".tests.Values.entry": { | ||
"$ref": "#/$defs/.tests.SelfReference" | ||
}, | ||
".tests.SelfReference": { | ||
"properties": { | ||
"self": { | ||
"$ref": "#/$defs/.tests.SelfReference.self" | ||
} | ||
}, | ||
"type": "object", | ||
"required": [ | ||
"self" | ||
], | ||
"description": "message CircularDependentTwoDepth {\n CircularDependentTwoDepth0 child = 1;\n}\n\nmessage CircularDependentTwoDepth0 {\n CircularDependentTwoDepth parent = 1;\n}" | ||
}, | ||
".tests.SelfReference.self": { | ||
"$ref": "#/$defs/.tests.SelfReference" | ||
} | ||
}, | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: "proto-circular-dependent" | ||
description: "Test for circular dependent message in proto file" | ||
|
||
inputFiles: ["test.proto"] | ||
inputParameters: {} | ||
|
||
expectResultFiles: ["test.schema.json"] | ||
expectResultIsNull: false | ||
expectFail: false | ||
|
||
expectedBehaviorDescription: "" |