From 3bd649122457842ef01126165c7a17bf6bf29dcb Mon Sep 17 00:00:00 2001 From: andres-movl <106447993+andres-movl@users.noreply.github.com> Date: Fri, 28 Jun 2024 18:19:52 -0400 Subject: [PATCH 1/3] Add jsonContext getters Allow exposing head and tail --- jsonContext.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jsonContext.go b/jsonContext.go index 0e979707..2e202695 100644 --- a/jsonContext.go +++ b/jsonContext.go @@ -37,6 +37,16 @@ func NewJsonContext(head string, tail *JsonContext) *JsonContext { return &JsonContext{head, tail} } +// Head returns the context's head. +func (c *JsonContext) Head() string { + return c.head +} + +// Tail returns the context's tail. +func (c *JsonContext) Tail() *JsonContext { + return c.tail +} + // String displays the context in reverse. // This plays well with the data structure's persistent nature with // Cons and a json document's tree structure. From 6d2514e7ddaf97fe5ed8edbd2949f28a6cb14bdb Mon Sep 17 00:00:00 2001 From: andres-movl <106447993+andres-movl@users.noreply.github.com> Date: Fri, 28 Jun 2024 18:31:12 -0400 Subject: [PATCH 2/3] Update go.mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index b709d7fc..0ebf202d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/xeipuuv/gojsonschema +module github.com/andres-movl/gojsonschema require ( github.com/stretchr/testify v1.3.0 From 09d53cb48350a485c460941a87a984296d4ab07d Mon Sep 17 00:00:00 2001 From: andres-movl <106447993+andres-movl@users.noreply.github.com> Date: Fri, 28 Jun 2024 18:32:46 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index aa333836..4180c459 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ -[![GoDoc](https://godoc.org/github.com/xeipuuv/gojsonschema?status.svg)](https://godoc.org/github.com/xeipuuv/gojsonschema) -[![Build Status](https://travis-ci.org/xeipuuv/gojsonschema.svg)](https://travis-ci.org/xeipuuv/gojsonschema) -[![Go Report Card](https://goreportcard.com/badge/github.com/xeipuuv/gojsonschema)](https://goreportcard.com/report/github.com/xeipuuv/gojsonschema) +[![GoDoc](https://godoc.org/github.com/andres-movl/gojsonschema?status.svg)](https://godoc.org/github.com/andres-movl/gojsonschema) +[![Build Status](https://travis-ci.org/andres-movl/gojsonschema.svg)](https://travis-ci.org/andres-movl/gojsonschema) +[![Go Report Card](https://goreportcard.com/badge/github.com/andres-movl/gojsonschema)](https://goreportcard.com/report/github.com/andres-movl/gojsonschema) # gojsonschema ## Description +Forked from xeipuuv/gojsonschema since no issue has been tended to for 4 years now. + An implementation of JSON Schema for the Go programming language. Supports draft-04, draft-06 and draft-07. References : @@ -17,12 +19,12 @@ References : ## Installation ``` -go get github.com/xeipuuv/gojsonschema +go get github.com/andres-movl/gojsonschema ``` Dependencies : -* [github.com/xeipuuv/gojsonpointer](https://github.com/xeipuuv/gojsonpointer) -* [github.com/xeipuuv/gojsonreference](https://github.com/xeipuuv/gojsonreference) +* [github.com/andres-movl/gojsonpointer](https://github.com/xeipuuv/gojsonpointer) +* [github.com/andres-movl/gojsonreference](https://github.com/xeipuuv/gojsonreference) * [github.com/stretchr/testify/assert](https://github.com/stretchr/testify#assert-package) ## Usage @@ -35,7 +37,7 @@ package main import ( "fmt" - "github.com/xeipuuv/gojsonschema" + "github.com/andres-movl/gojsonschema" ) func main() {