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

Shipapiv2 #359

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
669ee77
fixed the models for single fat jar packaging
babltiga Jun 25, 2021
4a07921
added maven compile
babltiga Jun 25, 2021
eb35712
compile and install the library step
babltiga Jun 25, 2021
eb0234f
Merge pull request #1 from jazva/uber_jar
babltiga Jun 25, 2021
6ccea7e
Merge branch 'amzn:main' into main
lyoff Mar 11, 2022
44df64e
API update. Added unique path for each API to avoid naming collisions
lyoff Mar 14, 2022
6ba4ab9
Merge pull request #2 from jazva/newversion
lyoff Mar 14, 2022
b1fda7c
bring back second category API. Explicit package naming
lyoff Mar 16, 2022
d5b2575
Merge remote-tracking branch 'origin/main' into newversion
lyoff Mar 16, 2022
77137c9
Merge pull request #3 from jazva/newversion
lyoff Mar 16, 2022
9b4e6e3
Merge branch 'amzn:main' into main
lyoff Mar 30, 2022
156d220
separate client packages per module
lyoff Mar 30, 2022
5f5300b
Merge branch 'amzn:main' into main
lyoff Apr 29, 2022
74354f6
Merge remote-tracking branch 'origin/main' into newversion
lyoff Apr 29, 2022
adf7617
changes to parse dates and use RDT
lyoff May 5, 2022
4cd6b69
Merge remote-tracking branch 'upstream/main' into newversion
lyoff Oct 18, 2022
2988d0e
upgrades due to encoding
lyoff Feb 18, 2023
0056435
Merge pull request #4 from jazva/newversion
lyoff Feb 18, 2023
4d68160
Merge remote-tracking branch 'upstream/main' into newversion
lyoff Mar 30, 2023
8b1dff0
reinstated encoding back, upgraded to latest upstream version
lyoff Mar 30, 2023
ff0deb1
typo
lyoff Mar 30, 2023
3c838f3
use the custom JSON.java file properly
lyoff Apr 4, 2023
1b98c6a
Merge pull request #6 from jazva/newversion
josehg Apr 4, 2023
8ce4965
upda shipping API to v2. some comments how to build
lyoff Sep 18, 2023
5c1c320
Merge remote-tracking branch 'origin/main' into newversion
lyoff Apr 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
generated
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## Jazva Notes

We modified the code base, but still should periodically merge upstream/main into our branch and push
To build:

1. change version in [generate/pom.xml]
2. global replace the new version in generate/compile.sh
3. run generate/compile.sh (which has mvn install:install-file commented out)
4. fix the absolute path in mvn install:install-file
5. manually run mvn install:install-file line to make sure it pushes to the lib folder in main jazva project
6. add the new version to git in jazva project ./lib/com/amazon/sellingpartnerapi/...
7. update jazvas main pom.xml to use the new version

Note: sometimes we need to update the authorization-authentication module as well, which is a dependency in the above pom. The lines to build it are in the same compile.sh file


## Selling Partner API Models
This repository contains Swagger models for developers to use to create software to call Selling Partner APIs. Developers can use [swagger codegen](https://github.com/swagger-api/swagger-codegen) to generate client libraries from these models. Please refer to [selling-partner-api-docs](https://github.com/amzn/selling-partner-api-docs) for additional documentation and read the [Selling Partner API Developer Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/developer-guide/SellingPartnerApiDeveloperGuide.md) for instructions to get started.

Expand Down
20 changes: 13 additions & 7 deletions clients/sellingpartner-api-aa-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>com.amazon.sellingpartnerapi</groupId>
<artifactId>sellingpartnerapi-aa-java</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<version>1.0.3</version>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -47,13 +47,13 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-signer</artifactId>
<version>1.11.610</version>
<version>1.12.408</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
<version>1.18.26</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
Expand Down Expand Up @@ -87,7 +87,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-migrationsupport</artifactId>
<version>5.5.1</version>
<version>5.9.2</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
Expand All @@ -104,10 +104,16 @@
<version>3.9</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<!-- <dependency>-->
<!-- <groupId>org.apache.httpcomponents</groupId>-->
<!-- <artifactId>httpclient</artifactId>-->
<!-- <version>4.5.13</version>-->
<!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents.client5/httpclient5 -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.2.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-sts -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public class ApiClient {

private HttpLoggingInterceptor loggingInterceptor;

private String rdt = null;

private LWAAuthorizationSigner lwaAuthorizationSigner;
private AWSSigV4Signer awsSigV4Signer;
private RateLimiter rateLimiter;
Expand Down Expand Up @@ -128,6 +130,11 @@ public class ApiClient {
return this;
}

public ApiClient setRdt(String rdt) {
this.rdt = rdt;
return this;
}

/**
* Get HTTP client
*
Expand Down Expand Up @@ -1048,7 +1055,13 @@ public class ApiClient {
request = reqBuilder.method(method, reqBody).build();
}

request = lwaAuthorizationSigner.sign(request);
if (rdt == null) {
request = lwaAuthorizationSigner.sign(request);
} else {
request = request.newBuilder()
.addHeader("x-amz-access-token", rdt)
.build();
}
request = awsSigV4Signer.sign(request);

return request;
Expand Down