-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support recursive arrays / arrays of references (plus a bunch of other changes) #55
Conversation
…arshal additionalProperties
So I had another branch I've been working on that I think has reached the point of a 0.1 release. It seems to handle anything I can throw at it with the exception of oneOf, allOf, anyOf. It also generates code to marshal/unmarshal additionalProperties in the presence of regular properties. |
…r stand alone or in the presence of regular properties - test cases for marshal/unmarshal - validation of required properties
jsonschemaparse_test.go
Outdated
@@ -85,6 +86,7 @@ func TestThatPropertiesCanBeParsed(t *testing.T) { | |||
} | |||
} | |||
|
|||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is going, lets just delete it instead of commenting it out.
output_test.go
Outdated
} | ||
} | ||
|
||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer deletion to commenting out.
refresolver.go
Outdated
|
||
|
||
func (r *RefResolver) mapPaths(schema *Schema) error { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove line?
input.go
Outdated
) | ||
|
||
func ReadInputFiles(inputFiles []string) ([]*Schema, error) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove spare line.
@@ -0,0 +1,311 @@ | |||
package generate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a shame this isn't picked up as a move. A few people have worked on it, as a delete and create, then it might not pick up their names as authors. I'm not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ git log --follow jsonschema.go
... returns the full history, not sure why it doesn't get transferred from the rename...
The blame log remains the same though. Could start an AUTHORS or ChangeLog file?
Thanks so much for your efforts, it's looking pretty good to me so far. It definitely fixes a few things. Would be interested to hear from other people using the tool too. Some of the output looks a little unformatted. Maybe we need to rethink how sensible it is to use the |
Fixed those formatting bugs, also removed Description from consideration in getSchemaName(). |
is this PR ready to merge? |
Sorry for the terribly long delay, thanks for the changes. |
…t would be generated with the same name get overwritten by one another). Add a fix and a unit test, and remove the last bits of a-h#28 that no longer apply.
This patch enables recursive references and nested arrays of references...
I also added a few more test schemas of things I'd like to implement if I get some more time.