Skip to content

Reconfigure generated code to take patch customization classes #1037

@iscai-msft

Description

@iscai-msft

Right now, we just generate our clients and operation groups without extension points for customization classes (i.e., here).

To take users customization inputs, we want to make our final client / operation groups a combination of customization (if users have added customization classes) and generated code, with the customziation classes taking precedence. Here is the rough design that we've come up with. We want all of our clients + operation groups to function this way now, as a combination of handwritten customizations + generated.

If you'll notice, we include imports in the if TYPE_CHECKING section, this is so intellisense knows what's happening (for more info, see here). Thus, the import serializer will also need to be updated so it can serialize this import section.

We should also add tests here for common scenarios of how we want to modify generated code. I've included a couple here, please add more based off of your own personal experience working on webpubsub, and any more examples you can think of. We want good testing here, since we expect SDK authors to make use of this to customize

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions