Skip to content
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 for $ref #7

Closed
joelittlejohn opened this issue Jun 23, 2013 · 2 comments
Closed

Support for $ref #7

joelittlejohn opened this issue Jun 23, 2013 · 2 comments

Comments

@joelittlejohn
Copy link
Owner

Original author: [email protected] (December 23, 2010 13:29:25)

A the moment jsonschema2pojo doesn't support "$ref" style syntax for referencing other schemas (see http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.28).

Some factors to consider:

  • We need to make sure we have support for relative URIs.
  • Where a second refs exist to an already referenced schema, we should be reusing the same java type IMO
  • The ref mechanism is still under discussion and may change in the next draft (see http://groups.google.com/group/json-schema).

Original issue: http://code.google.com/p/jsonschema2pojo/issues/detail?id=7

@joelittlejohn
Copy link
Owner Author

From [email protected] on January 13, 2011 17:04:00
One important change here is to move away from using "id" to optionally specify Java type for code generation. The unique id/uri of a schema will be important when resolving refs, Having re-read the id part of the spec[1], it's clearer to me now what the intention of id is

The good news is that the core schema[2] allows additional properties for schemas themselves - so any additional meta-data can be attached to a schema.

The first step here is going to be introducing a new optional additional schema property 'javaType' that will be used to specify/override the target Java type name.

[1] http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.27
[2] http://json-schema.org/schema

@joelittlejohn
Copy link
Owner Author

From [email protected] on February 21, 2011 10:03:57
Fixed in trunk, will be released in 0.1.6

flibbertigibbet added a commit to flibbertigibbet/jsonschema2pojo that referenced this issue Feb 6, 2016
…-output-stream

Flush output stream after serializing media
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant