-
Notifications
You must be signed in to change notification settings - Fork 122
fix: enforce mount_path semantics and stabilize builds #1836
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
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -80,12 +80,12 @@ pub enum TaskStatusEnum { | |||||||||
| /// Request structure for creating a task | ||||||||||
| #[derive(Debug, Clone, Deserialize, ToSchema)] | ||||||||||
| pub struct TaskRequest { | ||||||||||
| #[serde(rename = "repo", alias = "mount_path", alias = "path")] | ||||||||||
| pub repo: String, | ||||||||||
|
Comment on lines
+83
to
84
|
||||||||||
| #[serde(rename = "repo", alias = "mount_path", alias = "path")] | |
| pub repo: String, | |
| #[serde(rename = "mount_path", alias = "repo", alias = "path")] | |
| pub mount_path: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
aliasattribute in serde only works for deserialization. Since OrionBuildRequest is used for serialization (sending requests to Orion server), thealiasattributes here have no effect. When this struct is serialized to JSON, only "mount_path" will be used as the field name. If backward compatibility is needed for clients consuming this serialized data, you need a different approach (like adding a deprecated field similar to BuildDTO). However, since this appears to be for internal API calls within the system, the aliases may be unnecessary.