Skip to content

[Bug] Incorrect properties orders #119

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

Closed
kezhenxu94 opened this issue Mar 24, 2019 · 0 comments
Closed

[Bug] Incorrect properties orders #119

kezhenxu94 opened this issue Mar 24, 2019 · 0 comments
Labels
Milestone

Comments

@kezhenxu94
Copy link
Collaborator

Input:

{
  "current_user_url": "https://api.github.com/user",
  "current_user_authorizations_html_url": "https://github.com/settings/connections/applications{/client_id}",
  "authorizations_url": "https://api.github.com/authorizations",
  "code_search_url": "https://api.github.com/search/code?q={query}{&page,per_page,sort,order}",
  "commit_search_url": "https://api.github.com/search/commits?q={query}{&page,per_page,sort,order}",
  "emails_url": "https://api.github.com/user/emails",
  "emojis_url": "https://api.github.com/emojis",
  "events_url": "https://api.github.com/events",
  "feeds_url": "https://api.github.com/feeds",
  "followers_url": "https://api.github.com/user/followers",
  "following_url": "https://api.github.com/user/following{/target}",
  "gists_url": "https://api.github.com/gists{/gist_id}",
  "hub_url": "https://api.github.com/hub",
  "issue_search_url": "https://api.github.com/search/issues?q={query}{&page,per_page,sort,order}",
  "issues_url": "https://api.github.com/issues",
  "keys_url": "https://api.github.com/user/keys",
  "notifications_url": "https://api.github.com/notifications",
  "organization_repositories_url": "https://api.github.com/orgs/{org}/repos{?type,page,per_page,sort}",
  "organization_url": "https://api.github.com/orgs/{org}",
  "public_gists_url": "https://api.github.com/gists/public",
  "rate_limit_url": "https://api.github.com/rate_limit",
  "repository_url": "https://api.github.com/repos/{owner}/{repo}",
  "repository_search_url": "https://api.github.com/search/repositories?q={query}{&page,per_page,sort,order}",
  "current_user_repositories_url": "https://api.github.com/user/repos{?type,page,per_page,sort}",
  "starred_url": "https://api.github.com/user/starred{/owner}{/repo}",
  "starred_gists_url": "https://api.github.com/gists/starred",
  "team_url": "https://api.github.com/teams",
  "user_url": "https://api.github.com/users/{user}",
  "user_organizations_url": "https://api.github.com/user/orgs",
  "user_repositories_url": "https://api.github.com/users/{user}/repos{?type,page,per_page,sort}",
  "user_search_url": "https://api.github.com/search/users?q={query}{&page,per_page,sort,order}"
}

Output:

package me.kezhenxu94.test

data class Tests(
        val authorizations_url: String,
        val code_search_url: String,
        val commit_search_url: String,
        val current_user_authorizations_html_url: String,
        val current_user_repositories_url: String,
        val current_user_url: String,
        val emails_url: String,
        val emojis_url: String,
        val events_url: String,
        val feeds_url: String,
        val followers_url: String,
        val following_url: String,
        val gists_url: String,
        val hub_url: String,
        val issue_search_url: String,
        val issues_url: String,
        val keys_url: String,
        val notifications_url: String,
        val organization_repositories_url: String,
        val organization_url: String,
        val public_gists_url: String,
        val rate_limit_url: String,
        val repository_search_url: String,
        val repository_url: String,
        val starred_gists_url: String,
        val starred_url: String,
        val team_url: String,
        val user_organizations_url: String,
        val user_repositories_url: String,
        val user_search_url: String
        val user_url: String,
        )

Note the last two properties

@kezhenxu94 kezhenxu94 added the bug label Mar 24, 2019
@kezhenxu94 kezhenxu94 added this to the 3.2.0 milestone Mar 24, 2019
wuseal pushed a commit that referenced this issue Mar 24, 2019
wuseal pushed a commit that referenced this issue Apr 25, 2019
* upgrade version to 3.1.0-EAP

* Move adding property Annotation function implement into interceptor.

* move init with default value function into interceptor

* move isPropertyVar config function into interceptor

* move order by alphabetical config function into interceptor

* move property nullable or not  config function into interceptor

* adjust unit test to make it to test pass, now only one still not be pass, will fix later

* fix unit test failed case

* Fixed issue #119

* Optimize the way to get PsiDirectory

* re-optimize the way to get PsiDirectory

* Optimize method addProperty

* Optimize getPrimitiveType and getArrayType methods

* Optimize adjustPropertyNameForGettingArrayChildType method

* replace "if statement" with "take if"

* Optimize removeDuplicateClassCode method

* Simplify "generateSingleDataClassFile" method

* Optimize "appendCodeMember" method

* re-Optimize "adjustPropertyNameForGettingArrayChildType" method

