-
Notifications
You must be signed in to change notification settings - Fork 8
feat: expose deployment group external IDs in clients #309
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
Changes from all commits
289cb1e
9841a04
5b51bda
ef698c0
579b711
8ce2abd
3c34cfa
0d999a9
5d8947e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| use alien_platform_api::{types, Client}; | ||
|
|
||
| #[test] | ||
| fn generated_client_exposes_external_id_operations() { | ||
| let client = Client::new("https://api.alien.dev"); | ||
| let body: types::EnsureDeploymentGroupByExternalIdRequest = | ||
| types::EnsureDeploymentGroupByExternalIdRequest::builder() | ||
| .external_id("customer_123") | ||
| .name("production") | ||
| .project("my-project") | ||
| .try_into() | ||
| .expect("valid ensure request"); | ||
|
|
||
| // Construct both generated request builders. Calling `send` is covered by | ||
| // API integration tests; this test protects the public Rust SDK surface. | ||
| let _ensure = client.ensure_deployment_group_by_external_id().body(body); | ||
| let _read = client | ||
| .get_deployment_group_by_external_id() | ||
| .external_id("customer_123") | ||
| .project("my-project"); | ||
| let update: types::SetDeploymentGroupExternalIdRequest = | ||
| types::SetDeploymentGroupExternalIdRequest::builder() | ||
| .external_id(Some( | ||
| "customer_456" | ||
| .parse::<types::SetDeploymentGroupExternalIdRequestExternalId>() | ||
| .expect("valid external ID"), | ||
| )) | ||
| .try_into() | ||
| .expect("valid update request"); | ||
| let _update = client | ||
| .set_deployment_group_external_id() | ||
| .id("dg_0000000000000000000000000000") | ||
| .body(update); | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.