forked from Qortal-Forker/qortal
Cleaned up responses from /addresses/* endpoints
in that some return text/plain instead of application/json.
Removed need for class-local copy of ApiErrorFactory in
AddressesResource - using getInstance() instead.
Some work still needs to be done on annotating API errors.
API error examples in API UI rendered incorrectly - swagger-ui issue?
Removed repository-accessing code from api.models.*
Added /assets/order/{orderId} for fetching info on specific asset order.
NOTE: AssetRepository.getOrdersTrades() now returns trades where order is
initiating or target. (Previously was initiating order only).
qora.assets.Order.orphan() updated to reflect above change.
block-explorer.html fixed to use new API output.
34 lines
908 B
Java
34 lines
908 B
Java
package api.models;
|
|
|
|
import java.util.List;
|
|
|
|
import javax.xml.bind.annotation.XmlAccessType;
|
|
import javax.xml.bind.annotation.XmlAccessorType;
|
|
import javax.xml.bind.annotation.XmlElement;
|
|
|
|
import data.block.BlockData;
|
|
import data.transaction.TransactionData;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
@Schema(description = "Block info, maybe including transactions")
|
|
// All properties to be converted to JSON via JAX-RS
|
|
@XmlAccessorType(XmlAccessType.FIELD)
|
|
public class BlockWithTransactions {
|
|
|
|
@Schema(implementation = BlockData.class, name = "block", title = "block data")
|
|
@XmlElement(name = "block")
|
|
public BlockData blockData;
|
|
|
|
public List<TransactionData> transactions;
|
|
|
|
// For JAX-RS
|
|
protected BlockWithTransactions() {
|
|
}
|
|
|
|
public BlockWithTransactions(BlockData blockData, List<TransactionData> transactions) {
|
|
this.blockData = blockData;
|
|
this.transactions = transactions;
|
|
}
|
|
|
|
}
|