Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete StoreRawSchema from GeneratorConfig since it's not being used #705

Merged
merged 3 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion gogen/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ type GeneratedCode struct {
// - structname - the name of the struct that was generated for the schema element.
JSONSchemaCode string
// RawJSONSchema stores the JSON document which is serialised and stored in JSONSchemaCode.
// It is populated only if the StoreRawSchema CodeGenerator boolean is set to true.
RawJSONSchema []byte
// EnumTypeMap is a Go map that allows YANG schemapaths to be mapped to reflect.Type values.
EnumTypeMap string
Expand Down
2 changes: 0 additions & 2 deletions gogen/codegen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ func TestSimpleStructs(t *testing.T) {
EnumerationsUseUnderscores: true,
},
Caller: "testcase",
StoreRawSchema: true,
GenerateJSONSchema: true,
},
inGoOptions: GoOpts{
Expand Down Expand Up @@ -873,7 +872,6 @@ func TestSimpleStructs(t *testing.T) {
// the unit tests are called by external test entities.
tt.inConfig.Caller = "codegen-tests"
}
tt.inConfig.StoreRawSchema = true
tt.inConfig.ParseOptions.ExcludeModules = tt.inExcludeModules

cg := NewCodeGenerator(&tt.inConfig, &tt.inGoOptions)
Expand Down
4 changes: 0 additions & 4 deletions ygen/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ type GeneratorConfig struct {
// the JSON corresponding to the YANG schema parsed to generate the
// output code.
GenerateJSONSchema bool
// StoreRawSchema the raw JSON schema should be returned by the code
// generation function, such that it can be handled by an external
// library.
StoreRawSchema bool
// ParseOptions contains parsing options for a given set of schema files.
ParseOptions ParseOpts
// TransformationOptions contains options for how the generated code
Expand Down