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

One level higher parent moving into child's directory [Windows] #1143

Open
oleggye opened this issue Jul 6, 2020 · 3 comments
Open

One level higher parent moving into child's directory [Windows] #1143

oleggye opened this issue Jul 6, 2020 · 3 comments

Comments

@oleggye
Copy link

oleggye commented Jul 6, 2020

Link to the example with commented solution: https://github.com/oleggye/jsonschema2pojo-poc

When you have parent contract e.g. Base.json in the root (e.g. /schema) and than you create the child contract Child.json (i.e. it uses extends) in sub-folder /schema/api, after plugin generation it will move parent's pojo near the child's pojo.

image

It never happens on Linux machine!

I found out the solution in your documentation - explicitly specify the order using
<sourceSortOrder>FILES_FIRST</sourceSortOrder>

image

Why didn't you set up this as default value, but set up OS dependent behavior instead?

@abaudhuin
Copy link

@oleggye I had the same problem on linux. Thank you, your solution solved it :)

@ganezdragon
Copy link

Thank you. Setting the following in build.gradle worked for me :)

sourceSortOrder = 'FILES_FIRST'

@zacisco
Copy link

zacisco commented Nov 27, 2023

confirm
looks like a bug ... i think

@oleggye thx

search by "sourceSortOrder" get #719 and #1054 additional info

I don’t quite understand for what purposes sorting can be useful ... which cases?
example: class in parent extends class in subdirs and files in subdirs should be processed first?

files first works equals everywhere and without bugs

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

4 participants