Skip to content

Don't modify non-configuration files outside of the generation namespace #7715

@mccoyp

Description

@mccoyp

For packages that have a convenience layer, generating code from TSP shouldn't disrupt convenience-layer packaging. For example, in azure-keyvault-keys we emit code into an azure/keyvault/keys/_generated namespace -- code outside this namespace is a convenience layer.

Though emitted code is correctly put in the _generated namespace, __init__.py files outside this folder are modified to remove convenience layer exports. These files should instead be left as-is.

Tangentially related: generation produces an apiview-properties.json file at the top level of the package. The references in this file seem to be for generated code though, so we would prefer to not generate this file for a library with a convenience layer.

Metadata

Metadata

Assignees

Labels

emitter:client:pythonIssue for the Python client emitter: @typespec/http-client-python

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions