-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Kotlin client: add volley library support #10253
Merged
Merged
Changes from 107 commits
Commits
Show all changes
114 commits
Select commit
Hold shift + click to select a range
c5a6b1f
Add basic jvm-volley folder to enable it as a library
alister995199 8862438
Add JVM_VOLLEY to the KotlinClientCodegen as a library option (using …
f9c2084
Temporary checkin of generated code and kotlinfied version for use in…
alister995199 6b33c39
Added Kotlin-ified api invoker and request objects, update Kotlin cli…
5529173
Add Android specific build.gradle mustache file to jvm-volley library
76dd872
Hardcode SDK version and build tools version in build.gradle template…
27ff848
Add Android manifest to generated code
a94dcd3
Add Kotlin dependencies and plugins to build gradle template
732b998
WIP: Create basic API templating for jvm-volley
2cf5f75
Add ApiException and parameter validation, create path variable using…
6cf8fff
Build queryParams and headerParams
58b9356
Add VolleyRequest template
6ced4a6
WIP: Injecting context and default API invoker into APIs (non compiling)
6b82587
Add DefaultInvoker stub and update API to inject context
29b2221
Add request queue generation to the DefaultInvoker
78afec7
Fix up compile errors in the invoker
b43c757
Cleanup unrequired templates
7ad0174
Update templates
alister995199 579e525
Add constructor overloads to inject stack or network into request queue
3666643
Merge branch 'master' of https://github.com/alisters/openapi-generator
b2c6ca9
Fix compile errors with request queue generation
2412a1e
Fix compile errors
6f672a7
Al'll fix it for you.....
alister995199 fafc0c9
WIP compile fixes
3cdc80c
More compile fixes
65465af
Generate to java directory and kotlin-ify auth code
alister995199 7dea22c
More syntax fixes in templates
alister995199 8792ed9
Almost left it in a working state, fixing that .... now...
alister995199 331e675
Switch builder method based on model existence constraints - body and…
alister995199 12f0578
Add coroutine logic to APIs and pass through listeners to the request…
1e993c5
Use reflection and type tokens to work around clazz issues on generics
alister995199 6eddbe4
Add POST, PATCH and PUT to RequestFactory
ac5559f
More templating magic
760da51
Fix Steve, the human compiler's errors again !
alister995199 e30caab
Add CLI option for generating room models
4775389
Configure the room model package
bbc3196
Add initial room model templating and generation
bd9a408
Add room model generation implementation
f43c53c
Implement toRoom function on models to convert model to room model
18d119a
Bug fixes, transformers to and from room models
b54a372
Add query parameters to URL generation
b6205bf
Fix issues with gson type conversion, add type adapters to gson instance
62b72d4
Fix issues with older API versions and Java8 libraries,
808bbfa
Add request factory interface
b1b785a
API template tidy up
d9f43c0
Update IRequestFactory to include companion object, minor tidy ups
20df397
Remove @Keep annotations from room templates
bd0eb7a
Rename toRoomModel and toApiModel functions
19b20fd
Add empty companion object to generated room model
67cbfe6
Add ITransformStorage interface to allow polymorphic transforms to ro…
alister995199 89ce073
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
alister995199 39b4b6b
Add content type into GsonRequest
f2c2195
Merge branch 'master' of https://github.com/alisters/openapi-generator
cd28b20
Move gson serialization of request body into GsonRequest
bd43b15
Update request factory to take header factories
alister995199 80a5ce6
Remove the generated comparision code
alister995199 70e3b0f
Move the generateRoomModels switch into the KotlinClientCodegen class
6ee9414
Move room model generation out of default generator
alister995199 789dcb2
Updates for auth
alister995199 0def1ef
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
alister995199 197206d
Finalise removal of kotlin elements from default generator
alister995199 4825ef9
Hoist room model logic out of abstractKotlin into kotlin client codegen
alister995199 97d2774
Revert AbstractKotlinCodegen
alister995199 bafa9e8
Revert Codegen constants to remove base generator changes out of our …
alister995199 5603817
Revert data class template changes, add data class body check to Kotl…
1a60c02
Add sample generation yaml file for jvm-volley library
5e6db5f
Update JVM-Volley readme for generateRoomModels flag
ee1868e
Remove unused template files, get auth compiling but non functional, …
alister995199 daff15e
Merge branch 'master' of https://github.com/alisters/openapi-generator
alister995199 b5fe740
Generate sample generated code
0f8f685
Add not implemented method for oauth
alister995199 49993cc
Merge branch 'master' of https://github.com/alisters/openapi-generator
alister995199 d82caeb
Add unit test for KotlinClientCodegen generateRoomModel flag
274dba0
Merge branch 'master' of https://github.com/alisters/openapi-generator
9c4268e
Remove accidental hard coding of src/main/java source folder
alister995199 cf14378
Merge branch 'master' of https://github.com/alisters/openapi-generator
alister995199 e67403a
Push changed generated sample files
alister995199 3b76cde
Move and rename IStorable inside the volley library
alister995199 c9b3ef9
Inject retry policy into API definition, re-run sample and doc scripts
540b0a7
Add generic post processors
alister995199 1b47c9d
Update samples after generator changes
9b451c8
Fix some compile errors with the pet store sample
8f1e9b8
Fix duplicate auth companion object and import generation
alister995199 9f05c7a
Reinstate query and form parameter code generation
alister995199 b97193a
Merge branch 'master' of https://github.com/alisters/openapi-generator
4ae08fd
Add check for unsupported serialization libraries
609103f
Fix broken unit tests
02fa246
Regenerate samples
94bc961
AN-233 Update request factory to allow custom gsonadapters
australianfrog123 6f550c1
update `GsonRequest.mustache` and `RequestFactoy.mustache` to use `Ma…
TheY2T 0d2c2f1
Update readme with better examples and design notes
alister995199 db6805c
Merge branch 'master' of https://github.com/alisters/openapi-generator
alister995199 5f75e39
Update readme with info about gson serializers and adapters for polym…
alister995199 4358e2b
Merge branch 'OpenAPITools:master' into master
alisters fbb5248
Updated samples
TheY2T 59a82dc
Merge branch 'master' of https://github.com/alisters/openapi-generator
TheY2T 62449bc
Merge from upstream
alister995199 7a8c982
Merge from upstream
alister995199 637ed4c
Address review comments
alister995199 90fd818
Update samples
3b95ce6
Samples
40c3870
Update docs
b587d5e
Remove DateAdapter generated file, template and it's inclusion as a s…
alister995199 d9eba2f
Merge branch 'master' of https://github.com/alisters/openapi-generator
alister995199 ad5c485
Review comment cleanup for initial PR #10253 - cleaner auth key in pa…
alister995199 8232b86
Review comment - add a kotlin version parameter to the build scripts
alister995199 5594087
Updated samples
edfe7a1
Missing changes from build.mustache
alister995199 835b1ca
Merge branch 'master' of https://github.com/alisters/openapi-generator
alister995199 44fa4e0
Regenerate samples for build.gradle changes
alister995199 1510afe
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
alister995199 abbfcf6
Merge from master and generate samples
alister995199 d05a42b
Remove serializer as a supporting file from jvm-volley - it's seriali…
alister995199 226ef91
Remove singleton serializer from jvm-volley generation as it's not used
alister995199 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
generatorName: kotlin | ||
outputDir: samples/client/petstore/kotlin-jvm-volley | ||
library: jvm-volley | ||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/kotlin-client | ||
additionalProperties: | ||
artifactId: kotlin-petstore-jvm-volley | ||
generateRoomModels: "true" | ||
serializationLibrary: "gson" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@alisters just wondering, how different are those grade files from the other shared gradle files?
If they are very different, we should keep them separated, if they are similar, we should consider merge them.
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.
The build.mustache/build.gradle is very different on account of android versus straight jvm/java builds.
Same goes for the manifest - Android only.
Other builds don't have a gradle properties - i could fold that into the build.gradle i think. Pretty new to gradle so i think myself or colleague Steve just made one by default - no strong rationale there.
The settings.gradle is the shared one - just keeping the conditional logic a bit cleaner there i guess ?
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.
Looks good to me 👍