Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
@Data
@Schema(name = "CacheStats", description = "Statistics about the performance of a Cache.")
public class CacheStatsDTO {
@Schema(name = "cacheName", description = "The cahce name.")
@Schema(name = "cacheName", description = "The cache name.")
private String cacheName;
@NonNull
@Schema(name = "hitCount", description = "The number of times Cache lookup methods have returned a cached value.")
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ public class PeerDTO extends BaseDTO {
private Integer state;
private String announcedAddress;
private Boolean sharedAddress;
private String halmark;
private String hallmark;
private Integer weight;
private Long downloadedVolume;
private Long uploadedVolume;
Expand Down
3 changes: 3 additions & 0 deletions apl-api2/pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,6 +111,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
Expand DownExpand Up@@ -179,6 +180,8 @@
<regex>false</regex>
</configuration>
</plugin>


</plugins>
</build>
<dependencies>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v2;
Expand Down
14 changes: 14 additions & 0 deletions apl-api3/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
The Swagger Codegen project - https://github.com/swagger-api/swagger-codegen/tree/3.0.0

To build package, please execute the following:

```
mvn clean package
```

To run swagger editor from DockerHub, please execute the following:

```
docker pull swaggerapi/swagger-editor
docker run -d -p 80:8080 swaggerapi/swagger-editor
```
214 changes: 214 additions & 0 deletions apl-api3/pom.xml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.apollocurrency</groupId>
<artifactId>apollo-blockchain</artifactId>
<version>2.0.1</version>
</parent>

<artifactId>apl-api3</artifactId>
<name>apl-api3</name>
<packaging>jar</packaging>

<properties>
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<swagger-core-version>2.0.0</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<resteasy-version>3.0.11.Final</resteasy-version>
<slf4j-version>1.6.3</slf4j-version>
<junit-version>4.8.1</junit-version>
<servlet-api-version>2.5</servlet-api-version>
<swagger-codegen-maven-plugin.version>3.0.36</swagger-codegen-maven-plugin.version>
</properties>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- to resolve swagger codegen issue on windows -->
<excludes>
<exclude>com/apollocurrency/aplwallet/api/impl/v3/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>
src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<configuration>
<tasks>
<!-- @Path("/@@ @Path("/v2/ -->
<replace token= "@Path(&#34;/&#64;&#64;" value="@Path(&#34;/v3/" dir="src/gen/java">
<include name="**/*Api.java"/>
</replace>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
<executions>
<execution>
<id>clean-webapp</id>
<phase>process-sources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp</directory>
</fileset>
<fileset>
<directory>src/genimpl</directory>
</fileset>
</filesets>
</configuration>
</execution>
<execution>
<id>clean-source</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/gen/java</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger-codegen-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/yaml/apollo-api-v3.yaml</inputSpec>
<output>${project.basedir}</output>
<language>jaxrs-resteasy</language>
<artifactId>apl-api3</artifactId>
<groupId>com.apollocurrency</groupId>
<apiPackage>com.apollocurrency.aplwallet.api.v3</apiPackage>
<modelPackage>com.apollocurrency.aplwallet.api.v3.model</modelPackage>
<invokerPackage>com.apollocurrency.aplwallet.api</invokerPackage>
<skipOverwrite>true</skipOverwrite>
<generateApiTests>true</generateApiTests>
<generateSupportingFiles>false</generateSupportingFiles>
<supportingFilesToGenerate>ApiException.java,NotFoundException.java</supportingFilesToGenerate>
<modelsToGenerate>
AccountInfo,AccountInfoResp,AccountAssetsResp,AccountCurrenciesResp,AccountReq,AccountReqTest,AccountReqSendMoney,AssetBalance,BlockchainInfo,BlockInfo,BlockchainState,BlockInfoResponse,BlockInfoListResponse,Currency,CountResponse,CacheInfo,CacheInfoResponse,CreateChildAccountResp,EmptyResponse,ForgerInfo,ForgersInfoResponse,FullHealthInfo,FullPeerInfo,HealthPrivateInfo,HealthPublicInfo,HealthResponse,NetworkResponse,NodeStatusInfo,ListLogs,ListResponse,PeerPublicInfo,PeerPrivateInfo,PrivateHealthResponse,PublicHealthResponse,TasksInfoResponse,ThreadsInfoResponse,QueryCountResult,QueryObject,QueryResult,TasksInfo,TransactionInfo,TransactionInfoArrayResp,TransactionInfoResp,ThreadsInfo,ThreadsInfoResponse,TxReceipt,TxRequest,PublishContractReq,CallContractMethodReq,ContractListResponse,ContractDetails,ContractDetailsResponse,ContractStateResponse,ContractMethod,CallMethodResult,TransactionArrayResp,CallViewMethodReq,ResultValueResponse,MemberSpec,PropertySpec,ArgSpec,ContractSpecResponse,CurrencyBurningTxCreationRequest,TransactionCreationRequest,TransactionCreationResponse,UnconfirmedTransactionInfo,CurrencyBurningTxParams,AddressSpec,AddressSpecResponse,TransactionVerificationResponse,LastTransactionVerificationResponse,TransactionVerification,StringListResponse,ModuleSourceResponse,ModuleListResponse,AsrSpec,AsrSpecResponse,AsrMemberSpec,ContractEventsRequest,ContractEventsResponse,ContractEventDetails,X509Response
</modelsToGenerate>
<configHelp>false</configHelp>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
<implFolder>src/genimpl/java</implFolder>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<fullJavaUtil>true</fullJavaUtil>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>${project.basedir}/src/gen/java/**/*.java</include>
</includes>
<replacements>
<replacement>
<token>javax.inject</token>
<value>jakarta.inject</value>
</replacement>
<replacement>
<token>javax.validation</token>
<value>jakarta.validation</value>
</replacement>
<replacement>
<token>javax.ws</token>
<value>jakarta.ws</value>
</replacement>
</replacements>
<regex>false</regex>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
</dependency>
<!-- Bean Validation API support -->
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
*/
Comment thread
yuriy-ln marked this conversation as resolved.

package com.apollocurrency.aplwallet.api.v3;

public class NotFoundException extends jakarta.ws.rs.NotFoundException {

public NotFoundException(String msg) {
super(msg);
}
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
/*
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v3.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Objects;


public class BaseResponse {
private static final String PROTOCOL_VERSION = "2";
private String protocol = PROTOCOL_VERSION;
private Long requestProcessingTime = 0L;

/**
* Protocol version
**/

@Schema(example = "2", description = "Protocol version")
@JsonProperty("protocol")
public String getProtocol() {
return protocol;
}

public void setProtocol(String protocol) {
this.protocol = protocol;
}

/**
* Time in milliseconds that took from incoming request to response
**/

@Schema(example = "12", description = "Time in milliseconds that took from incoming request to response")
@JsonProperty("requestProcessingTime")
public Long getRequestProcessingTime() {
return requestProcessingTime;
}

public void setRequestProcessingTime(Long requestProcessingTime) {
this.requestProcessingTime = requestProcessingTime;
}


@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BaseResponse baseResponse = (BaseResponse) o;
return Objects.equals(protocol, baseResponse.protocol) &&
Objects.equals(requestProcessingTime, baseResponse.requestProcessingTime);
}

@Override
public int hashCode() {
return Objects.hash(protocol, requestProcessingTime);
}

@Override
public String toString() {

return "BaseResponse{" +
"protocol= '" + protocol + '\'' +
", requestProcessingTime= " + requestProcessingTime +
'}';
}
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
@Data
@Schema(name = "CacheStats", description = "Statistics about the performance of a Cache.")
public class CacheStatsDTO {
@Schema(name = "cacheName", description = "The cahce name.")
@Schema(name = "cacheName", description = "The cache name.")
private String cacheName;
@NonNull
@Schema(name = "hitCount", description = "The number of times Cache lookup methods have returned a cached value.")
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ public class PeerDTO extends BaseDTO {
private Integer state;
private String announcedAddress;
private Boolean sharedAddress;
private String halmark;
private String hallmark;
private Integer weight;
private Long downloadedVolume;
private Long uploadedVolume;
Expand Down
3 changes: 3 additions & 0 deletions apl-api2/pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,6 +111,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
Expand DownExpand Up@@ -179,6 +180,8 @@
<regex>false</regex>
</configuration>
</plugin>


</plugins>
</build>
<dependencies>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v2;
Expand Down
14 changes: 14 additions & 0 deletions apl-api3/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
The Swagger Codegen project - https://github.com/swagger-api/swagger-codegen/tree/3.0.0

To build package, please execute the following:

```
mvn clean package
```

To run swagger editor from DockerHub, please execute the following:

```
docker pull swaggerapi/swagger-editor
docker run -d -p 80:8080 swaggerapi/swagger-editor
```
214 changes: 214 additions & 0 deletions apl-api3/pom.xml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.apollocurrency</groupId>
<artifactId>apollo-blockchain</artifactId>
<version>2.0.1</version>
</parent>

<artifactId>apl-api3</artifactId>
<name>apl-api3</name>
<packaging>jar</packaging>

<properties>
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<swagger-core-version>2.0.0</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<resteasy-version>3.0.11.Final</resteasy-version>
<slf4j-version>1.6.3</slf4j-version>
<junit-version>4.8.1</junit-version>
<servlet-api-version>2.5</servlet-api-version>
<swagger-codegen-maven-plugin.version>3.0.36</swagger-codegen-maven-plugin.version>
</properties>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- to resolve swagger codegen issue on windows -->
<excludes>
<exclude>com/apollocurrency/aplwallet/api/impl/v3/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>
src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<configuration>
<tasks>
<!-- @Path("/@@ @Path("/v2/ -->
<replace token= "@Path(&#34;/&#64;&#64;" value="@Path(&#34;/v3/" dir="src/gen/java">
<include name="**/*Api.java"/>
</replace>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
<executions>
<execution>
<id>clean-webapp</id>
<phase>process-sources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp</directory>
</fileset>
<fileset>
<directory>src/genimpl</directory>
</fileset>
</filesets>
</configuration>
</execution>
<execution>
<id>clean-source</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/gen/java</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger-codegen-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/yaml/apollo-api-v3.yaml</inputSpec>
<output>${project.basedir}</output>
<language>jaxrs-resteasy</language>
<artifactId>apl-api3</artifactId>
<groupId>com.apollocurrency</groupId>
<apiPackage>com.apollocurrency.aplwallet.api.v3</apiPackage>
<modelPackage>com.apollocurrency.aplwallet.api.v3.model</modelPackage>
<invokerPackage>com.apollocurrency.aplwallet.api</invokerPackage>
<skipOverwrite>true</skipOverwrite>
<generateApiTests>true</generateApiTests>
<generateSupportingFiles>false</generateSupportingFiles>
<supportingFilesToGenerate>ApiException.java,NotFoundException.java</supportingFilesToGenerate>
<modelsToGenerate>
AccountInfo,AccountInfoResp,AccountAssetsResp,AccountCurrenciesResp,AccountReq,AccountReqTest,AccountReqSendMoney,AssetBalance,BlockchainInfo,BlockInfo,BlockchainState,BlockInfoResponse,BlockInfoListResponse,Currency,CountResponse,CacheInfo,CacheInfoResponse,CreateChildAccountResp,EmptyResponse,ForgerInfo,ForgersInfoResponse,FullHealthInfo,FullPeerInfo,HealthPrivateInfo,HealthPublicInfo,HealthResponse,NetworkResponse,NodeStatusInfo,ListLogs,ListResponse,PeerPublicInfo,PeerPrivateInfo,PrivateHealthResponse,PublicHealthResponse,TasksInfoResponse,ThreadsInfoResponse,QueryCountResult,QueryObject,QueryResult,TasksInfo,TransactionInfo,TransactionInfoArrayResp,TransactionInfoResp,ThreadsInfo,ThreadsInfoResponse,TxReceipt,TxRequest,PublishContractReq,CallContractMethodReq,ContractListResponse,ContractDetails,ContractDetailsResponse,ContractStateResponse,ContractMethod,CallMethodResult,TransactionArrayResp,CallViewMethodReq,ResultValueResponse,MemberSpec,PropertySpec,ArgSpec,ContractSpecResponse,CurrencyBurningTxCreationRequest,TransactionCreationRequest,TransactionCreationResponse,UnconfirmedTransactionInfo,CurrencyBurningTxParams,AddressSpec,AddressSpecResponse,TransactionVerificationResponse,LastTransactionVerificationResponse,TransactionVerification,StringListResponse,ModuleSourceResponse,ModuleListResponse,AsrSpec,AsrSpecResponse,AsrMemberSpec,ContractEventsRequest,ContractEventsResponse,ContractEventDetails,X509Response
</modelsToGenerate>
<configHelp>false</configHelp>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
<implFolder>src/genimpl/java</implFolder>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<fullJavaUtil>true</fullJavaUtil>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>${project.basedir}/src/gen/java/**/*.java</include>
</includes>
<replacements>
<replacement>
<token>javax.inject</token>
<value>jakarta.inject</value>
</replacement>
<replacement>
<token>javax.validation</token>
<value>jakarta.validation</value>
</replacement>
<replacement>
<token>javax.ws</token>
<value>jakarta.ws</value>
</replacement>
</replacements>
<regex>false</regex>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
</dependency>
<!-- Bean Validation API support -->
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
*/
Comment thread
yuriy-ln marked this conversation as resolved.

package com.apollocurrency.aplwallet.api.v3;

public class NotFoundException extends jakarta.ws.rs.NotFoundException {

public NotFoundException(String msg) {
super(msg);
}
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
/*
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v3.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Objects;


public class BaseResponse {
private static final String PROTOCOL_VERSION = "2";
private String protocol = PROTOCOL_VERSION;
private Long requestProcessingTime = 0L;

/**
* Protocol version
**/

@Schema(example = "2", description = "Protocol version")
@JsonProperty("protocol")
public String getProtocol() {
return protocol;
}

public void setProtocol(String protocol) {
this.protocol = protocol;
}

/**
* Time in milliseconds that took from incoming request to response
**/

@Schema(example = "12", description = "Time in milliseconds that took from incoming request to response")
@JsonProperty("requestProcessingTime")
public Long getRequestProcessingTime() {
return requestProcessingTime;
}

public void setRequestProcessingTime(Long requestProcessingTime) {
this.requestProcessingTime = requestProcessingTime;
}


@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BaseResponse baseResponse = (BaseResponse) o;
return Objects.equals(protocol, baseResponse.protocol) &&
Objects.equals(requestProcessingTime, baseResponse.requestProcessingTime);
}

@Override
public int hashCode() {
return Objects.hash(protocol, requestProcessingTime);
}

@Override
public String toString() {

return "BaseResponse{" +
"protocol= '" + protocol + '\'' +
", requestProcessingTime= " + requestProcessingTime +
'}';
}
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
@Data
@Schema(name = "CacheStats", description = "Statistics about the performance of a Cache.")
public class CacheStatsDTO {
@Schema(name = "cacheName", description = "The cahce name.")
@Schema(name = "cacheName", description = "The cache name.")
private String cacheName;
@NonNull
@Schema(name = "hitCount", description = "The number of times Cache lookup methods have returned a cached value.")
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ public class PeerDTO extends BaseDTO {
private Integer state;
private String announcedAddress;
private Boolean sharedAddress;
private String halmark;
private String hallmark;
private Integer weight;
private Long downloadedVolume;
private Long uploadedVolume;
Expand Down
3 changes: 3 additions & 0 deletions apl-api2/pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,6 +111,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
Expand DownExpand Up@@ -179,6 +180,8 @@
<regex>false</regex>
</configuration>
</plugin>


</plugins>
</build>
<dependencies>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v2;
Expand Down
14 changes: 14 additions & 0 deletions apl-api3/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
The Swagger Codegen project - https://github.com/swagger-api/swagger-codegen/tree/3.0.0

To build package, please execute the following:

```
mvn clean package
```

To run swagger editor from DockerHub, please execute the following:

```
docker pull swaggerapi/swagger-editor
docker run -d -p 80:8080 swaggerapi/swagger-editor
```
214 changes: 214 additions & 0 deletions apl-api3/pom.xml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.apollocurrency</groupId>
<artifactId>apollo-blockchain</artifactId>
<version>2.0.1</version>
</parent>

<artifactId>apl-api3</artifactId>
<name>apl-api3</name>
<packaging>jar</packaging>

<properties>
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<swagger-core-version>2.0.0</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<resteasy-version>3.0.11.Final</resteasy-version>
<slf4j-version>1.6.3</slf4j-version>
<junit-version>4.8.1</junit-version>
<servlet-api-version>2.5</servlet-api-version>
<swagger-codegen-maven-plugin.version>3.0.36</swagger-codegen-maven-plugin.version>
</properties>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- to resolve swagger codegen issue on windows -->
<excludes>
<exclude>com/apollocurrency/aplwallet/api/impl/v3/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>
src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<configuration>
<tasks>
<!-- @Path("/@@ @Path("/v2/ -->
<replace token= "@Path(&#34;/&#64;&#64;" value="@Path(&#34;/v3/" dir="src/gen/java">
<include name="**/*Api.java"/>
</replace>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
<executions>
<execution>
<id>clean-webapp</id>
<phase>process-sources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp</directory>
</fileset>
<fileset>
<directory>src/genimpl</directory>
</fileset>
</filesets>
</configuration>
</execution>
<execution>
<id>clean-source</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/gen/java</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger-codegen-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/yaml/apollo-api-v3.yaml</inputSpec>
<output>${project.basedir}</output>
<language>jaxrs-resteasy</language>
<artifactId>apl-api3</artifactId>
<groupId>com.apollocurrency</groupId>
<apiPackage>com.apollocurrency.aplwallet.api.v3</apiPackage>
<modelPackage>com.apollocurrency.aplwallet.api.v3.model</modelPackage>
<invokerPackage>com.apollocurrency.aplwallet.api</invokerPackage>
<skipOverwrite>true</skipOverwrite>
<generateApiTests>true</generateApiTests>
<generateSupportingFiles>false</generateSupportingFiles>
<supportingFilesToGenerate>ApiException.java,NotFoundException.java</supportingFilesToGenerate>
<modelsToGenerate>
AccountInfo,AccountInfoResp,AccountAssetsResp,AccountCurrenciesResp,AccountReq,AccountReqTest,AccountReqSendMoney,AssetBalance,BlockchainInfo,BlockInfo,BlockchainState,BlockInfoResponse,BlockInfoListResponse,Currency,CountResponse,CacheInfo,CacheInfoResponse,CreateChildAccountResp,EmptyResponse,ForgerInfo,ForgersInfoResponse,FullHealthInfo,FullPeerInfo,HealthPrivateInfo,HealthPublicInfo,HealthResponse,NetworkResponse,NodeStatusInfo,ListLogs,ListResponse,PeerPublicInfo,PeerPrivateInfo,PrivateHealthResponse,PublicHealthResponse,TasksInfoResponse,ThreadsInfoResponse,QueryCountResult,QueryObject,QueryResult,TasksInfo,TransactionInfo,TransactionInfoArrayResp,TransactionInfoResp,ThreadsInfo,ThreadsInfoResponse,TxReceipt,TxRequest,PublishContractReq,CallContractMethodReq,ContractListResponse,ContractDetails,ContractDetailsResponse,ContractStateResponse,ContractMethod,CallMethodResult,TransactionArrayResp,CallViewMethodReq,ResultValueResponse,MemberSpec,PropertySpec,ArgSpec,ContractSpecResponse,CurrencyBurningTxCreationRequest,TransactionCreationRequest,TransactionCreationResponse,UnconfirmedTransactionInfo,CurrencyBurningTxParams,AddressSpec,AddressSpecResponse,TransactionVerificationResponse,LastTransactionVerificationResponse,TransactionVerification,StringListResponse,ModuleSourceResponse,ModuleListResponse,AsrSpec,AsrSpecResponse,AsrMemberSpec,ContractEventsRequest,ContractEventsResponse,ContractEventDetails,X509Response
</modelsToGenerate>
<configHelp>false</configHelp>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
<implFolder>src/genimpl/java</implFolder>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<fullJavaUtil>true</fullJavaUtil>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>${project.basedir}/src/gen/java/**/*.java</include>
</includes>
<replacements>
<replacement>
<token>javax.inject</token>
<value>jakarta.inject</value>
</replacement>
<replacement>
<token>javax.validation</token>
<value>jakarta.validation</value>
</replacement>
<replacement>
<token>javax.ws</token>
<value>jakarta.ws</value>
</replacement>
</replacements>
<regex>false</regex>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
</dependency>
<!-- Bean Validation API support -->
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
*/
Comment thread
yuriy-ln marked this conversation as resolved.

package com.apollocurrency.aplwallet.api.v3;

public class NotFoundException extends jakarta.ws.rs.NotFoundException {

public NotFoundException(String msg) {
super(msg);
}
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
/*
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v3.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Objects;


public class BaseResponse {
private static final String PROTOCOL_VERSION = "2";
private String protocol = PROTOCOL_VERSION;
private Long requestProcessingTime = 0L;

/**
* Protocol version
**/

@Schema(example = "2", description = "Protocol version")
@JsonProperty("protocol")
public String getProtocol() {
return protocol;
}

public void setProtocol(String protocol) {
this.protocol = protocol;
}

/**
* Time in milliseconds that took from incoming request to response
**/

@Schema(example = "12", description = "Time in milliseconds that took from incoming request to response")
@JsonProperty("requestProcessingTime")
public Long getRequestProcessingTime() {
return requestProcessingTime;
}

public void setRequestProcessingTime(Long requestProcessingTime) {
this.requestProcessingTime = requestProcessingTime;
}


@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BaseResponse baseResponse = (BaseResponse) o;
return Objects.equals(protocol, baseResponse.protocol) &&
Objects.equals(requestProcessingTime, baseResponse.requestProcessingTime);
}

@Override
public int hashCode() {
return Objects.hash(protocol, requestProcessingTime);
}

@Override
public String toString() {

return "BaseResponse{" +
"protocol= '" + protocol + '\'' +
", requestProcessingTime= " + requestProcessingTime +
'}';
}
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
@Data
@Schema(name = "CacheStats", description = "Statistics about the performance of a Cache.")
public class CacheStatsDTO {
@Schema(name = "cacheName", description = "The cahce name.")
@Schema(name = "cacheName", description = "The cache name.")
private String cacheName;
@NonNull
@Schema(name = "hitCount", description = "The number of times Cache lookup methods have returned a cached value.")
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ public class PeerDTO extends BaseDTO {
private Integer state;
private String announcedAddress;
private Boolean sharedAddress;
private String halmark;
private String hallmark;
private Integer weight;
private Long downloadedVolume;
private Long uploadedVolume;
Expand Down
3 changes: 3 additions & 0 deletions apl-api2/pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,6 +111,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
Expand DownExpand Up@@ -179,6 +180,8 @@
<regex>false</regex>
</configuration>
</plugin>


</plugins>
</build>
<dependencies>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v2;
Expand Down
14 changes: 14 additions & 0 deletions apl-api3/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
The Swagger Codegen project - https://github.com/swagger-api/swagger-codegen/tree/3.0.0

To build package, please execute the following:

```
mvn clean package
```

To run swagger editor from DockerHub, please execute the following:

```
docker pull swaggerapi/swagger-editor
docker run -d -p 80:8080 swaggerapi/swagger-editor
```
214 changes: 214 additions & 0 deletions apl-api3/pom.xml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.apollocurrency</groupId>
<artifactId>apollo-blockchain</artifactId>
<version>2.0.1</version>
</parent>

<artifactId>apl-api3</artifactId>
<name>apl-api3</name>
<packaging>jar</packaging>

<properties>
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<swagger-core-version>2.0.0</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<resteasy-version>3.0.11.Final</resteasy-version>
<slf4j-version>1.6.3</slf4j-version>
<junit-version>4.8.1</junit-version>
<servlet-api-version>2.5</servlet-api-version>
<swagger-codegen-maven-plugin.version>3.0.36</swagger-codegen-maven-plugin.version>
</properties>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- to resolve swagger codegen issue on windows -->
<excludes>
<exclude>com/apollocurrency/aplwallet/api/impl/v3/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>
src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<configuration>
<tasks>
<!-- @Path("/@@ @Path("/v2/ -->
<replace token= "@Path(&#34;/&#64;&#64;" value="@Path(&#34;/v3/" dir="src/gen/java">
<include name="**/*Api.java"/>
</replace>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
<executions>
<execution>
<id>clean-webapp</id>
<phase>process-sources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp</directory>
</fileset>
<fileset>
<directory>src/genimpl</directory>
</fileset>
</filesets>
</configuration>
</execution>
<execution>
<id>clean-source</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/gen/java</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger-codegen-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/yaml/apollo-api-v3.yaml</inputSpec>
<output>${project.basedir}</output>
<language>jaxrs-resteasy</language>
<artifactId>apl-api3</artifactId>
<groupId>com.apollocurrency</groupId>
<apiPackage>com.apollocurrency.aplwallet.api.v3</apiPackage>
<modelPackage>com.apollocurrency.aplwallet.api.v3.model</modelPackage>
<invokerPackage>com.apollocurrency.aplwallet.api</invokerPackage>
<skipOverwrite>true</skipOverwrite>
<generateApiTests>true</generateApiTests>
<generateSupportingFiles>false</generateSupportingFiles>
<supportingFilesToGenerate>ApiException.java,NotFoundException.java</supportingFilesToGenerate>
<modelsToGenerate>
AccountInfo,AccountInfoResp,AccountAssetsResp,AccountCurrenciesResp,AccountReq,AccountReqTest,AccountReqSendMoney,AssetBalance,BlockchainInfo,BlockInfo,BlockchainState,BlockInfoResponse,BlockInfoListResponse,Currency,CountResponse,CacheInfo,CacheInfoResponse,CreateChildAccountResp,EmptyResponse,ForgerInfo,ForgersInfoResponse,FullHealthInfo,FullPeerInfo,HealthPrivateInfo,HealthPublicInfo,HealthResponse,NetworkResponse,NodeStatusInfo,ListLogs,ListResponse,PeerPublicInfo,PeerPrivateInfo,PrivateHealthResponse,PublicHealthResponse,TasksInfoResponse,ThreadsInfoResponse,QueryCountResult,QueryObject,QueryResult,TasksInfo,TransactionInfo,TransactionInfoArrayResp,TransactionInfoResp,ThreadsInfo,ThreadsInfoResponse,TxReceipt,TxRequest,PublishContractReq,CallContractMethodReq,ContractListResponse,ContractDetails,ContractDetailsResponse,ContractStateResponse,ContractMethod,CallMethodResult,TransactionArrayResp,CallViewMethodReq,ResultValueResponse,MemberSpec,PropertySpec,ArgSpec,ContractSpecResponse,CurrencyBurningTxCreationRequest,TransactionCreationRequest,TransactionCreationResponse,UnconfirmedTransactionInfo,CurrencyBurningTxParams,AddressSpec,AddressSpecResponse,TransactionVerificationResponse,LastTransactionVerificationResponse,TransactionVerification,StringListResponse,ModuleSourceResponse,ModuleListResponse,AsrSpec,AsrSpecResponse,AsrMemberSpec,ContractEventsRequest,ContractEventsResponse,ContractEventDetails,X509Response
</modelsToGenerate>
<configHelp>false</configHelp>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
<implFolder>src/genimpl/java</implFolder>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<fullJavaUtil>true</fullJavaUtil>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>${project.basedir}/src/gen/java/**/*.java</include>
</includes>
<replacements>
<replacement>
<token>javax.inject</token>
<value>jakarta.inject</value>
</replacement>
<replacement>
<token>javax.validation</token>
<value>jakarta.validation</value>
</replacement>
<replacement>
<token>javax.ws</token>
<value>jakarta.ws</value>
</replacement>
</replacements>
<regex>false</regex>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
</dependency>
<!-- Bean Validation API support -->
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
*/
Comment thread
yuriy-ln marked this conversation as resolved.

package com.apollocurrency.aplwallet.api.v3;

public class NotFoundException extends jakarta.ws.rs.NotFoundException {

public NotFoundException(String msg) {
super(msg);
}
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
/*
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v3.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Objects;


public class BaseResponse {
private static final String PROTOCOL_VERSION = "2";
private String protocol = PROTOCOL_VERSION;
private Long requestProcessingTime = 0L;

/**
* Protocol version
**/

@Schema(example = "2", description = "Protocol version")
@JsonProperty("protocol")
public String getProtocol() {
return protocol;
}

public void setProtocol(String protocol) {
this.protocol = protocol;
}

/**
* Time in milliseconds that took from incoming request to response
**/

@Schema(example = "12", description = "Time in milliseconds that took from incoming request to response")
@JsonProperty("requestProcessingTime")
public Long getRequestProcessingTime() {
return requestProcessingTime;
}

public void setRequestProcessingTime(Long requestProcessingTime) {
this.requestProcessingTime = requestProcessingTime;
}


@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BaseResponse baseResponse = (BaseResponse) o;
return Objects.equals(protocol, baseResponse.protocol) &&
Objects.equals(requestProcessingTime, baseResponse.requestProcessingTime);
}

@Override
public int hashCode() {
return Objects.hash(protocol, requestProcessingTime);
}

@Override
public String toString() {

return "BaseResponse{" +
"protocol= '" + protocol + '\'' +
", requestProcessingTime= " + requestProcessingTime +
'}';
}
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
@Data
@Schema(name = "CacheStats", description = "Statistics about the performance of a Cache.")
public class CacheStatsDTO {
@Schema(name = "cacheName", description = "The cahce name.")
@Schema(name = "cacheName", description = "The cache name.")
private String cacheName;
@NonNull
@Schema(name = "hitCount", description = "The number of times Cache lookup methods have returned a cached value.")
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ public class PeerDTO extends BaseDTO {
private Integer state;
private String announcedAddress;
private Boolean sharedAddress;
private String halmark;
private String hallmark;
private Integer weight;
private Long downloadedVolume;
private Long uploadedVolume;
Expand Down
3 changes: 3 additions & 0 deletions apl-api2/pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,6 +111,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
Expand DownExpand Up@@ -179,6 +180,8 @@
<regex>false</regex>
</configuration>
</plugin>


</plugins>
</build>
<dependencies>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v2;
Expand Down
14 changes: 14 additions & 0 deletions apl-api3/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
The Swagger Codegen project - https://github.com/swagger-api/swagger-codegen/tree/3.0.0

To build package, please execute the following:

```
mvn clean package
```

To run swagger editor from DockerHub, please execute the following:

```
docker pull swaggerapi/swagger-editor
docker run -d -p 80:8080 swaggerapi/swagger-editor
```
214 changes: 214 additions & 0 deletions apl-api3/pom.xml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.apollocurrency</groupId>
<artifactId>apollo-blockchain</artifactId>
<version>2.0.1</version>
</parent>

<artifactId>apl-api3</artifactId>
<name>apl-api3</name>
<packaging>jar</packaging>

<properties>
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<swagger-core-version>2.0.0</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<resteasy-version>3.0.11.Final</resteasy-version>
<slf4j-version>1.6.3</slf4j-version>
<junit-version>4.8.1</junit-version>
<servlet-api-version>2.5</servlet-api-version>
<swagger-codegen-maven-plugin.version>3.0.36</swagger-codegen-maven-plugin.version>
</properties>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- to resolve swagger codegen issue on windows -->
<excludes>
<exclude>com/apollocurrency/aplwallet/api/impl/v3/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>
src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<configuration>
<tasks>
<!-- @Path("/@@ @Path("/v2/ -->
<replace token= "@Path(&#34;/&#64;&#64;" value="@Path(&#34;/v3/" dir="src/gen/java">
<include name="**/*Api.java"/>
</replace>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
<executions>
<execution>
<id>clean-webapp</id>
<phase>process-sources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp</directory>
</fileset>
<fileset>
<directory>src/genimpl</directory>
</fileset>
</filesets>
</configuration>
</execution>
<execution>
<id>clean-source</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/gen/java</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger-codegen-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/yaml/apollo-api-v3.yaml</inputSpec>
<output>${project.basedir}</output>
<language>jaxrs-resteasy</language>
<artifactId>apl-api3</artifactId>
<groupId>com.apollocurrency</groupId>
<apiPackage>com.apollocurrency.aplwallet.api.v3</apiPackage>
<modelPackage>com.apollocurrency.aplwallet.api.v3.model</modelPackage>
<invokerPackage>com.apollocurrency.aplwallet.api</invokerPackage>
<skipOverwrite>true</skipOverwrite>
<generateApiTests>true</generateApiTests>
<generateSupportingFiles>false</generateSupportingFiles>
<supportingFilesToGenerate>ApiException.java,NotFoundException.java</supportingFilesToGenerate>
<modelsToGenerate>
AccountInfo,AccountInfoResp,AccountAssetsResp,AccountCurrenciesResp,AccountReq,AccountReqTest,AccountReqSendMoney,AssetBalance,BlockchainInfo,BlockInfo,BlockchainState,BlockInfoResponse,BlockInfoListResponse,Currency,CountResponse,CacheInfo,CacheInfoResponse,CreateChildAccountResp,EmptyResponse,ForgerInfo,ForgersInfoResponse,FullHealthInfo,FullPeerInfo,HealthPrivateInfo,HealthPublicInfo,HealthResponse,NetworkResponse,NodeStatusInfo,ListLogs,ListResponse,PeerPublicInfo,PeerPrivateInfo,PrivateHealthResponse,PublicHealthResponse,TasksInfoResponse,ThreadsInfoResponse,QueryCountResult,QueryObject,QueryResult,TasksInfo,TransactionInfo,TransactionInfoArrayResp,TransactionInfoResp,ThreadsInfo,ThreadsInfoResponse,TxReceipt,TxRequest,PublishContractReq,CallContractMethodReq,ContractListResponse,ContractDetails,ContractDetailsResponse,ContractStateResponse,ContractMethod,CallMethodResult,TransactionArrayResp,CallViewMethodReq,ResultValueResponse,MemberSpec,PropertySpec,ArgSpec,ContractSpecResponse,CurrencyBurningTxCreationRequest,TransactionCreationRequest,TransactionCreationResponse,UnconfirmedTransactionInfo,CurrencyBurningTxParams,AddressSpec,AddressSpecResponse,TransactionVerificationResponse,LastTransactionVerificationResponse,TransactionVerification,StringListResponse,ModuleSourceResponse,ModuleListResponse,AsrSpec,AsrSpecResponse,AsrMemberSpec,ContractEventsRequest,ContractEventsResponse,ContractEventDetails,X509Response
</modelsToGenerate>
<configHelp>false</configHelp>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
<implFolder>src/genimpl/java</implFolder>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<fullJavaUtil>true</fullJavaUtil>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>${project.basedir}/src/gen/java/**/*.java</include>
</includes>
<replacements>
<replacement>
<token>javax.inject</token>
<value>jakarta.inject</value>
</replacement>
<replacement>
<token>javax.validation</token>
<value>jakarta.validation</value>
</replacement>
<replacement>
<token>javax.ws</token>
<value>jakarta.ws</value>
</replacement>
</replacements>
<regex>false</regex>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
</dependency>
<!-- Bean Validation API support -->
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
*/
Comment thread
yuriy-ln marked this conversation as resolved.

package com.apollocurrency.aplwallet.api.v3;

public class NotFoundException extends jakarta.ws.rs.NotFoundException {

public NotFoundException(String msg) {
super(msg);
}
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
/*
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v3.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Objects;


public class BaseResponse {
private static final String PROTOCOL_VERSION = "2";
private String protocol = PROTOCOL_VERSION;
private Long requestProcessingTime = 0L;

/**
* Protocol version
**/

@Schema(example = "2", description = "Protocol version")
@JsonProperty("protocol")
public String getProtocol() {
return protocol;
}

public void setProtocol(String protocol) {
this.protocol = protocol;
}

/**
* Time in milliseconds that took from incoming request to response
**/

@Schema(example = "12", description = "Time in milliseconds that took from incoming request to response")
@JsonProperty("requestProcessingTime")
public Long getRequestProcessingTime() {
return requestProcessingTime;
}

public void setRequestProcessingTime(Long requestProcessingTime) {
this.requestProcessingTime = requestProcessingTime;
}


@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BaseResponse baseResponse = (BaseResponse) o;
return Objects.equals(protocol, baseResponse.protocol) &&
Objects.equals(requestProcessingTime, baseResponse.requestProcessingTime);
}

@Override
public int hashCode() {
return Objects.hash(protocol, requestProcessingTime);
}

@Override
public String toString() {

return "BaseResponse{" +
"protocol= '" + protocol + '\'' +
", requestProcessingTime= " + requestProcessingTime +
'}';
}
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
@Data
@Schema(name = "CacheStats", description = "Statistics about the performance of a Cache.")
public class CacheStatsDTO {
@Schema(name = "cacheName", description = "The cahce name.")
@Schema(name = "cacheName", description = "The cache name.")
private String cacheName;
@NonNull
@Schema(name = "hitCount", description = "The number of times Cache lookup methods have returned a cached value.")
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ public class PeerDTO extends BaseDTO {
private Integer state;
private String announcedAddress;
private Boolean sharedAddress;
private String halmark;
private String hallmark;
private Integer weight;
private Long downloadedVolume;
private Long uploadedVolume;
Expand Down
3 changes: 3 additions & 0 deletions apl-api2/pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,6 +111,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
Expand DownExpand Up@@ -179,6 +180,8 @@
<regex>false</regex>
</configuration>
</plugin>


</plugins>
</build>
<dependencies>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v2;
Expand Down
14 changes: 14 additions & 0 deletions apl-api3/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
The Swagger Codegen project - https://github.com/swagger-api/swagger-codegen/tree/3.0.0

To build package, please execute the following:

```
mvn clean package
```

To run swagger editor from DockerHub, please execute the following:

```
docker pull swaggerapi/swagger-editor
docker run -d -p 80:8080 swaggerapi/swagger-editor
```
214 changes: 214 additions & 0 deletions apl-api3/pom.xml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.apollocurrency</groupId>
<artifactId>apollo-blockchain</artifactId>
<version>2.0.1</version>
</parent>

<artifactId>apl-api3</artifactId>
<name>apl-api3</name>
<packaging>jar</packaging>

<properties>
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<swagger-core-version>2.0.0</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<resteasy-version>3.0.11.Final</resteasy-version>
<slf4j-version>1.6.3</slf4j-version>
<junit-version>4.8.1</junit-version>
<servlet-api-version>2.5</servlet-api-version>
<swagger-codegen-maven-plugin.version>3.0.36</swagger-codegen-maven-plugin.version>
</properties>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- to resolve swagger codegen issue on windows -->
<excludes>
<exclude>com/apollocurrency/aplwallet/api/impl/v3/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>
src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<configuration>
<tasks>
<!-- @Path("/@@ @Path("/v2/ -->
<replace token= "@Path(&#34;/&#64;&#64;" value="@Path(&#34;/v3/" dir="src/gen/java">
<include name="**/*Api.java"/>
</replace>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
<executions>
<execution>
<id>clean-webapp</id>
<phase>process-sources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp</directory>
</fileset>
<fileset>
<directory>src/genimpl</directory>
</fileset>
</filesets>
</configuration>
</execution>
<execution>
<id>clean-source</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/gen/java</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger-codegen-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/yaml/apollo-api-v3.yaml</inputSpec>
<output>${project.basedir}</output>
<language>jaxrs-resteasy</language>
<artifactId>apl-api3</artifactId>
<groupId>com.apollocurrency</groupId>
<apiPackage>com.apollocurrency.aplwallet.api.v3</apiPackage>
<modelPackage>com.apollocurrency.aplwallet.api.v3.model</modelPackage>
<invokerPackage>com.apollocurrency.aplwallet.api</invokerPackage>
<skipOverwrite>true</skipOverwrite>
<generateApiTests>true</generateApiTests>
<generateSupportingFiles>false</generateSupportingFiles>
<supportingFilesToGenerate>ApiException.java,NotFoundException.java</supportingFilesToGenerate>
<modelsToGenerate>
AccountInfo,AccountInfoResp,AccountAssetsResp,AccountCurrenciesResp,AccountReq,AccountReqTest,AccountReqSendMoney,AssetBalance,BlockchainInfo,BlockInfo,BlockchainState,BlockInfoResponse,BlockInfoListResponse,Currency,CountResponse,CacheInfo,CacheInfoResponse,CreateChildAccountResp,EmptyResponse,ForgerInfo,ForgersInfoResponse,FullHealthInfo,FullPeerInfo,HealthPrivateInfo,HealthPublicInfo,HealthResponse,NetworkResponse,NodeStatusInfo,ListLogs,ListResponse,PeerPublicInfo,PeerPrivateInfo,PrivateHealthResponse,PublicHealthResponse,TasksInfoResponse,ThreadsInfoResponse,QueryCountResult,QueryObject,QueryResult,TasksInfo,TransactionInfo,TransactionInfoArrayResp,TransactionInfoResp,ThreadsInfo,ThreadsInfoResponse,TxReceipt,TxRequest,PublishContractReq,CallContractMethodReq,ContractListResponse,ContractDetails,ContractDetailsResponse,ContractStateResponse,ContractMethod,CallMethodResult,TransactionArrayResp,CallViewMethodReq,ResultValueResponse,MemberSpec,PropertySpec,ArgSpec,ContractSpecResponse,CurrencyBurningTxCreationRequest,TransactionCreationRequest,TransactionCreationResponse,UnconfirmedTransactionInfo,CurrencyBurningTxParams,AddressSpec,AddressSpecResponse,TransactionVerificationResponse,LastTransactionVerificationResponse,TransactionVerification,StringListResponse,ModuleSourceResponse,ModuleListResponse,AsrSpec,AsrSpecResponse,AsrMemberSpec,ContractEventsRequest,ContractEventsResponse,ContractEventDetails,X509Response
</modelsToGenerate>
<configHelp>false</configHelp>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
<implFolder>src/genimpl/java</implFolder>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<fullJavaUtil>true</fullJavaUtil>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>${project.basedir}/src/gen/java/**/*.java</include>
</includes>
<replacements>
<replacement>
<token>javax.inject</token>
<value>jakarta.inject</value>
</replacement>
<replacement>
<token>javax.validation</token>
<value>jakarta.validation</value>
</replacement>
<replacement>
<token>javax.ws</token>
<value>jakarta.ws</value>
</replacement>
</replacements>
<regex>false</regex>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
</dependency>
<!-- Bean Validation API support -->
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
*/
Comment thread
yuriy-ln marked this conversation as resolved.

package com.apollocurrency.aplwallet.api.v3;

public class NotFoundException extends jakarta.ws.rs.NotFoundException {

public NotFoundException(String msg) {
super(msg);
}
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
/*
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v3.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Objects;


public class BaseResponse {
private static final String PROTOCOL_VERSION = "2";
private String protocol = PROTOCOL_VERSION;
private Long requestProcessingTime = 0L;

/**
* Protocol version
**/

@Schema(example = "2", description = "Protocol version")
@JsonProperty("protocol")
public String getProtocol() {
return protocol;
}

public void setProtocol(String protocol) {
this.protocol = protocol;
}

/**
* Time in milliseconds that took from incoming request to response
**/

@Schema(example = "12", description = "Time in milliseconds that took from incoming request to response")
@JsonProperty("requestProcessingTime")
public Long getRequestProcessingTime() {
return requestProcessingTime;
}

public void setRequestProcessingTime(Long requestProcessingTime) {
this.requestProcessingTime = requestProcessingTime;
}


@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BaseResponse baseResponse = (BaseResponse) o;
return Objects.equals(protocol, baseResponse.protocol) &&
Objects.equals(requestProcessingTime, baseResponse.requestProcessingTime);
}

@Override
public int hashCode() {
return Objects.hash(protocol, requestProcessingTime);
}

@Override
public String toString() {

return "BaseResponse{" +
"protocol= '" + protocol + '\'' +
", requestProcessingTime= " + requestProcessingTime +
'}';
}
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
@Data
@Schema(name = "CacheStats", description = "Statistics about the performance of a Cache.")
public class CacheStatsDTO {
@Schema(name = "cacheName", description = "The cahce name.")
@Schema(name = "cacheName", description = "The cache name.")
private String cacheName;
@NonNull
@Schema(name = "hitCount", description = "The number of times Cache lookup methods have returned a cached value.")
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ public class PeerDTO extends BaseDTO {
private Integer state;
private String announcedAddress;
private Boolean sharedAddress;
private String halmark;
private String hallmark;
private Integer weight;
private Long downloadedVolume;
private Long uploadedVolume;
Expand Down
3 changes: 3 additions & 0 deletions apl-api2/pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,6 +111,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
Expand DownExpand Up@@ -179,6 +180,8 @@
<regex>false</regex>
</configuration>
</plugin>


</plugins>
</build>
<dependencies>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v2;
Expand Down
14 changes: 14 additions & 0 deletions apl-api3/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
The Swagger Codegen project - https://github.com/swagger-api/swagger-codegen/tree/3.0.0

To build package, please execute the following:

```
mvn clean package
```

To run swagger editor from DockerHub, please execute the following:

```
docker pull swaggerapi/swagger-editor
docker run -d -p 80:8080 swaggerapi/swagger-editor
```
214 changes: 214 additions & 0 deletions apl-api3/pom.xml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.apollocurrency</groupId>
<artifactId>apollo-blockchain</artifactId>
<version>2.0.1</version>
</parent>

<artifactId>apl-api3</artifactId>
<name>apl-api3</name>
<packaging>jar</packaging>

<properties>
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<swagger-core-version>2.0.0</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<resteasy-version>3.0.11.Final</resteasy-version>
<slf4j-version>1.6.3</slf4j-version>
<junit-version>4.8.1</junit-version>
<servlet-api-version>2.5</servlet-api-version>
<swagger-codegen-maven-plugin.version>3.0.36</swagger-codegen-maven-plugin.version>
</properties>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- to resolve swagger codegen issue on windows -->
<excludes>
<exclude>com/apollocurrency/aplwallet/api/impl/v3/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>
src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<configuration>
<tasks>
<!-- @Path("/@@ @Path("/v2/ -->
<replace token= "@Path(&#34;/&#64;&#64;" value="@Path(&#34;/v3/" dir="src/gen/java">
<include name="**/*Api.java"/>
</replace>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
<executions>
<execution>
<id>clean-webapp</id>
<phase>process-sources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp</directory>
</fileset>
<fileset>
<directory>src/genimpl</directory>
</fileset>
</filesets>
</configuration>
</execution>
<execution>
<id>clean-source</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/gen/java</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger-codegen-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/yaml/apollo-api-v3.yaml</inputSpec>
<output>${project.basedir}</output>
<language>jaxrs-resteasy</language>
<artifactId>apl-api3</artifactId>
<groupId>com.apollocurrency</groupId>
<apiPackage>com.apollocurrency.aplwallet.api.v3</apiPackage>
<modelPackage>com.apollocurrency.aplwallet.api.v3.model</modelPackage>
<invokerPackage>com.apollocurrency.aplwallet.api</invokerPackage>
<skipOverwrite>true</skipOverwrite>
<generateApiTests>true</generateApiTests>
<generateSupportingFiles>false</generateSupportingFiles>
<supportingFilesToGenerate>ApiException.java,NotFoundException.java</supportingFilesToGenerate>
<modelsToGenerate>
AccountInfo,AccountInfoResp,AccountAssetsResp,AccountCurrenciesResp,AccountReq,AccountReqTest,AccountReqSendMoney,AssetBalance,BlockchainInfo,BlockInfo,BlockchainState,BlockInfoResponse,BlockInfoListResponse,Currency,CountResponse,CacheInfo,CacheInfoResponse,CreateChildAccountResp,EmptyResponse,ForgerInfo,ForgersInfoResponse,FullHealthInfo,FullPeerInfo,HealthPrivateInfo,HealthPublicInfo,HealthResponse,NetworkResponse,NodeStatusInfo,ListLogs,ListResponse,PeerPublicInfo,PeerPrivateInfo,PrivateHealthResponse,PublicHealthResponse,TasksInfoResponse,ThreadsInfoResponse,QueryCountResult,QueryObject,QueryResult,TasksInfo,TransactionInfo,TransactionInfoArrayResp,TransactionInfoResp,ThreadsInfo,ThreadsInfoResponse,TxReceipt,TxRequest,PublishContractReq,CallContractMethodReq,ContractListResponse,ContractDetails,ContractDetailsResponse,ContractStateResponse,ContractMethod,CallMethodResult,TransactionArrayResp,CallViewMethodReq,ResultValueResponse,MemberSpec,PropertySpec,ArgSpec,ContractSpecResponse,CurrencyBurningTxCreationRequest,TransactionCreationRequest,TransactionCreationResponse,UnconfirmedTransactionInfo,CurrencyBurningTxParams,AddressSpec,AddressSpecResponse,TransactionVerificationResponse,LastTransactionVerificationResponse,TransactionVerification,StringListResponse,ModuleSourceResponse,ModuleListResponse,AsrSpec,AsrSpecResponse,AsrMemberSpec,ContractEventsRequest,ContractEventsResponse,ContractEventDetails,X509Response
</modelsToGenerate>
<configHelp>false</configHelp>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
<implFolder>src/genimpl/java</implFolder>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<fullJavaUtil>true</fullJavaUtil>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>${project.basedir}/src/gen/java/**/*.java</include>
</includes>
<replacements>
<replacement>
<token>javax.inject</token>
<value>jakarta.inject</value>
</replacement>
<replacement>
<token>javax.validation</token>
<value>jakarta.validation</value>
</replacement>
<replacement>
<token>javax.ws</token>
<value>jakarta.ws</value>
</replacement>
</replacements>
<regex>false</regex>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
</dependency>
<!-- Bean Validation API support -->
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
*/
Comment thread
yuriy-ln marked this conversation as resolved.

package com.apollocurrency.aplwallet.api.v3;

public class NotFoundException extends jakarta.ws.rs.NotFoundException {

public NotFoundException(String msg) {
super(msg);
}
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
/*
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v3.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Objects;


public class BaseResponse {
private static final String PROTOCOL_VERSION = "2";
private String protocol = PROTOCOL_VERSION;
private Long requestProcessingTime = 0L;

/**
* Protocol version
**/

@Schema(example = "2", description = "Protocol version")
@JsonProperty("protocol")
public String getProtocol() {
return protocol;
}

public void setProtocol(String protocol) {
this.protocol = protocol;
}

/**
* Time in milliseconds that took from incoming request to response
**/

@Schema(example = "12", description = "Time in milliseconds that took from incoming request to response")
@JsonProperty("requestProcessingTime")
public Long getRequestProcessingTime() {
return requestProcessingTime;
}

public void setRequestProcessingTime(Long requestProcessingTime) {
this.requestProcessingTime = requestProcessingTime;
}


@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BaseResponse baseResponse = (BaseResponse) o;
return Objects.equals(protocol, baseResponse.protocol) &&
Objects.equals(requestProcessingTime, baseResponse.requestProcessingTime);
}

@Override
public int hashCode() {
return Objects.hash(protocol, requestProcessingTime);
}

@Override
public String toString() {

return "BaseResponse{" +
"protocol= '" + protocol + '\'' +
", requestProcessingTime= " + requestProcessingTime +
'}';
}
}
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
@Data
@Schema(name = "CacheStats", description = "Statistics about the performance of a Cache.")
public class CacheStatsDTO {
@Schema(name = "cacheName", description = "The cahce name.")
@Schema(name = "cacheName", description = "The cache name.")
private String cacheName;
@NonNull
@Schema(name = "hitCount", description = "The number of times Cache lookup methods have returned a cached value.")
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ public class PeerDTO extends BaseDTO {
private Integer state;
private String announcedAddress;
private Boolean sharedAddress;
private String halmark;
private String hallmark;
private Integer weight;
private Long downloadedVolume;
private Long uploadedVolume;
Expand Down
3 changes: 3 additions & 0 deletions apl-api2/pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,6 +111,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
Expand DownExpand Up@@ -179,6 +180,8 @@
<regex>false</regex>
</configuration>
</plugin>


</plugins>
</build>
<dependencies>
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v2;
Expand Down
14 changes: 14 additions & 0 deletions apl-api3/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
The Swagger Codegen project - https://github.com/swagger-api/swagger-codegen/tree/3.0.0

To build package, please execute the following:

```
mvn clean package
```

To run swagger editor from DockerHub, please execute the following:

```
docker pull swaggerapi/swagger-editor
docker run -d -p 80:8080 swaggerapi/swagger-editor
```
214 changes: 214 additions & 0 deletions apl-api3/pom.xml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.apollocurrency</groupId>
<artifactId>apollo-blockchain</artifactId>
<version>2.0.1</version>
</parent>

<artifactId>apl-api3</artifactId>
<name>apl-api3</name>
<packaging>jar</packaging>

<properties>
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
<swagger-core-version>2.0.0</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<resteasy-version>3.0.11.Final</resteasy-version>
<slf4j-version>1.6.3</slf4j-version>
<junit-version>4.8.1</junit-version>
<servlet-api-version>2.5</servlet-api-version>
<swagger-codegen-maven-plugin.version>3.0.36</swagger-codegen-maven-plugin.version>
</properties>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- to resolve swagger codegen issue on windows -->
<excludes>
<exclude>com/apollocurrency/aplwallet/api/impl/v3/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>
src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<configuration>
<tasks>
<!-- @Path("/@@ @Path("/v2/ -->
<replace token= "@Path(&#34;/&#64;&#64;" value="@Path(&#34;/v3/" dir="src/gen/java">
<include name="**/*Api.java"/>
</replace>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
<executions>
<execution>
<id>clean-webapp</id>
<phase>process-sources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp</directory>
</fileset>
<fileset>
<directory>src/genimpl</directory>
</fileset>
</filesets>
</configuration>
</execution>
<execution>
<id>clean-source</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>src/gen/java</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger-codegen-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/yaml/apollo-api-v3.yaml</inputSpec>
<output>${project.basedir}</output>
<language>jaxrs-resteasy</language>
<artifactId>apl-api3</artifactId>
<groupId>com.apollocurrency</groupId>
<apiPackage>com.apollocurrency.aplwallet.api.v3</apiPackage>
<modelPackage>com.apollocurrency.aplwallet.api.v3.model</modelPackage>
<invokerPackage>com.apollocurrency.aplwallet.api</invokerPackage>
<skipOverwrite>true</skipOverwrite>
<generateApiTests>true</generateApiTests>
<generateSupportingFiles>false</generateSupportingFiles>
<supportingFilesToGenerate>ApiException.java,NotFoundException.java</supportingFilesToGenerate>
<modelsToGenerate>
AccountInfo,AccountInfoResp,AccountAssetsResp,AccountCurrenciesResp,AccountReq,AccountReqTest,AccountReqSendMoney,AssetBalance,BlockchainInfo,BlockInfo,BlockchainState,BlockInfoResponse,BlockInfoListResponse,Currency,CountResponse,CacheInfo,CacheInfoResponse,CreateChildAccountResp,EmptyResponse,ForgerInfo,ForgersInfoResponse,FullHealthInfo,FullPeerInfo,HealthPrivateInfo,HealthPublicInfo,HealthResponse,NetworkResponse,NodeStatusInfo,ListLogs,ListResponse,PeerPublicInfo,PeerPrivateInfo,PrivateHealthResponse,PublicHealthResponse,TasksInfoResponse,ThreadsInfoResponse,QueryCountResult,QueryObject,QueryResult,TasksInfo,TransactionInfo,TransactionInfoArrayResp,TransactionInfoResp,ThreadsInfo,ThreadsInfoResponse,TxReceipt,TxRequest,PublishContractReq,CallContractMethodReq,ContractListResponse,ContractDetails,ContractDetailsResponse,ContractStateResponse,ContractMethod,CallMethodResult,TransactionArrayResp,CallViewMethodReq,ResultValueResponse,MemberSpec,PropertySpec,ArgSpec,ContractSpecResponse,CurrencyBurningTxCreationRequest,TransactionCreationRequest,TransactionCreationResponse,UnconfirmedTransactionInfo,CurrencyBurningTxParams,AddressSpec,AddressSpecResponse,TransactionVerificationResponse,LastTransactionVerificationResponse,TransactionVerification,StringListResponse,ModuleSourceResponse,ModuleListResponse,AsrSpec,AsrSpecResponse,AsrMemberSpec,ContractEventsRequest,ContractEventsResponse,ContractEventDetails,X509Response
</modelsToGenerate>
<configHelp>false</configHelp>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
<implFolder>src/genimpl/java</implFolder>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<fullJavaUtil>true</fullJavaUtil>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>${project.basedir}/src/gen/java/**/*.java</include>
</includes>
<replacements>
<replacement>
<token>javax.inject</token>
<value>jakarta.inject</value>
</replacement>
<replacement>
<token>javax.validation</token>
<value>jakarta.validation</value>
</replacement>
<replacement>
<token>javax.ws</token>
<value>jakarta.ws</value>
</replacement>
</replacements>
<regex>false</regex>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
</dependency>
<!-- Bean Validation API support -->
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) 2018-2020. Apollo Foundation.
*/
Comment thread
yuriy-ln marked this conversation as resolved.

package com.apollocurrency.aplwallet.api.v3;

public class NotFoundException extends jakarta.ws.rs.NotFoundException {

public NotFoundException(String msg) {
super(msg);
}
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
/*
* Copyright (c) 2018-2023. Apollo Foundation.
*/

package com.apollocurrency.aplwallet.api.v3.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Objects;


public class BaseResponse {
private static final String PROTOCOL_VERSION = "2";
private String protocol = PROTOCOL_VERSION;
private Long requestProcessingTime = 0L;

/**
* Protocol version
**/

@Schema(example = "2", description = "Protocol version")
@JsonProperty("protocol")
public String getProtocol() {
return protocol;
}

public void setProtocol(String protocol) {
this.protocol = protocol;
}

/**
* Time in milliseconds that took from incoming request to response
**/

@Schema(example = "12", description = "Time in milliseconds that took from incoming request to response")
@JsonProperty("requestProcessingTime")
public Long getRequestProcessingTime() {
return requestProcessingTime;
}

public void setRequestProcessingTime(Long requestProcessingTime) {
this.requestProcessingTime = requestProcessingTime;
}


@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BaseResponse baseResponse = (BaseResponse) o;
return Objects.equals(protocol, baseResponse.protocol) &&
Objects.equals(requestProcessingTime, baseResponse.requestProcessingTime);
}

@Override
public int hashCode() {
return Objects.hash(protocol, requestProcessingTime);
}

@Override
public String toString() {

return "BaseResponse{" +
"protocol= '" + protocol + '\'' +
", requestProcessingTime= " + requestProcessingTime +
'}';
}
}
Loading