Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONReference ¶
func New ¶
func New(reference string) (JSONReference, error)
Example (Fragment) ¶
package main
import (
"fmt"
ref "github.com/oas3/json-reference"
)
func main() {
r, _ := ref.New("#/ok")
fmt.Println(r.URL.String())
fmt.Println(r.Pointer.String())
}
Output: #/ok /ok
Example (Full) ¶
package main
import (
"fmt"
ref "github.com/oas3/json-reference"
)
func main() {
r, _ := ref.New("http://example.com/example.json#/foo/bar")
fmt.Println(r.URL.String())
fmt.Println(r.Pointer.String())
}
Output: http://example.com/example.json#/foo/bar /foo/bar
Click to show internal directories.
Click to hide internal directories.