Skip to content

Commit

Permalink
Remove deprecated API and bump version to 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
semuxgo committed Apr 15, 2021
1 parent 1beed55 commit e1016e3
Show file tree
Hide file tree
Showing 10 changed files with 3,484 additions and 40 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/org/semux/api/swagger/v2.4.0.json</inputSpec>
<inputSpec>${project.basedir}/src/main/resources/org/semux/api/swagger/v2.5.0.json</inputSpec>
<language>jaxrs-cxf</language>
<configOptions>
<useGenericResponse>true</useGenericResponse>
Expand Down Expand Up @@ -138,7 +138,7 @@
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/org/semux/api/swagger/v2.4.0.json</inputSpec>
<inputSpec>${project.basedir}/src/main/resources/org/semux/api/swagger/v2.5.0.json</inputSpec>
<language>jaxrs-cxf-client</language>
<configOptions>
<useBeanValidation>false</useBeanValidation>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/semux/api/ApiHandlerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public ApiHandlerImpl(Kernel kernel) {
this.routes.put(ApiVersion.v2_2_0, routesV2);
this.routes.put(ApiVersion.v2_3_0, routesV2);
this.routes.put(ApiVersion.v2_4_0, routesV2);
this.routes.put(ApiVersion.v2_5_0, routesV2);
}

private void load(Map<ImmutablePair<HttpMethod, String>, Route> routes, SemuxApi impl,
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/org/semux/api/ApiVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ public enum ApiVersion {

v2_3_0("v2.3.0"),

v2_4_0("v2.4.0");
v2_4_0("v2.4.0"),

public final static ApiVersion DEFAULT = v2_4_0;
v2_5_0("v2.5.0");

public final static ApiVersion DEFAULT = v2_5_0;

public final String prefix;

Expand Down
15 changes: 0 additions & 15 deletions src/main/java/org/semux/api/v2/SemuxApiImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,6 @@ public Response broadcastRawTransaction(String raw) {
}
}

@Override
public Response broadcastRawTransactionDeprecated(String raw) {
return broadcastRawTransaction(raw);
}

@Override
public Response signMessage(String address, String message) {
try {
Expand Down Expand Up @@ -1023,14 +1018,4 @@ private byte[] parseHex(String data, boolean required, String name) {
throw new IllegalArgumentException("Parameter `" + name + "` is not a valid hexadecimal string");
}
}

@Override
public Response createAccountDeprecated(String name, String privateKey) {
return createAccount(name, privateKey);
}

@Override
public Response deleteAccountDeprecated(String address) {
return deleteAccount(address);
}
}
2 changes: 1 addition & 1 deletion src/main/java/org/semux/gui/MainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
import org.semux.core.Wallet;
import org.semux.gui.dialog.InputDialog;
import org.semux.gui.model.WalletModel;
import org.semux.gui.panel.SendPanel;
import org.semux.gui.panel.DelegatesPanel;
import org.semux.gui.panel.HomePanel;
import org.semux.gui.panel.ReceivePanel;
import org.semux.gui.panel.SendPanel;
import org.semux.gui.panel.TransactionsPanel;
import org.semux.message.GuiMessages;
import org.semux.util.exception.UnreachableException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/org/semux/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

// Build a system
window.ui = SwaggerUIBundle({
url: "./swagger/v2.4.0.json",
url: "./swagger/v2.5.0.json",
validatorUrl : false,
dom_id: '#swagger-ui',
deepLinking: true,
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/org/semux/api/swagger/v2.4.0.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"basePath": "/v2.4.0",
"basePath": "/v2.5.0",
"consumes": [
"application/x-www-form-urlencoded"
],
Expand Down
Loading

0 comments on commit e1016e3

Please sign in to comment.