codegen: unify generated-file headers across Rust/TS/Python#147
Merged
Conversation
Every generated file now starts with the same wording — "DO NOT MODIFY
THIS FILE MANUALLY" / "This file was generated by reflectapi-cli" /
"Schema name: …" / optional description — rendered as a // block in
Rust and TypeScript and as a triple-quoted docstring in Python.
Previously Python used a different sentence ("automatically generated
by ReflectAPI"), its root __init__.py used a one-line docstring with
no provenance marker, and generated.transport.ts had no header at all.
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
|
📖 Documentation Preview: https://reflectapi-docs-preview-pr-147.partly.workers.dev Updated automatically from commit bdcb638 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every generated file now starts with the same header wording, regardless of language. Previously:
// DO NOT MODIFY THIS FILE MANUALLY/// This file was generated by reflectapi-cli/// Schema name: …/// {description}This file is automatically generated by ReflectAPI), with no schema name or description__init__.pyused a third, one-line variant ("{pkg} client generated by ReflectAPI.")generated.transport.tshad no provenance marker at allAfter this PR, all generated files share the same content (rendered as
// ...in Rust/TS and"""..."""in Python):PythonGenerationnow carries the schema name + description so the post-generation file renderers don't need to threadschemaseparately.Test plan
cargo fmt,cargo clippy -p reflectapi --all-features --all-targets -D warnings,cargo test -p reflectapi --all-featuresall greenreflectapi-democlients; only the headers change (TSgenerated.tsand Rustgenerated.rsare unchanged byte-for-byte — see the demo snapshot diff)