[sc-73945] Extend decisions property of DecisionResponse schema#96
[sc-73945] Extend decisions property of DecisionResponse schema#96tomascasas wants to merge 4 commits intomasterfrom
Conversation
Allow single (dynamic key name) and multi-winner shapes.
7bcc57c to
1acb82d
Compare
decision/openapi-3.yaml
Outdated
There was a problem hiding this comment.
I think I had interpreted the Multi-Winner Placements docs incorrectly and gave you misleading information. The key can be dynamic for Multi-Winner and passed in the same way via the divName parameter.
This alternative definition should also make use of additionalProperties.
So the valid types become: Map<string, Decision> or Map<string, Decision[]>.
The other thing I'm not 100% on is whether the object is limited to one property, so it might be good to exclude these restrictions for now.
There was a problem hiding this comment.
The other thing I'm not 100% on is whether the object is limited to one property, so it might be good to exclude these restrictions for now.
placements in the request body:
Every request must contain one or more placements. Each placement represents a "slot" in which an ad may be served.
So the decision response must support multiple properties under decisions, its values being a mixture of Decision and Decision[].
|
i think it is even simpler.
It is a one-of of the dynamic key with single decision value or array of
decision values
…On Sat, Aug 9, 2025, 04:41 Akira ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In decision/openapi-3.yaml
<#96 (comment)>
:
> @@ -631,7 +631,25 @@ components:
user:
$ref: '#/components/schemas/User'
decisions:
- type: object
+ oneOf:
+ - type: object
+ description: Single decision format with dynamic string key
+ additionalProperties:
+ $ref: '#/components/schemas/Decision'
+ minProperties: 1
+ maxProperties: 1
+ - type: object
+ description: Multiple decision format
+ properties:
+ multi-winner:
I think I had interpreted the Multi-Winner Placements
<https://dev.kevel.com/reference/multi-winner-placements> docs
incorrectly and gave you misleading information. The key can be dynamic for
Multi-Winner and passed in the same way via the divName parameter.
So this alternative definition also should make use of
additionalProperties.
So the valid types become: Map<string, Decision> or Map<string,
Decision[]>.
—
Reply to this email directly, view it on GitHub
<#96 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDXB4QIFAIZKKPGXQP4GWD3MWQ3BAVCNFSM6AAAAACDOXOI42VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTCMBSHAZTENBWHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
I attempted to build the Java SDK using the changes, but the compilation failed with the following errors: It looks like |
@ryuichis Could you retry using a more recent version of the openapi generator? Current version is set to 5.1.0 in https://github.com/adzerk/adzerk-api-specification/blob/master/openapitools.json. Find latest version: |
Updating openapi-generator-cli to 7.14.0 made it compile. Thanks. |
|
@ryuichis @tomascasas I've been testing the classes compiled using 7.14.0 with the option I propose the This was originally changed to conform the decisions to the We should rollback the Java SDK and apply a different fix to how |
Allow single (dynamic key name) and multi-winner shapes.