Skip to content
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

Parser does not read the types of class attributes #78

Closed
songyang-dev opened this issue Apr 8, 2022 · 2 comments · Fixed by #80
Closed

Parser does not read the types of class attributes #78

songyang-dev opened this issue Apr 8, 2022 · 2 comments · Fixed by #80
Assignees
Labels
bug Something isn't working

Comments

@songyang-dev
Copy link

I am using this tool to parse class diagrams. The tool doesn't parse the types of attributes.

NodeJS script:

import { parse, parseFile, formatters } from 'plantuml-parser';

// Example PlantUML
const data = `
@startuml
!theme plain
class Publication {
  title : String
}
@enduml
`;

// parse PlantUML
const result = parse(data);

// Format and print parse result
console.log(
  formatters.default(result)
);

Output:

[
  {
    "elements": [
      {
        "name": "Publication",
        "title": "Publication",
        "isAbstract": false,
        "members": [
          {
            "name": "title",
            "isStatic": false,
            "accessor": "+",
            "type": ""
          }
        ],
        "extends_": [],
        "implements_": [],
        "generics": [],
        "stereotypes": []
      }
    ]
  }
]

The String type of the title attribute is not present in the output.

@songyang-dev songyang-dev added the bug Something isn't working label Apr 8, 2022
@Enteee
Copy link
Owner

Enteee commented Apr 10, 2022

good catch 👍 will try to get this fixed

@Enteee
Copy link
Owner

Enteee commented Apr 10, 2022

thank you for reporting this. This was implemented with #80 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants