Bug 456070 - Json schema invalid 'enum' type
Summary: Json schema invalid 'enum' type
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-23 06:17 EST by Paweł Englert CLA
Modified: 2022-06-09 10:04 EDT (History)
2 users (show)

See Also:


Attachments
test case with generating schema with enum (19.80 KB, application/x-zip-compressed)
2014-12-23 08:08 EST, Paweł Englert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Englert CLA 2014-12-23 06:17:50 EST
Generated schema should be compatibile with '4'. According to schema 'type' element can contain such values (http://json-schema.org/latest/json-schema-core.html#anchor8):
-array
-boolean
-integer
-number
-null
-object
-string

However generated schema contains "type" : "enum", in case on enum. It should be changed to string or other appropriate value.
Comment 1 Iaroslav Savytskyi CLA 2014-12-23 07:41:58 EST
- Can you please explain what do you mean here: "schema should be compatible with '4'".

- Please add reproducible testCase.
Comment 2 Paweł Englert CLA 2014-12-23 08:08:01 EST
Created attachment 249609 [details]
test case with generating schema with enum

It is maven project with java 8. Please run unit test on this project or mvn test to run test case.
Comment 3 Paweł Englert CLA 2014-12-23 08:09:56 EST
(In reply to Iaroslav Savytskyi from comment #1)
Hi Iaroslav,

I mean that generated schema should be compatibile with json schema draft 4 (http://json-schema.org/draft-04/schema#). 

> - Can you please explain what do you mean here: "schema should be compatible
> with '4'".
> 
> - Please add reproducible testCase.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:04:55 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink