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

Error thrown when schema has a title or description flag #263

Closed
Kodiyath opened this issue Jan 17, 2019 · 5 comments
Closed

Error thrown when schema has a title or description flag #263

Kodiyath opened this issue Jan 17, 2019 · 5 comments

Comments

@Kodiyath
Copy link

Kodiyath commented Jan 17, 2019

The schema considered is

{"title": "feeds","description": "Feeds user subscribes to","type": "object","patternProperties": {"^[A-Za-z]+$": { "type": "boolean" }}}

When trying to build the org.everit.json.schema.Schema object, the following error is thrown:

org.json.JSONException: Duplicate key "title"
	at org.everit.json.schema.internal.JSONWriter.key(JSONWriter.java:261)
	at org.everit.json.schema.internal.JSONPrinter.key(JSONPrinter.java:27)
	at org.everit.json.schema.Schema.lambda$describeTo$0(Schema.java:281)

Incase if the title is removed from the schema, the same error is thrown for the field description.

I am using the version 1.10.0.

@afranzi
Copy link
Contributor

afranzi commented Jan 17, 2019

Hi @Kodiyath,

This is related to this issue #250. They fixed in the next release.

@Kodiyath
Copy link
Author

Thankyou @afranzi, looks like the version is not released yet.

@afranzi
Copy link
Contributor

afranzi commented Jan 17, 2019

Nop, but you can use the commit hash as @erosb mention in the previous issue, so you can keep up developing without the bug :)

@erosb
Copy link
Contributor

erosb commented Jan 17, 2019

Yes, exactly, thanks @afranzi .
During the week I will try to find time to fix #260 but if I can't make it then I will publish the next release fixing the title/description problem this week.

Thanks both.

@erosb
Copy link
Contributor

erosb commented Jan 22, 2019

Hello, I've just released version 1.11.0 with the bugfix.

@erosb erosb closed this as completed Jan 22, 2019
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