Bug 456071 - JSON-SCHEMA: Reference definitions issue when multiple classes share simple name
Summary: JSON-SCHEMA: Reference definitions issue when multiple classes share simple name
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:28 EST by Paweł Englert CLA
Modified: 2022-06-09 10:05 EDT (History)
2 users (show)

See Also:


Attachments
Reproducible test case (23.59 KB, application/x-zip-compressed)
2014-12-29 06:09 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:28:08 EST
In our project we have more that one class with this same name but they are located in different packages or are nested within other class. However generation of JsonSchema is using referenceDescriptor.getJavaClass().getSimpleName() to create reference name. 

In this case, only first one will be added to definitions and others will be wrong referenced to first one instead of creating separate definition for each ones.
Comment 1 Iaroslav Savytskyi CLA 2014-12-23 07:43:06 EST
Please add reproducible testCase.
Comment 2 Paweł Englert CLA 2014-12-29 06:09:08 EST
Created attachment 249647 [details]
Reproducible test case

Java 8 maven project. Please run GenerateJsonSchemaTest, it shows that generated JsonSchema use one definition to two different nested classes.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:05:22 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink