Skip to content

additionalProperties: { ... some object } can seemingly cause issues (at least depending on nesting with $ref) #116

@LukasGoTom

Description

@LukasGoTom

this is so i will remember to continue here next week, I will add code example via PR later on next week

but something like this:

{
                            "type": "object",
                            "description": "Forecasted metric values at this budget level. Keys are either forecastable-metric values for delivery/engagement (impressions, reach, spend, etc.) or event-type values for outcomes (purchase, lead, app_install, etc.). Values are ForecastRange objects (low/mid/high). Use { \"mid\": value } for point estimates. Include spend when the platform predicts it will differ from budget.",
                            "additionalProperties": {
                              "title": "Forecast Range",
                              "description": "A forecast value with optional low/high bounds. The mid value represents the most likely outcome. When low and high are provided, they represent conservative and optimistic estimates respectively.",
                              "type": "object",
                              "properties": {
                                "low": {
                                  "type": "number",
                                  "description": "Conservative (low-end) forecast value",
                                  "minimum": 0
                                },
                                "mid": {
                                  "type": "number",
                                  "description": "Expected (most likely) forecast value",
                                  "minimum": 0
                                },
                                "high": {
                                  "type": "number",
                                  "description": "Optimistic (high-end) forecast value",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "mid"
                              ],
                              "additionalProperties": true
                            }
                          }

will cause dtos that cannot represent the data. Maybe only if it is used with $ref i will double check and create an atomic example next week. Is used here:
https://github.com/adcontextprotocol/adcp/blob/main/dist/schemas/3.0.0-beta.3/bundled/media-buy/get-products-response.json#L1926

is removed in rc2 of the schema, but other places, maybe, still use this functionality or similar one e.g. here somewhat similar:
https://github.com/adcontextprotocol/adcp/blob/main/dist/schemas/3.0.0-rc.2/bundled/media-buy/package-request.json#L7533

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions