Skip to content

feat(gooddata-sdk): [AUTO] Add grandTotalsPosition field to tabular export Settings schema#1575

Open
yenkins-admin wants to merge 1 commit intomasterfrom
auto/openapi-sync-C014-20260420-r82171
Open

feat(gooddata-sdk): [AUTO] Add grandTotalsPosition field to tabular export Settings schema#1575
yenkins-admin wants to merge 1 commit intomasterfrom
auto/openapi-sync-C014-20260420-r82171

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Summary

Extended GrandTotalsPosition Literal type in request.py to include uppercase 'TOP' and 'BOTTOM' values added by the OpenAPI diff, and updated the parametrized test to cover the two new enum values.

Impact: new_feature | Services: gooddata-export-client, gooddata-metadata-client

Files changed

  • packages/gooddata-sdk/src/gooddata_sdk/catalog/export/request.py
  • packages/gooddata-sdk/tests/export/test_export_service.py

Agent decisions

Decisions (2)

uppercase vs lowercase enum values — Add 'TOP' and 'BOTTOM' (uppercase) as additional valid values in GrandTotalsPosition Literal alongside existing lowercase values

  • Alternatives: Replace lowercase 'top'/'bottom' with uppercase 'TOP'/'BOTTOM' (breaking change), Set status=no_changes because auto-generated client only shows lowercase values
  • Why: The OpenAPI diff explicitly adds grandTotalsPosition with enum ['TOP','BOTTOM'] (uppercase). The auto-generated client passes _check_type=False so uppercase values can be forwarded to the API. Keeping lowercase values preserves backward compatibility.

scope of SDK change — Only update GrandTotalsPosition TypeAlias and corresponding test; no new classes needed

  • Alternatives: Add a wrapper for DashboardExportSettings to expose grandTotalsPosition, Create a new PDF-specific settings class
  • Why: The diff targets the tabular export Settings schema, which is already wrapped by ExportSettings. The only missing piece is the new enum values in GrandTotalsPosition.
Assumptions to verify (3)
  • The 'TOP' and 'BOTTOM' uppercase values are genuinely new API-accepted enum values for grandTotalsPosition in PDF tabular exports, distinct from the existing lowercase 'top' and 'bottom'.
  • The auto-generated gooddata-api-client in this repo was regenerated from a version of the spec that predates this cluster's change; with _check_type=False the uppercase values will still be forwarded correctly to the API server.
  • The schemas/ directory represents a snapshot that may not yet include the uppercase enum values; the ground truth for what the server accepts is the cluster diff.
Risks (2)
  • If the API server does not actually accept uppercase 'TOP'/'BOTTOM' (and they were just a diff representation artifact), tests parametrized with those values will fail against a live server.
  • If the auto-generated client has enum validation enabled at the server-response level, responses containing 'TOP'/'BOTTOM' might not deserialize correctly.
Layers touched (2)
  • entity_model — Extended GrandTotalsPosition TypeAlias with 'TOP' and 'BOTTOM' uppercase variants
    • packages/gooddata-sdk/src/gooddata_sdk/catalog/export/request.py
  • tests — Added 'TOP' and 'BOTTOM' to parametrize list of test_export_settings_grand_totals_position
    • packages/gooddata-sdk/tests/export/test_export_service.py

Source commits (gdc-nas)

  • 36a823e feat(tabular-exporter): respect grand-total-possition in PDFs in AD
  • 0f0ac6f feat(tabular-exporter): respect grand-total-possition in PDFs
OpenAPI diff
       "Settings": {
         "properties": {
+          "grandTotalsPosition": {
+            "description": "Position of grand totals in the exported tabular data.",
+            "enum": ["TOP", "BOTTOM"],
+            "type": "string"
+          },
           "mergeHeaders": { "type": "boolean" }
         }
       }

Workflow run


Generated by SDK OpenAPI Sync workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant