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 number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class Banner {
Integer pos
List<String> mimes
Integer topframe
List<Integer> expdir
@JsonProperty("expdir")
List<Integer> expandableDirections
List<Integer> api
String id
Integer vcm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package org.prebid.server.functional.model.request.auction

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString

@EqualsAndHashCode
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope you don't need it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, check other cases, please remove when it's not really needed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need all of them; it's part of the verification process

@ToString(includeNames = true, ignoreNulls = true)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy)
class ConsentedProvidersSettings {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.prebid.server.functional.model.request.auction

import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString
import org.prebid.server.functional.util.PBSUtils

@EqualsAndHashCode
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same don't need, since you comparing by fields

@ToString(includeNames = true, ignoreNulls = true)
class Device {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package org.prebid.server.functional.model.request.auction

import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.annotation.JsonValue
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString

@EqualsAndHashCode
@ToString
class DeviceExt {

Atts atts
String cdep
@JsonProperty("ifa_type")
String ifaType

enum Atts {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,10 @@ class Imp {
(audio ? AUDIO : null)
].findAll { it }
}

@JsonIgnore
Object getSingleMediaTypeData() {
return banner ?: video ?: nativeObj ?: audio
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class Prebid {
List<String> profileNames
@JsonProperty("kvps")
Map<String, String> keyValuePairs
String outputFormat
String outputModule

static class Channel {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.prebid.server.functional.model.request.auction

import inet.ipaddr.IPAddressString

enum PublicCountryIp {

USA_IP("209.232.44.21", "d646:2414:17b2:f371:9b62:f176:b4c0:51cd"),
Expand All @@ -14,4 +16,8 @@ enum PublicCountryIp {
this.v4 = v4
this.v6 = ipV6
}

String getMaskedIPv6() {
new IPAddressString(this.v6).toAddress().mask(new IPAddressString("::/64").toAddress().getNetworkMask()).toCanonicalString()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ package org.prebid.server.functional.model.request.auction

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString

@EqualsAndHashCode
@ToString(includeNames = true, ignoreNulls = true)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy)
class Regs {

Integer coppa
Integer gdpr
Integer gpc
String usPrivacy
String gpp
List<Integer> gppSid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package org.prebid.server.functional.model.request.auction

import com.fasterxml.jackson.databind.PropertyNamingStrategies
import com.fasterxml.jackson.databind.annotation.JsonNaming
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString

@EqualsAndHashCode
@ToString(includeNames = true, ignoreNulls = true)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy)
class RegsExt {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package org.prebid.server.functional.model.request.auction

import com.fasterxml.jackson.annotation.JsonProperty
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString
import org.prebid.server.functional.model.response.auction.SeatBid

@EqualsAndHashCode
@ToString(includeNames = true, ignoreNulls = true)
class StoredAuctionResponse {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.prebid.server.functional.model.request.get

import com.fasterxml.jackson.core.JsonGenerator
import com.fasterxml.jackson.databind.JsonSerializer
import com.fasterxml.jackson.databind.SerializerProvider

class CommaSeparatedListSerializer extends JsonSerializer<List<Object>> {

@Override
void serialize(List<Object> value, JsonGenerator generator, SerializerProvider serializers) throws IOException {
String result = value.join(',')
generator.writeString(result)
}
}
Loading