-
Notifications
You must be signed in to change notification settings - Fork 0
sort domain objects by class name #3
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
Conversation
|
|
||
| if (settings.domainDirectory.toFile().exists()) { | ||
| settings.domainDirectory.eachFile(FileType.FILES) { f -> | ||
| def domainFiles = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we may have to live w/ this library for a little bit longer, can we replicate the problem with the tests this project has, to go with the fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was afraid someone would ask for that. But yeah, it should be tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a test
Issue:
Problem:
Every time we touch domain objects, the go and typescript clients get generated in a different order. This makes it impossible to determine what changed in client PRs. Furthermore, the order for a pegged version can vary from one developer to another.
This is a result of the domain objects getting loaded in from directory lists. The client generating freemarker then uses code like
[#list domain as d]to iterate over them.Solution:
Sort the domain objects by their "class" name (the last real name in a file like
io.fusionauth.domain.Tenant.jsonLinked PR:
I believe the openapi file issue was resolved in the linked Linear issue.
Reviewer Notes:
I tested this locally with an integration build by stepping through
fusionauth-appcommits making domain changes.