@@ -17,6 +17,16 @@ import OpenAPIKit
1717/// in the Runtime library, so they need to be kept in sync.
1818enum Constants {
1919
20+ /// Constants related to the library dependencies.
21+ enum Dependency {
22+
23+ /// The module name of the OpenAPI runtime library.
24+ static let runtime : String = " OpenAPIRuntime "
25+
26+ /// The module name of the HTTP types library.
27+ static let httpTypes : String = " HTTPTypes "
28+ }
29+
2030 /// Constants related to the generated Swift files.
2131 enum File {
2232
@@ -25,7 +35,7 @@ enum Constants {
2535
2636 /// The descriptions of modules imported by every generated file.
2737 static let imports : [ ImportDescription ] = [
28- ImportDescription ( moduleName: " OpenAPIRuntime " , spi: " Generated " ) ,
38+ ImportDescription ( moduleName: Constants . Dependency . runtime , spi: " Generated " ) ,
2939 ImportDescription (
3040 moduleName: " Foundation " ,
3141 moduleTypes: [ " struct Foundation.URL " , " struct Foundation.Data " , " struct Foundation.Date " ] ,
@@ -34,7 +44,8 @@ enum Constants {
3444 ]
3545
3646 /// The descriptions of modules imported by client and server files.
37- static let clientServerImports : [ ImportDescription ] = imports + [ ImportDescription ( moduleName: " HTTPTypes " ) ]
47+ static let clientServerImports : [ ImportDescription ] =
48+ imports + [ ImportDescription ( moduleName: Constants . Dependency. httpTypes) ]
3849 }
3950
4051 /// Constants related to the OpenAPI server object.
0 commit comments