Skip to content

Commit 22019ca

Browse files
authored
Added section on customizing generated code and TypeSpec mention. (#3273)
1 parent 48e512e commit 22019ca

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

customization-base/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ The `azure-autorest-customization` package provides APIs for customizing Autores
44
programmatically to support special cases not supported by Autorest code generation directly using Eclipse language
55
server to ensure valid Java code.
66

7+
## Before You Customize
8+
9+
Before customizing generated code, consider whether your change should be made in TypeSpec (`client.tsp`) instead. TypeSpec customizations are cleaner and survive regeneration. See the [TypeSpec Client Customizations Reference](https://github.com/Azure/azure-sdk-for-java/blob/main/eng/common/knowledge/customizing-client-tsp.md) for available decorators like `@@clientName`, `@@access`, etc.
10+
11+
Use Java code customizations only when TypeSpec cannot express the behavior you need.
12+
713
To set up customizations, create a Maven project with dependency:
814

915
```xml

0 commit comments

Comments
 (0)