@@ -8,6 +8,7 @@ use strum::{Display, EnumString};
88use crossterm:: style:: Stylize ;
99
1010#[ derive( Clone , Debug , Deserialize , Eq , PartialEq , Display , Serialize , EnumString ) ]
11+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
1112#[ serde( rename_all = "lowercase" ) ]
1213#[ strum( serialize_all = "lowercase" ) ]
1314#[ strum( ascii_case_insensitive) ]
@@ -65,12 +66,14 @@ impl DeploymentState {
6566}
6667
6768#[ derive( Deserialize , Serialize ) ]
69+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
6870#[ typeshare:: typeshare]
6971pub struct DeploymentListResponse {
7072 pub deployments : Vec < DeploymentResponse > ,
7173}
7274
7375#[ derive( Deserialize , Serialize ) ]
76+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
7477#[ typeshare:: typeshare]
7578pub struct DeploymentResponse {
7679 pub id : String ,
@@ -105,13 +108,15 @@ impl DeploymentResponse {
105108}
106109
107110#[ derive( Deserialize , Serialize ) ]
111+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
108112#[ typeshare:: typeshare]
109113pub struct UploadArchiveResponse {
110114 /// The S3 object version ID of the uploaded object
111115 pub archive_version_id : String ,
112116}
113117
114118#[ derive( Deserialize , Serialize ) ]
119+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
115120#[ serde( tag = "type" , content = "content" ) ]
116121#[ typeshare:: typeshare]
117122pub enum DeploymentRequest {
@@ -123,6 +128,7 @@ pub enum DeploymentRequest {
123128}
124129
125130#[ derive( Default , Deserialize , Serialize ) ]
131+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
126132#[ typeshare:: typeshare]
127133pub struct DeploymentRequestBuildArchive {
128134 /// The S3 object version ID of the archive to use
@@ -135,6 +141,7 @@ pub struct DeploymentRequestBuildArchive {
135141}
136142
137143#[ derive( Deserialize , Serialize , Default ) ]
144+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
138145#[ serde( tag = "type" , content = "content" ) ]
139146#[ typeshare:: typeshare]
140147pub enum BuildArgs {
@@ -144,6 +151,7 @@ pub enum BuildArgs {
144151}
145152
146153#[ derive( Deserialize , Serialize ) ]
154+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
147155#[ typeshare:: typeshare]
148156pub struct BuildArgsRust {
149157 /// Version of shuttle-runtime used by this crate
@@ -183,6 +191,7 @@ impl Default for BuildArgsRust {
183191pub const GIT_STRINGS_MAX_LENGTH : usize = 80 ;
184192
185193#[ derive( Default , Deserialize , Serialize ) ]
194+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
186195#[ typeshare:: typeshare]
187196pub struct BuildMeta {
188197 pub git_commit_id : Option < String > ,
@@ -209,6 +218,7 @@ impl std::fmt::Display for BuildMeta {
209218}
210219
211220#[ derive( Default , Deserialize , Serialize ) ]
221+ #[ cfg_attr( feature = "utoipa" , derive( utoipa:: ToSchema ) ) ]
212222#[ typeshare:: typeshare]
213223pub struct DeploymentRequestImage {
214224 pub image : String ,
0 commit comments