-
Notifications
You must be signed in to change notification settings - Fork 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
I18N-1323 - Update Mojito CLI to use OpenAPI spec for rest calls #240
base: master
Are you sure you want to change the base?
Conversation
72265a9
to
5f8b939
Compare
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.box.l10n.mojito</groupId> | ||
<artifactId>mojito-restclient</artifactId> |
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.
Removed restclient dependency
import org.springframework.web.client.HttpClientErrorException; | ||
|
||
@Component | ||
public class HttpClientErrorExceptionHelper { |
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.
Moved classes from restclient module to cli module
@@ -0,0 +1,7 @@ | |||
package com.box.l10n.mojito.cli.apiclient.exception; | |||
|
|||
public class AssetNotFoundException extends ResourceNotFoundException { |
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.
Moved exception classes from restclient module to cli module
import org.springframework.web.util.UriComponentsBuilder; | ||
|
||
@Component | ||
public class AuthenticatedRestTemplate { |
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.
Moved authentication classes from restclient module to cli module
cli/src/main/java/com/box/l10n/mojito/cli/apiclient/PollableTaskWsApiProxy.java
Show resolved
Hide resolved
Generate code from open API specification and reuse the generated models and clients
5f8b939
to
e175c03
Compare
|
||
/** */ | ||
public class PseudoLocCommandTest extends CLITestBase { | ||
|
||
/** logger */ | ||
static Logger logger = LoggerFactory.getLogger(PseudoLocCommandTest.class); | ||
|
||
@Autowired RepositoryClient repositoryClient; |
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.
Does this not need a replacement? Was it unused previously?
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.
Yes, it was unused
@@ -30,12 +28,8 @@ public class PerformanceSanboxTest extends CLITestBase { | |||
|
|||
static int NUMBER_OF_TEXTUNITS = 10000; | |||
|
|||
@Autowired RepositoryClient repositoryClient; |
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.
No replacement needed?
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.
No, it was unused
@Autowired RepositoryRepository repositoryRepository; | ||
|
||
@Autowired AssetClient assetClient; |
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.
No replacement needed?
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.
No, it was unused
@@ -65,8 +64,6 @@ public class CLITestBase extends IOTestBase { | |||
|
|||
@Autowired ResttemplateConfig resttemplateConfig; | |||
|
|||
@Autowired RepositoryClient repositoryClient; |
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.
No replacement needed here?
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.
No, it was unused
Generate code from open API specification and reuse the generated models and clients