When modifying or extending public API interfaces, ensure backward compatibility and proper versioning. Follow these guidelines: 1. Make interface additions optional to avoid breaking changes:
When modifying or extending public API interfaces, ensure backward compatibility and proper versioning. Follow these guidelines:
// Make additions optional interface HttpServer { get(): void; newMethod?(): void; // Non-breaking change }
2. Support versioning through explicit version types:
```typescript
// Allow flexible version handling
export interface CustomVersioningOptions {
type: VersioningType.CUSTOM;
extractor: (request: any) => string | string[];
}
@Controller({
version: '1',
versioningOptions: customOptions
})
This approach maintains API stability while enabling controlled evolution of the interface contract.
Enter the URL of a public GitHub repository