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

"extends" schema resolution assumes current schema is at root of file #425

Closed
markdingram opened this issue Sep 28, 2015 · 3 comments
Closed
Milestone

Comments

@markdingram
Copy link
Contributor

Example of a schema that currently fails (also checked with http://www.jsonschema2pojo.org)

{
  "definitions": {
    "parent": {
      "type": "object",
      "properties": {
        "propertyOfParent": {
          "type": "string"
        }
      }
    },
    "child": {
      "type": "object",
      "extends": {"$ref": "#/definitions/parent"},
      "properties": {
        "propertyOfChild": {
          "type": "string"
        }
      }
    }
  },
  "type": "object",
  "properties": {
    "child": {"$ref": "#/definitions/child"}
  }
}
@wsalembi
Copy link

Can you please release 0.4.16 quickly. All our schemas that use 'extends' are broken when we upgrade 0.4.14 to 0.4.15.

error:
org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.15:generate failed: Path not present

@joelittlejohn
Copy link
Owner

Hi, I'm just waiting for one more PR to be merged.

It wasn't clear to me that this was a regression introduced in 0.4.15, or
that this change necessarily fixes that problem. Could you provide a schema
that is affected by this? I'd like to confirm that this is now working and
add a test case around it.

It would be helpful if you could mvn install the current snapshot and test
it in your project.

If you are having problems with 0.4.15 I recommend you stick with 0.4.14.
On 23 Oct 2015 10:17 am, "wsalembi" [email protected] wrote:

Can you please release 0.4.16 quickly. All our schemas that use 'extends'
are broken when we upgrade 0.4.14 to 0.4.15.

error:
org.jsonschema2pojo:jsonschema2pojo-maven-plugin:0.4.15:generate failed:
Path not present


Reply to this email directly or view it on GitHub
#425 (comment)
.

@wsalembi
Copy link

My schema is very similar to the new integration test in 0.4.15 (jsonschema2pojo-integration-tests/src/test/resources/schema/extends/extendsSchemaWithinDefinitions.json)

I confirm everything is working with the current snapshot. I tested it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants