How decode with this library the struct ExtensionProps ?
I succeeded to read: swagger.ExtensionProps.Extensions["x-XXXXXXX"] but the output is a json.RawMessage type = []byte.
Should I use the JSON libraries to decode or we can use a functionality of the library ?
My code:
package main
import (
"fmt"
"log"
"github.com/getkin/kin-openapi/openapi3"
)
func main() {
loader := openapi3.NewSwaggerLoader()
[...]
swagger, err := loader.LoadSwaggerFromData(data)
if err != nil {
log.Fatal("error", err)
}
fmt.Println(string(swagger.Extensions["x-XXXXXXX"].(json.RawMessage)))
}
Is it possible to create an example for decoding this structure ?
Thank you !
How decode with this library the struct
ExtensionProps?I succeeded to read:
swagger.ExtensionProps.Extensions["x-XXXXXXX"]but the output is ajson.RawMessagetype =[]byte.Should I use the JSON libraries to decode or we can use a functionality of the library ?
My code:
Is it possible to create an example for decoding this structure ?
Thank you !