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

Partition objects/errors/clients/endpoints into separate top-level modules #279

Open
sfackler opened this issue Jan 2, 2024 · 0 comments · May be fixed by #415
Open

Partition objects/errors/clients/endpoints into separate top-level modules #279

sfackler opened this issue Jan 2, 2024 · 0 comments · May be fixed by #415

Comments

@sfackler
Copy link
Member

sfackler commented Jan 2, 2024

We currently put the generated code for all Conjure types together in the same module. However, once we implement #121, we'll end up generating two traits for each endpoint, and there isn't a clear naming convention I can think of to disambiguate.

We should update the codegen to create separate top-level modules for each Conjure type to keep them separate from each other. For example, using the example API, we would have

use example_api::another::{TestServiceClient, TestService, TestServiceEndpoints, DifferentPackage};

change to

use example_api::{
    clients::another::TestServiceClient,
    endpoints::another::{TestService, TestServiceEndpoints},
    objects::another::DifferentPackage,
};

We could go further and split them into separate example_api_objects, example_api_clients, etc crates like conjure-java does, but that doesn't really seem worth it IMO.

@sfackler sfackler linked a pull request Jan 20, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant