Skip to content

Commit

Permalink
[swift6] Add Sendable conformance to request parameter enums (OpenAPI…
Browse files Browse the repository at this point in the history
  • Loading branch information
x-sheep authored Nov 4, 2024
1 parent 00dbe59 commit bdad11d
Show file tree
Hide file tree
Showing 25 changed files with 109 additions and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extension {{projectName}}API {
/**
* enum for parameter {{paramName}}
*/
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{enumName}}_{{operationId}}: {{^isContainer}}{{{dataType}}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, CaseIterable{{#useVapor}}, Content{{/useVapor}} {
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{enumName}}_{{operationId}}: {{^isContainer}}{{{dataType}}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, Sendable, CaseIterable{{#useVapor}}, Content{{/useVapor}} {
{{^enumUnknownDefaultCase}}
{{#allowableValues}}
{{#enumVars}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,15 +411,15 @@ open class FakeAPI {
/**
* enum for parameter enumHeaderStringArray
*/
public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable {
public enum EnumHeaderStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumHeaderString
*/
public enum EnumHeaderString_testEnumParameters: String, CaseIterable {
public enum EnumHeaderString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand All @@ -428,15 +428,15 @@ open class FakeAPI {
/**
* enum for parameter enumQueryStringArray
*/
public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable {
public enum EnumQueryStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumQueryString
*/
public enum EnumQueryString_testEnumParameters: String, CaseIterable {
public enum EnumQueryString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand All @@ -445,31 +445,31 @@ open class FakeAPI {
/**
* enum for parameter enumQueryInteger
*/
public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable {
public enum EnumQueryInteger_testEnumParameters: Int, Sendable, CaseIterable {
case _1 = 1
case number2 = -2
}

/**
* enum for parameter enumQueryDouble
*/
public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable {
public enum EnumQueryDouble_testEnumParameters: Double, Sendable, CaseIterable {
case _11 = 1.1
case number12 = -1.2
}

/**
* enum for parameter enumFormStringArray
*/
public enum EnumFormStringArray_testEnumParameters: String, CaseIterable {
public enum EnumFormStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumFormString
*/
public enum EnumFormString_testEnumParameters: String, CaseIterable {
public enum EnumFormString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ open class PetAPI {
/**
* enum for parameter status
*/
public enum Status_findPetsByStatus: String, CaseIterable {
public enum Status_findPetsByStatus: String, Sendable, CaseIterable {
case available = "available"
case pending = "pending"
case sold = "sold"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1268,15 +1268,15 @@ open class FakeAPI {
/**
* enum for parameter enumHeaderStringArray
*/
public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable {
public enum EnumHeaderStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumHeaderString
*/
public enum EnumHeaderString_testEnumParameters: String, CaseIterable {
public enum EnumHeaderString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand All @@ -1285,15 +1285,15 @@ open class FakeAPI {
/**
* enum for parameter enumQueryStringArray
*/
public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable {
public enum EnumQueryStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumQueryString
*/
public enum EnumQueryString_testEnumParameters: String, CaseIterable {
public enum EnumQueryString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand All @@ -1302,31 +1302,31 @@ open class FakeAPI {
/**
* enum for parameter enumQueryInteger
*/
public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable {
public enum EnumQueryInteger_testEnumParameters: Int, Sendable, CaseIterable {
case _1 = 1
case number2 = -2
}

/**
* enum for parameter enumQueryDouble
*/
public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable {
public enum EnumQueryDouble_testEnumParameters: Double, Sendable, CaseIterable {
case _11 = 1.1
case number12 = -1.2
}

/**
* enum for parameter enumFormStringArray
*/
public enum EnumFormStringArray_testEnumParameters: String, CaseIterable {
public enum EnumFormStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumFormString
*/
public enum EnumFormString_testEnumParameters: String, CaseIterable {
public enum EnumFormString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ open class PetAPI {
/**
* enum for parameter status
*/
public enum Status_findPetsByStatus: String, CaseIterable {
public enum Status_findPetsByStatus: String, Sendable, CaseIterable {
case available = "available"
case pending = "pending"
case sold = "sold"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,15 @@ open class FakeAPI {
/**
* enum for parameter enumHeaderStringArray
*/
public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable {
public enum EnumHeaderStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumHeaderString
*/
public enum EnumHeaderString_testEnumParameters: String, CaseIterable {
public enum EnumHeaderString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand All @@ -372,15 +372,15 @@ open class FakeAPI {
/**
* enum for parameter enumQueryStringArray
*/
public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable {
public enum EnumQueryStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumQueryString
*/
public enum EnumQueryString_testEnumParameters: String, CaseIterable {
public enum EnumQueryString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand All @@ -389,31 +389,31 @@ open class FakeAPI {
/**
* enum for parameter enumQueryInteger
*/
public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable {
public enum EnumQueryInteger_testEnumParameters: Int, Sendable, CaseIterable {
case _1 = 1
case number2 = -2
}

/**
* enum for parameter enumQueryDouble
*/
public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable {
public enum EnumQueryDouble_testEnumParameters: Double, Sendable, CaseIterable {
case _11 = 1.1
case number12 = -1.2
}

/**
* enum for parameter enumFormStringArray
*/
public enum EnumFormStringArray_testEnumParameters: String, CaseIterable {
public enum EnumFormStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumFormString
*/
public enum EnumFormString_testEnumParameters: String, CaseIterable {
public enum EnumFormString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ open class PetAPI {
/**
* enum for parameter status
*/
public enum Status_findPetsByStatus: String, CaseIterable {
public enum Status_findPetsByStatus: String, Sendable, CaseIterable {
case available = "available"
case pending = "pending"
case sold = "sold"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,15 @@ open class FakeAPI {
/**
* enum for parameter enumHeaderStringArray
*/
public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable {
public enum EnumHeaderStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumHeaderString
*/
public enum EnumHeaderString_testEnumParameters: String, CaseIterable {
public enum EnumHeaderString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand All @@ -535,15 +535,15 @@ open class FakeAPI {
/**
* enum for parameter enumQueryStringArray
*/
public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable {
public enum EnumQueryStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumQueryString
*/
public enum EnumQueryString_testEnumParameters: String, CaseIterable {
public enum EnumQueryString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand All @@ -552,31 +552,31 @@ open class FakeAPI {
/**
* enum for parameter enumQueryInteger
*/
public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable {
public enum EnumQueryInteger_testEnumParameters: Int, Sendable, CaseIterable {
case _1 = 1
case number2 = -2
}

/**
* enum for parameter enumQueryDouble
*/
public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable {
public enum EnumQueryDouble_testEnumParameters: Double, Sendable, CaseIterable {
case _11 = 1.1
case number12 = -1.2
}

/**
* enum for parameter enumFormStringArray
*/
public enum EnumFormStringArray_testEnumParameters: String, CaseIterable {
public enum EnumFormStringArray_testEnumParameters: String, Sendable, CaseIterable {
case greaterThan = ">"
case dollar = "$"
}

/**
* enum for parameter enumFormString
*/
public enum EnumFormString_testEnumParameters: String, CaseIterable {
public enum EnumFormString_testEnumParameters: String, Sendable, CaseIterable {
case abc = "_abc"
case efg = "-efg"
case xyz = "(xyz)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ open class PetAPI {
/**
* enum for parameter status
*/
public enum Status_findPetsByStatus: String, CaseIterable {
public enum Status_findPetsByStatus: String, Sendable, CaseIterable {
case available = "available"
case pending = "pending"
case sold = "sold"
Expand Down
Loading

0 comments on commit bdad11d

Please sign in to comment.