Skip to content

Fix examples, model defaults and topic NUL bytes from SDK review #2052

Closed

Description

@ChiragAgg5k

Tracks PR #2050.

Plan

Goal: Fix the review findings on the SDK major PRs at their source in the generator: examples that don't compile in PHP, Ruby, Dart and Flutter, wrong model defaults in Python and Dart/Flutter, and Topic helpers that accept NUL bytes.

What changes (all in #2050):

  • Examples: src/SDK/Language/PHP.php (object arrays render as PHP arrays, escaped quotes), src/SDK/Language/Ruby.php (nil for empty optional numbers, single-quoted escaped strings), src/SDK/Language/Dart.php plus templates/dart/docs/example.md.twig and templates/flutter/docs/example.md.twig (text responses typed String, escaped enum member names like xnew).
  • Model defaults: src/SDK/Language/Python.php (a map field's {} default stays {}), templates/dart/lib/src/models/model.dart.twig (required nested models fall back to an empty map).
  • Topic: every language's Topic template (templates/*/…/Topic* / topic.*.twig) rejects U+0000.
  • Tests: new preset/settings and preset/profile mock endpoints in mock-server/app/http.php and tests/resources/spec-openapi3.json, new e2e expectations in tests/e2e/Base.php and the per-language tests, and the applyDefaults count in tests/generation/GenerationTest.php.

Remaining steps: None beyond the linked PR; once released, the SDK major PRs pick up the regenerated output.

Done when:

Activity

  1. self-assigned this
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions