cleaned empty @Schema

This commit is contained in:
Michele Artini 2022-08-31 14:34:52 +02:00
parent 15558ff29a
commit 9890f71491
22 changed files with 1 additions and 152 deletions

View File

@ -5,13 +5,10 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import eu.dnetlib.enabling.datasources.common.AggregationInfo;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema
@JsonAutoDetect
public class AggregationHistoryResponse extends Response {
@Schema
private List<AggregationInfo> aggregationInfo;
public AggregationHistoryResponse(final List<AggregationInfo> aggregationInfo) {

View File

@ -11,58 +11,40 @@ import io.swagger.v3.oas.annotations.media.Schema;
@Schema(name = "Api model", description = "provides information about the datasource API")
public class ApiDetails extends ApiIgnoredProperties {
@Schema
private String id = null;
@Schema
private String protocol = null;
@Schema
private String datasource = null;
@Schema
private String contentdescription = null;
@Schema
private String eoscDatasourceType = null;
@Schema
private String compatibility;
@Schema
private String compatibilityOverride;
@Schema
private Integer lastCollectionTotal;
@Schema
private Date lastCollectionDate;
@Schema
private Integer lastAggregationTotal;
@Schema
private Date lastAggregationDate;
@Schema
private Integer lastDownloadTotal;
@Schema
private Date lastDownloadDate;
@Schema
private String baseurl;
@Schema
protected Boolean removable = false;
@Schema
private Set<ApiParamDetails> apiParams;
@Schema
private String metadataIdentifierPath = "";
@Schema
private String typology = null;
public String getId() {

View File

@ -6,11 +6,10 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema
@JsonAutoDetect
public class ApiDetailsResponse extends Response {
@Schema
private List<ApiDetails> api;
public List<ApiDetails> getApi() {

View File

@ -8,7 +8,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
/**
* Created by claudio on 29/11/2016.
*/
@Schema
@JsonAutoDetect
public class CollectionInfo extends AggregationInfo {

View File

@ -2,12 +2,9 @@ package eu.dnetlib.openaire.dsm.domain;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* Created by claudio on 12/09/16.
*/
@Schema
@JsonAutoDetect
public enum CollectionMode {
REFRESH,

View File

@ -4,13 +4,9 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema
@JsonAutoDetect
public class DatasourceDetailResponse extends Response {
@Schema
private List<DatasourceDetails> datasourceInfo;
public DatasourceDetailResponse(final List<DatasourceDetails> datasourceInfo) {

View File

@ -19,117 +19,82 @@ import io.swagger.v3.oas.annotations.media.Schema;
public class DatasourceDetails extends DatasourceIgnoredProperties {
@NotBlank
@Schema
private String id;
@Transient
@Schema
private String openaireId;
@NotBlank
@Schema
private String officialname;
@NotBlank
@Schema
private String englishname;
@Schema
private String websiteurl;
@Schema
private String logourl;
@Email
@Schema
private String contactemail;
@Schema
private Double latitude;
@Schema
private Double longitude;
@Schema
private String timezone;
@NotBlank
@Schema
private String namespaceprefix;
@Schema
private String languages;
@Schema
private Date dateofvalidation;
@NotBlank
@Schema
private String eoscDatasourceType;
@Schema
private Date dateofcollection;
@Schema
private String platform;
@Schema
private String activationId;
@Schema
private String description;
@Schema
private String issn;
@Schema
private String eissn;
@Schema
private String lissn;
@Email
@Schema
private String registeredby;
@Schema
private String subjects;
@Schema
protected String aggregator = "OPENAIRE";
@Schema
protected String collectedfrom;
@Schema
private Boolean managed;
@Schema
private Boolean consentTermsOfUse;
@Schema
private Boolean fullTextDownload;
@Schema
private Date consentTermsOfUseDate;
@Schema
private Date lastConsentTermsOfUseDate;
@Schema
private Set<OrganizationDetails> organizations;
@Schema
private Set<IdentitiesDetails> identities;
@Schema
private String status;
@Deprecated
@Schema
private String typology;
@Schema
private Date registrationdate;
public String getId() {

View File

@ -18,69 +18,49 @@ import io.swagger.v3.oas.annotations.media.Schema;
public class DatasourceDetailsUpdate {
@NotBlank
@Schema
private String id;
@NotBlank
@Schema
private String officialname;
@NotBlank
@Schema
private String englishname;
@Schema
private String websiteurl;
@Schema
private String logourl;
@Email
@Schema
private String contactemail;
@Schema
private Double latitude;
@Schema
private Double longitude;
@Schema
private String timezone;
@Deprecated
@Schema
private String typology;
@Schema
private String eoscDatasourceType;
@Schema
private String platform;
@Schema
private String description;
@Email
@Schema
private String registeredby;
@Schema
private Boolean managed;
@Schema
private Set<IdentitiesDetails> identities;
@Schema
private Boolean consentTermsOfUse;
@Schema
private Date consentTermsOfUseDate;
@Schema
private Date lastConsentTermsOfUseDate;
@Schema
private Boolean fullTextDownload;
public String getId() {

View File

@ -14,10 +14,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
@Schema(name = "Datasource model with apis", description = "provides information about the datasource and its apis")
public class DatasourceDetailsWithApis {
@Schema
private DatasourceDetails datasource;
@Schema
private List<ApiDetails> apis = new ArrayList<>();
public DatasourceDetails getDatasource() {

View File

@ -11,31 +11,22 @@ import io.swagger.v3.oas.annotations.media.Schema;
@Schema(name = "Datasource info model", description = "provides information about the datasource and its aggregation status")
public class DatasourceInfo {
@Schema
private long indexRecords;
@Schema
private long fundedContent;
@Schema
private long fulltexts;
@Schema
private String lastIndexingDate;
@Schema
private String firstHarvestDate;
@Schema
private DatasourceDetails datasource;
@Schema
private AggregationInfo lastCollection;
@Schema
private AggregationInfo lastTransformation;
@Schema
private List<AggregationInfo> aggregationHistory;
public DatasourceInfo() {

View File

@ -5,9 +5,6 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.google.common.collect.Lists;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema
@JsonAutoDetect
public class DatasourceResponse<T> extends Response {

View File

@ -4,13 +4,9 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema
@JsonAutoDetect
public class DatasourceSearchResponse extends Response {
@Schema
private List<DatasourceInfo> datasourceInfo;
public DatasourceSearchResponse(final List<DatasourceInfo> datasourceInfo) {

View File

@ -11,15 +11,12 @@ import io.swagger.v3.oas.annotations.media.Schema;
public class DatasourceSnippet {
@NotBlank
@Schema
private String id;
@NotBlank
@Schema
private String officialname;
@NotBlank
@Schema
private String englishname;
public String getId() {

View File

@ -15,53 +15,38 @@ import io.swagger.v3.oas.annotations.media.Schema;
public class DatasourceSnippetExtended {
@NotBlank
@Schema
private String id;
@NotBlank
@Schema
private String officialname;
@NotBlank
@Schema
private String englishname;
@Schema
private String websiteurl;
@Email
@Schema
private String registeredby;
@Schema
private Date registrationdate;
@Schema
private String eoscDatasourceType;
@Schema
private String logoUrl;
@Schema
private String description;
@Schema
private Boolean consentTermsOfUse;
@Schema
private Date consentTermsOfUseDate;
@Schema
private Date lastConsentTermsOfUseDate;
@Schema
private Boolean fullTextDownload;
@Schema
private Set<OrganizationDetails> organizations;
@Deprecated
@Schema
private String typology;
public String getId() {

View File

@ -4,13 +4,9 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema
@JsonAutoDetect
public class DatasourceSnippetResponse extends Response {
@Schema
private List<DatasourceSnippetExtended> datasourceInfo;
public DatasourceSnippetResponse(final List<DatasourceSnippetExtended> datasourceInfo) {

View File

@ -9,28 +9,19 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Lists;
import com.google.gson.GsonBuilder;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema
@JsonAutoDetect
public class Header {
@Schema
private long total;
@Schema
private int page;
@Schema
private int size;
@Schema
private long time;
@Schema
private int statusCode;
@Schema
private List<String> errors = Lists.newArrayList();
@JsonIgnore

View File

@ -2,9 +2,6 @@ package eu.dnetlib.openaire.dsm.domain;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema
@JsonAutoDetect
public class IdentitiesDetails {

View File

@ -10,21 +10,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
@Schema(name = "Organization info model", description = "provides information about the organization")
public class OrganizationDetails extends OrganizationIgnoredProperties {
@Schema
private String legalshortname;
@NotBlank
@Schema
private String legalname;
@Schema
private String websiteurl;
@Schema
private String logourl;
@NotBlank
@Schema
private String country;
public String getLegalshortname() {

View File

@ -8,7 +8,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
@Schema(name = "Api response model", description = "Api response model, provides a response header")
public class Response {
@Schema
private Header header;
public Response() {

View File

@ -4,13 +4,9 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema
@JsonAutoDetect
public class SimpleResponse<T> extends Response {
@Schema
private List<T> response;
public List<T> getResponse() {

View File

@ -3,12 +3,10 @@ package eu.dnetlib.openaire.dsm.domain;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import eu.dnetlib.enabling.datasources.common.AggregationInfo;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* Created by claudio on 29/11/2016.
*/
@Schema
@JsonAutoDetect
public class TransformationInfo extends AggregationInfo {

View File

@ -7,14 +7,12 @@ import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import eu.dnetlib.enabling.datasources.common.BrowseTerm;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* Created by claudio on 20/04/2017.
*/
@Entity
@Table(name = "browse_countries")
@Schema
@JsonAutoDetect
public class CountryTerm implements Comparable<CountryTerm>, BrowseTerm {