Skip to content

docs: record the generated code policy in the contribution guide - #33

Merged
syniol merged 1 commit into
mainfrom
docs/generated-code-policy
Aug 30, 2026
Merged

syniol merged 1 commit into
mainfrom
docs/generated-code-policy

Conversation

@syniol

@syniol syniol commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Records a policy the tooling already follows but nothing wrote down.

The policy

OpenAPI output is committed exactly as the generator emits it:

  • never hand-edited
  • never reformatted
  • excluded from linting and formatting
  • out of scope for code review, security review, audit and any other sanitisation pass
  • no hand-written tests; the wrapper layer is what gets tested

The section also records where the exclusion is configured in this repository, and where a real fix belongs instead: upstream in the specification, in the generator invocation, or via .openapi-generator-ignore when the generator's copy of a file is genuinely not the source of truth.

Why now

The gap between what the tooling did and what was written down had real consequences, both surfaced by a deliberate test dispatch of specification v2.0.1 and v2.0.2:

Every one of those is a documentation failure as much as a tooling one. Someone made a correct decision, and nothing carried it forward.

Scope

Documentation only. No code, configuration or workflow changes. The same section is being added to all five generating SDKs.

sdk-cpp and sdk-python are not included: both are hand-written with no generated layer, and their contribution guides already state that explicitly.

States plainly that OpenAPI output is committed exactly as the generator
emits it: never hand-edited, never reformatted, excluded from linting and
formatting, and out of scope for code review, security review and audit.

The tooling already worked this way, but nothing said so, and the gap had
consequences. A hand-applied fix in this fleet was silently destroyed by
regeneration, and generated code was reformatted to satisfy a lint gate that
should have excluded it instead. Both are now written down, along with where
the exclusion is configured and where a real fix belongs.
@syniol syniol added the documentation Improvements or additions to documentation label Aug 30, 2026
@syniol
syniol merged commit a689d63 into main Aug 30, 2026
1 check passed
@syniol
syniol deleted the docs/generated-code-policy branch August 30, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant