mirror of
https://github.com/Qortal/qortal.git
synced 2025-05-03 08:17:50 +00:00
Refactored to standard Maven layout: src/main/java src/main/resources src/test/java etc. New translation code that uses locale-specific ResourceBundles to load translations on demand. Reworked API error/exceptions code to a shorter, simpler @ApiErrors annotation. Processing of @ApiErrors annotations produces an example for each possible API error and includes API error string in HTTP response code, e.g. 400 INVALID_SIGNATURE Missing API error cases added to each API call. Translation of openAPI.json removed (for now). block-explorer.html and BIP39 wordlists now read as resources instead of direct from disk. Java compile warnings fixed. Some runtime warnings remain: WARNING: A provider api.resource.ApiDefinition registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. WARNING: A provider api.resource.AnnotationPostProcessor registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. WARN org.reflections.Reflections - given scan urls are empty. set urls in the configuration
34 lines
880 B
Java
34 lines
880 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.account.AccountBalanceData;
|
|
import data.assets.AssetData;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
@Schema(description = "Asset info, maybe including asset holders")
|
|
// All properties to be converted to JSON via JAX-RS
|
|
@XmlAccessorType(XmlAccessType.FIELD)
|
|
public class AssetWithHolders {
|
|
|
|
@Schema(implementation = AssetData.class, name = "asset", title = "asset data")
|
|
@XmlElement(name = "asset")
|
|
public AssetData assetData;
|
|
|
|
public List<AccountBalanceData> holders;
|
|
|
|
// For JAX-RS
|
|
protected AssetWithHolders() {
|
|
}
|
|
|
|
public AssetWithHolders(AssetData assetData, List<AccountBalanceData> holders) {
|
|
this.assetData = assetData;
|
|
this.holders = holders;
|
|
}
|
|
|
|
}
|