You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I want to thank you for your work, I really love ❤️ this project, I've been waiting for a tool like this (sourcery+plantuml) for quite a long time!
Next, I've found a problem that I don't if it's a bug or I'm missing something.
I've two files:
Container.swift
public struct Container: Codable {
public var url: String
public var headers: ContainerHeaders?
public init(url: String, headers: ContainerHeaders? = nil) {
self.url = url
self.headers = headers
}
public enum CodingKeys: String, CodingKey {
case url
case headers
}
}
ContainerHeaders.swift
public struct ContainerHeaders: Codable {
public var name: String
public var value: String
public init(name: String, value: String) {
self.name = name
self.value = value
}
}
With those, I try to generate a diagram using this command
if you omit -sdk option then it's working for given example.
Hence, using swiftplantuml classdiagram Container.swift ContainerHeaders.swift --output consoleOnly will result in
@startuml
' STYLE START
hide empty members
skinparam shadowing false
' STYLE END
class "Container" as Container << (S, SkyBlue) struct >> {
+url : String
+headers : ContainerHeaders?
+init(url:headers:)
}
class "ContainerHeaders" as ContainerHeaders << (S, SkyBlue) struct >> {
+name : String
+value : String
+init(name:value:)
}
Codable <|-- Container : inherits
Codable <|-- ContainerHeaders : inherits
@enduml
and in this example no type inference support is needed (which is the purpose of using --sdk).
Yes, this is a bug but I haven't checked yet how easy it is to fix it (might be bubbling up from SourceKitten). As I am working on replacing SourceKitten with SwiftSyntaxt (the goal is to support type inference without the --sdk option) I will not immediately fix the issue for the current (SourceKitten-based) version of SwiftPlantUML
Hi!
First of all, I want to thank you for your work, I really love ❤️ this project, I've been waiting for a tool like this (sourcery+plantuml) for quite a long time!
Next, I've found a problem that I don't if it's a bug or I'm missing something.
I've two files:
With those, I try to generate a diagram using this command
Which results in an error, as it can bee seen in the output given:
So, is this a bug or do I miss something?
The text was updated successfully, but these errors were encountered: