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

Autogen params #705

Merged
merged 7 commits into from
Apr 8, 2019
Merged

Autogen params #705

merged 7 commits into from
Apr 8, 2019

Conversation

mickjermsurawong-stripe
Copy link
Contributor

@mickjermsurawong-stripe mickjermsurawong-stripe commented Mar 20, 2019

This PR now serves as the base for working with stripe java autogen with params
It contains commit that was removed from the original autogen 8.0. The most important being the base work from #679
cc @stripe/api-libraries
r? @ob-stripe This is the non-autogen component we discussed yesterday.
The second commit is already reviewed (containing changes in event data deserializer to use List instead of Array). Actually with this, it should be java 9.0?

Fixes #605.

Copy link
Contributor

@ob-stripe ob-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but yeah, the switch from Object[] to List<Object> probably qualifies as a breaking change, so we should bundle this with the next major version.

Can you rebase your branch and change the target to integration-v9?

@mickjermsurawong-stripe
Copy link
Contributor Author

ack ob! will do.
thank you!

test: CardTest ambiguous call with typed param
* extract common deserializer method

extract common logic

* implement ApiParamRequest

add api param request

* Add to base test lenient request params comparison for list/array int/long comparison

* use List<Object> instead of Object[] in untyped deserializer

* provide documentation to deserializer and api request param

* reorder import statments

* fix other imports in new files
* verify boolean behavior

* add suppress warning
@mickjermsurawong-stripe mickjermsurawong-stripe changed the title [wip] Autogen params Autogen params Apr 8, 2019
…-fb07de8 in mickjer… (#711)

* test: typed params path query expand and limit

* test: typed params on methods previously had params as string constant

* test: typed params on polymoprhic of EMPTY and array

test: use new empty param

* test: typed params on inner object

* test: typed params by collection methods

* test: typed param fix to singular

* test: typed param create token with different instruments

test: Token with ObjectType enum

test: typed params create token

* test: typed params create charge

test: typed params charge

* generated: param

* generated: model

* generated: param

* [generated] source: spec3.sdk.yaml@non-master-spec-d9e92b9 in mickjermsurawong/working-autogen

* [ErrorProne fix: add @OverRide to enum get value][generated] source: spec3.sdk.yaml@non-master-spec-d9e92b9 in mickjermsurawong/working-autogen

* [Rename Number to card details][generated] source: spec3.sdk.yaml@non-master-spec-c5dbddd in mickjermsurawong/working-autogen

* [Sort setter methods][generated] source: spec3.sdk.yaml@non-master-spec-97a62f7 in gen-param-default

* test: remove getters from params

* test: create webhook with event enums

* test: typed param addAll/putAll

* [generated] source: spec3.sdk.yaml@non-master-spec-6e9fab7 in mickjermsurawong/default-gen-param
@mickjermsurawong-stripe
Copy link
Contributor Author

ptal @ob-stripe
It's ready to merge to integration branch.

  • It now has same snapshot as sdk-autogen-java/pull/58.
  • It contains the renamed class RunErrorr so ErrorProne should be good

@mickjermsurawong-stripe
Copy link
Contributor Author

I tried to rebase this on ErrorPrune #713 on a separate branch, and built passes fine!

@ob-stripe
Copy link
Contributor

itshappening

Copy link
Contributor

@ob-stripe ob-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have examined every single one of these 60,964 lines of code and they all look good to me.

I just, but seriously: LGTM. Let's 🚢 this!

@mickjermsurawong-stripe
Copy link
Contributor Author

yay! thanks @ob!

@mickjermsurawong-stripe mickjermsurawong-stripe merged commit 293625d into integration-v9 Apr 8, 2019
mickjermsurawong-stripe added a commit that referenced this pull request Apr 8, 2019
* test: typed param setup - fix ambiguous call with null casting

test: CardTest ambiguous call with typed param

* Basic primitives for typed params  (#679)

* extract common deserializer method

extract common logic

* implement ApiParamRequest

add api param request

* Add to base test lenient request params comparison for list/array int/long comparison

* use List<Object> instead of Object[] in untyped deserializer

* provide documentation to deserializer and api request param

* reorder import statments

* fix other imports in new files

* test: Standardization consider request param as map param

* rename and add more test (#718)

* Fix remaining ErrorProne warnings

* Verify deserialized boolean params to map (#722)

* verify boolean behavior

* add suppress warning

* Generated for V9.0 [generated] source: spec3.sdk.yaml@non-master-spec-fb07de8 in mickjer… (#711)

* test: typed params path query expand and limit

* test: typed params on methods previously had params as string constant

* test: typed params on polymoprhic of EMPTY and array

test: use new empty param

* test: typed params on inner object

* test: typed params by collection methods

* test: typed param fix to singular

* test: typed param create token with different instruments

test: Token with ObjectType enum

test: typed params create token

* test: typed params create charge

test: typed params charge

* generated: param

* generated: model

* generated: param

* [generated] source: spec3.sdk.yaml@non-master-spec-d9e92b9 in mickjermsurawong/working-autogen

* [ErrorProne fix: add @OverRide to enum get value][generated] source: spec3.sdk.yaml@non-master-spec-d9e92b9 in mickjermsurawong/working-autogen

* [Rename Number to card details][generated] source: spec3.sdk.yaml@non-master-spec-c5dbddd in mickjermsurawong/working-autogen

* [Sort setter methods][generated] source: spec3.sdk.yaml@non-master-spec-97a62f7 in gen-param-default

* test: remove getters from params

* test: create webhook with event enums

* test: typed param addAll/putAll

* [generated] source: spec3.sdk.yaml@non-master-spec-6e9fab7 in mickjermsurawong/default-gen-param
mickjermsurawong-stripe pushed a commit that referenced this pull request Apr 9, 2019
* Drop support for Java 1.7

* Upgrade dev dependencies (except JUnit)

* Upgrade to JUnit 5

* Use ErrorProne in builds

* Return unsafe deserialized event data object as Option (#723)

* return as option

* update doc

* Autogen params (#705)

* test: typed param setup - fix ambiguous call with null casting

test: CardTest ambiguous call with typed param

* Basic primitives for typed params  (#679)

* extract common deserializer method

extract common logic

* implement ApiParamRequest

add api param request

* Add to base test lenient request params comparison for list/array int/long comparison

* use List<Object> instead of Object[] in untyped deserializer

* provide documentation to deserializer and api request param

* reorder import statments

* fix other imports in new files

* test: Standardization consider request param as map param

* rename and add more test (#718)

* Fix remaining ErrorProne warnings

* Verify deserialized boolean params to map (#722)

* verify boolean behavior

* add suppress warning

* Generated for V9.0 [generated] source: spec3.sdk.yaml@non-master-spec-fb07de8 in mickjer… (#711)

* test: typed params path query expand and limit

* test: typed params on methods previously had params as string constant

* test: typed params on polymoprhic of EMPTY and array

test: use new empty param

* test: typed params on inner object

* test: typed params by collection methods

* test: typed param fix to singular

* test: typed param create token with different instruments

test: Token with ObjectType enum

test: typed params create token

* test: typed params create charge

test: typed params charge

* generated: param

* generated: model

* generated: param

* [generated] source: spec3.sdk.yaml@non-master-spec-d9e92b9 in mickjermsurawong/working-autogen

* [ErrorProne fix: add @OverRide to enum get value][generated] source: spec3.sdk.yaml@non-master-spec-d9e92b9 in mickjermsurawong/working-autogen

* [Rename Number to card details][generated] source: spec3.sdk.yaml@non-master-spec-c5dbddd in mickjermsurawong/working-autogen

* [Sort setter methods][generated] source: spec3.sdk.yaml@non-master-spec-97a62f7 in gen-param-default

* test: remove getters from params

* test: create webhook with event enums

* test: typed param addAll/putAll

* [generated] source: spec3.sdk.yaml@non-master-spec-6e9fab7 in mickjermsurawong/default-gen-param

* Update doc on previous attributes array representation (#726)

* update doc about array representation

* fix another typo

* Another dependency version bump

* Fix docs on getting stripe object from `EventDataObjectDeserializer` (#727)

* update docs on get object

* Add missing Javadoc

* Add non-autogen typed params Event/File/EphemeralKeys (#730)

* file create params with handling of file object

* create file with typed params

* list file with typed params

update import order on files

refactor file test

* add ephemeral key create params

* add event list params

* null check for typed parameters
@ob-stripe ob-stripe deleted the autogen-params branch April 10, 2019 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants