-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
tentative development for #38 #39
Merged
Merged
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b9c9d01
tentative json schema java representation.
8cbae7b
serializers return schema pojos (untested)
b113cd6
replaced getClass with getRawClass
5b0fd4d
Generates schema in TestGenerateJsonSchema without throwing errors
65e5dda
working, but passed type information isn't precise enough for collection
7fd884e
jsonFormatVisitor/acceptor now passes/accepts typeHint of JavaType, but
c4db6f2
Revert "jsonFormatVisitor/acceptor now passes/accepts typeHint of Jav…
cee882b
working with JavaType
8fababd
working schema serialization, except for JsonSerializableSchema is
ed98c9e
jsonschema serialization and deep equals implemented.
91c4467
continuous loop property filter checking into separate loops.
3bbe215
removed Schema knowledge from objectMapper
7e50672
Added javatype reference to all factories, organized imports
8e8c6e3
adds new visitor wrapper, which constructs typed visitors
c11852f
factored getSchema into SchemaFactory
6288e8b
schema here does NOT refer to JSON Schema
248ab7e
removed unused constructor in arrayschemafactory
8f665dd
refactored packages for separation
f46d555
Needed to change packages in pom to run maven install
1013b37
Merge remote-tracking branch 'jackson/master'
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/com/fasterxml/jackson/databind/jsonschema/JsonFormatVisitorAware.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.fasterxml.jackson.databind.jsonschema; | ||
|
||
|
||
import com.fasterxml.jackson.databind.JavaType; | ||
import com.fasterxml.jackson.databind.jsonschema.visitors.JsonFormatVisitor; | ||
|
||
/** | ||
* Marker interface for schema-aware serializers. | ||
*/ | ||
public interface JsonFormatVisitorAware | ||
{ | ||
/** | ||
* Get the representation of the schema to which this serializer will conform. | ||
* @param typeHint TODO | ||
* | ||
* @return <a href="http://json-schema.org/">Json-schema</a> for this serializer. | ||
*/ | ||
public void acceptJsonFormatVisitor(JsonFormatVisitor visitor, JavaType typeHint); | ||
} |
86 changes: 0 additions & 86 deletions
86
src/main/java/com/fasterxml/jackson/databind/jsonschema/JsonSchema.java
This file was deleted.
Oops, something went wrong.
62 changes: 0 additions & 62 deletions
62
src/main/java/com/fasterxml/jackson/databind/jsonschema/JsonSerializableSchema.java
This file was deleted.
Oops, something went wrong.
34 changes: 0 additions & 34 deletions
34
src/main/java/com/fasterxml/jackson/databind/jsonschema/SchemaAware.java
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
src/main/java/com/fasterxml/jackson/databind/jsonschema/factories/AnySchemaFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.fasterxml.jackson.databind.jsonschema.factories; | ||
|
||
import com.fasterxml.jackson.databind.jsonschema.types.AnySchema; | ||
import com.fasterxml.jackson.databind.jsonschema.types.JsonSchema; | ||
import com.fasterxml.jackson.databind.jsonschema.visitors.JsonAnyFormatVisitor; | ||
|
||
public class AnySchemaFactory extends SchemaFactory implements | ||
JsonAnyFormatVisitor, SchemaFactoryDelegate { | ||
|
||
protected SchemaFactory parent; | ||
protected AnySchema anySchema; | ||
|
||
public AnySchemaFactory(SchemaFactory parent) { | ||
this.parent = parent; | ||
setProvider(parent.getProvider()); | ||
anySchema = new AnySchema(); | ||
} | ||
|
||
public JsonSchema getSchema() { | ||
return anySchema; | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is probably an accidental change: schema here does NOT refer to JSON Schema (but rather to thing like what CSV module needs -- unfortunate overload for sure).