Skip to content

Commit

Permalink
I18N-1323 Update Mojito CLI to use OpenAPI spec for rest calls
Browse files Browse the repository at this point in the history
Fixed custom model resolver
  • Loading branch information
DarKhaos committed Nov 27, 2024
1 parent 74ec085 commit bed0861
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.box.l10n.mojito.cli.apiclient.CommitWsApi;
import com.box.l10n.mojito.cli.command.param.Param;
import com.box.l10n.mojito.cli.console.ConsoleWriter;
import com.box.l10n.mojito.cli.model.CommitBodyCommit;
import com.box.l10n.mojito.cli.model.CommitBody;
import com.box.l10n.mojito.cli.model.CommitCommit;
import com.box.l10n.mojito.rest.entity.Repository;
import com.google.common.collect.Streams;
Expand Down Expand Up @@ -104,7 +104,7 @@ protected void execute() throws CommandException {
commitInfo = new CommitInfo(commitHash, authorEmailParam, authorNameParam, creationDateParam);
}

CommitBodyCommit commitBody = new CommitBodyCommit();
CommitBody commitBody = new CommitBody();
commitBody.setCommitName(commitInfo.hash);
commitBody.setRepositoryId(repository.getId());
commitBody.setAuthorName(commitInfo.authorName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ protected void doImportFileMatch(FileMatch fileMatch) throws CommandException {
ImportRepositoryBody importRepositoryBody = new ImportRepositoryBody();
importRepositoryBody.setUpdateTM(updateTMParam);
importRepositoryBody.setXliffContent(getFileContent(fileMatch));
repositoryClient.importRepository(importRepositoryBody,
repository.getId());
repositoryClient.importRepository(importRepositoryBody, repository.getId());

consoleWriter.erasePreviouslyPrintedLines();
consoleWriter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ protected boolean hiddenByJsonView(Annotation[] annotations, AnnotatedType type)
}
}
}
if (type.getType().getTypeName().startsWith(Page.class.getTypeName())) {
return false;
}
return Arrays.stream(type.getCtxAnnotations())
.noneMatch(
annotation ->
annotation.annotationType().getTypeName().equals(RequestBody.class.getTypeName()));
return !type.getType().getTypeName().startsWith(Page.class.getTypeName());
}
}

0 comments on commit bed0861

Please sign in to comment.