* 3.2.0 optimize/code optimize (#138)

* Optimize some recursive methods with "tailrec"

* add String.containsAnyOf(List) method

* Optimize method couldGetAndReuseClassNameInCurrentEditFileForInsertCode

* Optimize http request

* make up send data function logic when send failed

* 3.2.0 (#151)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* [GH-108] Generate Kotlin classes from JSON Schema (#126)

* support generating class from JsonSchema

* Sync

*     support generating class from JsonSchema

* Sync

* Remove checking properties order

* Add unit test

* Support array

* Add more UT

* Update Kotlin version

* Fix UT

* Fix UT

* Add UT

* Reduce stacktrace

* Default value

* Simpify type name

* Default value

* Fix CI

* fix issue #122:just catch UnSupportJsonException like MakeKotlinClassAction do. (#154)

* Polish code and remove deprecated plugin.id (#155)

* 3.2.0 (#159)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* Fix Issue #123 - File Already exists (#157)

* Update changelog

* Update version
wuseal pushed a commit that referenced this issue Apr 26, 2019
* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* Fix Issue #123 - File Already exists (#157)

* 3.2.0 is released, merge it back to master branch (#160)

* upgrade version to 3.1.0-EAP

* Move adding property Annotation function implement into interceptor.

* move init with default value function into interceptor

* move isPropertyVar config function into interceptor

* move order by alphabetical config function into interceptor

* move property nullable or not  config function into interceptor

* adjust unit test to make it to test pass, now only one still not be pass, will fix later

* fix unit test failed case

* Fixed issue #119

* Optimize the way to get PsiDirectory

* re-optimize the way to get PsiDirectory

* Optimize method addProperty

* Optimize getPrimitiveType and getArrayType methods

* Optimize adjustPropertyNameForGettingArrayChildType method

* replace "if statement" with "take if"

* Optimize removeDuplicateClassCode method

* Simplify "generateSingleDataClassFile" method

* Optimize "appendCodeMember" method

* re-Optimize "adjustPropertyNameForGettingArrayChildType" method

* 3.2.0 optimize/code optimize (#138)

* Optimize some recursive methods with "tailrec"

* add String.containsAnyOf(List) method

* Optimize method couldGetAndReuseClassNameInCurrentEditFileForInsertCode

* Optimize http request

* make up send data function logic when send failed

* 3.2.0 (#151)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* [GH-108] Generate Kotlin classes from JSON Schema (#126)

* support generating class from JsonSchema

* Sync

*     support generating class from JsonSchema

* Sync

* Remove checking properties order

* Add unit test

* Support array

* Add more UT

* Update Kotlin version

* Fix UT

* Fix UT

* Add UT

* Reduce stacktrace

* Default value

* Simpify type name

* Default value

* Fix CI

* fix issue #122:just catch UnSupportJsonException like MakeKotlinClassAction do. (#154)

* Polish code and remove deprecated plugin.id (#155)

* 3.2.0 (#159)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* Fix Issue #123 - File Already exists (#157)

* Update changelog

* Update version
wuseal pushed a commit that referenced this issue Sep 20, 2021
* upgrade version to 3.1.0-EAP

* Move adding property Annotation function implement into interceptor.

* move init with default value function into interceptor

* move isPropertyVar config function into interceptor

* move order by alphabetical config function into interceptor

* move property nullable or not  config function into interceptor

* adjust unit test to make it to test pass, now only one still not be pass, will fix later

* fix unit test failed case

* Fixed issue #119

* Optimize the way to get PsiDirectory

* re-optimize the way to get PsiDirectory

* Optimize method addProperty

* Optimize getPrimitiveType and getArrayType methods

* Optimize adjustPropertyNameForGettingArrayChildType method

* replace "if statement" with "take if"

* Optimize removeDuplicateClassCode method

* Simplify "generateSingleDataClassFile" method

* Optimize "appendCodeMember" method

* re-Optimize "adjustPropertyNameForGettingArrayChildType" method

* 3.2.0 optimize/code optimize (#138)

* Optimize some recursive methods with "tailrec"

* add String.containsAnyOf(List) method

* Optimize method couldGetAndReuseClassNameInCurrentEditFileForInsertCode

* Optimize http request

* make up send data function logic when send failed

* 3.2.0 (#151)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* [GH-108] Generate Kotlin classes from JSON Schema (#126)

* support generating class from JsonSchema

* Sync

*     support generating class from JsonSchema

* Sync

* Remove checking properties order

* Add unit test

* Support array

* Add more UT

* Update Kotlin version

* Fix UT

* Fix UT

* Add UT

* Reduce stacktrace

* Default value

* Simpify type name

* Default value

* Fix CI

* fix issue #122:just catch UnSupportJsonException like MakeKotlinClassAction do. (#154)

* Polish code and remove deprecated plugin.id (#155)

* 3.2.0 (#159)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* Fix Issue #123 - File Already exists (#157)

* Update changelog

* Update version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant