mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-07 20:47:45 +00:00
Updated example code and readme to help explain encoding issues #34
Signed-off-by: Dave Shanley <dave@quobix.com>
This commit is contained in:
@@ -546,8 +546,9 @@ func ExampleNewDocument_unpacking_extensions() {
|
||||
|
||||
// define an example struct representing a cake
|
||||
type cake struct {
|
||||
Candles int
|
||||
Frosting string
|
||||
Candles int `yaml:"candles"`
|
||||
Frosting string `yaml:"frosting"`
|
||||
Some_Strange_Var_Name string `yaml:"someStrangeVarName"`
|
||||
}
|
||||
|
||||
// define a struct that holds a map of cake pointers.
|
||||
@@ -580,6 +581,7 @@ components:
|
||||
someCake:
|
||||
candles: 10
|
||||
frosting: blue
|
||||
someStrangeVarName: something
|
||||
anotherCake:
|
||||
candles: 1
|
||||
frosting: green
|
||||
|
||||
Reference in New Issue
Block a user