forked from omissis/go-jsonschema
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This feature allows users to configure which struct tags to generate. By default it generates json, yaml, mapstructure. Fix omissis#79 Signed-off-by: Alex Boten <aboten@lightstep.com>
- Loading branch information
Alex Boten
committed
May 25, 2023
1 parent
1720613
commit d0b3c13
Showing
5 changed files
with
54 additions
and
3 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,14 @@ | ||
// Code generated by github.com/atombender/go-jsonschema, DO NOT EDIT. | ||
|
||
package test | ||
|
||
type Tags struct { | ||
// Html corresponds to the JSON schema field "html". | ||
Html *string `yaml:"html,omitempty"` | ||
|
||
// Id corresponds to the JSON schema field "id". | ||
Id *string `yaml:"id,omitempty"` | ||
|
||
// Url corresponds to the JSON schema field "url". | ||
Url *string `yaml:"url,omitempty"` | ||
} |
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,16 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"id": "https://example.com/case", | ||
"type": "object", | ||
"properties": { | ||
"url": { | ||
"type": "string" | ||
}, | ||
"id": { | ||
"type": "string" | ||
}, | ||
"html": { | ||
"type": "string" | ||
} | ||
} | ||
} |
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