Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise the generated clients #320

Open
pgressa opened this issue Jun 17, 2021 · 0 comments
Open

Optimise the generated clients #320

pgressa opened this issue Jun 17, 2021 · 0 comments
Labels
type: improvement A minor improvement to an existing feature

Comments

@pgressa
Copy link
Contributor

pgressa commented Jun 17, 2021

Currently the SdkProcessor generate factory classes for all clients:

@Apis({
        AdmissionregistrationApi.class,
        AdmissionregistrationV1Api.class,
        AdmissionregistrationV1beta1Api.class,
        ApiextensionsApi.class,
        ApiextensionsV1Api.class,
        ApiextensionsV1beta1Api.class,
        ApiregistrationApi.class,
        ApiregistrationV1Api.class,
        ApiregistrationV1beta1Api.class,
        ApisApi.class,
        AppsApi.class,
        AppsV1Api.class,
        AuthenticationApi.class,
        AuthenticationV1Api.class,
        AuthenticationV1beta1Api.class,
        AuthorizationApi.class,
        AuthorizationV1Api.class,
        AuthorizationV1beta1Api.class,
        AutoscalingApi.class,
        AutoscalingV1Api.class,
        AutoscalingV2beta1Api.class,
        AutoscalingV2beta2Api.class,
        BatchApi.class,
        BatchV1Api.class,
        BatchV1beta1Api.class,
        BatchV2alpha1Api.class,
        CertificatesApi.class,
        CertificatesV1beta1Api.class,
        CoordinationApi.class,
        CoordinationV1Api.class,
        CoordinationV1beta1Api.class,
        CoreApi.class,
        CoreV1Api.class,
        CustomObjectsApi.class,
        DiscoveryApi.class,
        DiscoveryV1beta1Api.class,
        EventsApi.class,
        EventsV1beta1Api.class,
        ExtensionsApi.class,
        ExtensionsV1beta1Api.class,
        FlowcontrolApiserverApi.class,
        FlowcontrolApiserverV1alpha1Api.class,
        LogsApi.class,
        NetworkingApi.class,
        NetworkingV1Api.class,
        NetworkingV1beta1Api.class,
        NodeApi.class,
        NodeV1alpha1Api.class,
        NodeV1beta1Api.class,
        PolicyApi.class,
        PolicyV1beta1Api.class,
        RbacAuthorizationApi.class,
        RbacAuthorizationV1Api.class,
        RbacAuthorizationV1alpha1Api.class,
        RbacAuthorizationV1beta1Api.class,
        SchedulingApi.class,
        SchedulingV1Api.class,
        SchedulingV1alpha1Api.class,
        SchedulingV1beta1Api.class,
        StorageApi.class,
        StorageV1Api.class,
        StorageV1alpha1Api.class,
        StorageV1beta1Api.class,
        VersionApi.class,
})
@Singleton
@Internal
final class ApisAutomaticFeatureMetadata {
}

This is quite ineffective so instead use the @ApiClient field or class annotation that will generate the factory class for annotated (in case of field annotation) or all clients found in the classes.

@pgressa pgressa added the type: improvement A minor improvement to an existing feature label Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant