Add new Plantuml generator for creating a schema diagram (#6255)

* add scaffolded new documentation generator files

* add openapi3 plantuml bin scripts

* change plantuml codegen to only generate a schemas.plantuml file

* initial plantuml schema diagram

* add item type to Lists

* add inheritance relationships

* add list one-to-many relationships

* add newline between model definitions and relationships

* add composition data type relationship

* remove allOf models and interface references

* add new entities data to SupportingFileData

* add List dataType support to entity fields

* remove composed types and remove allOf suffix from inline types

* add inheritances to supporting files data object

* add aggregation relationships to supporting file data

* add isList to compisition relationships

* refactor PlantumlDocumentationCodegenTest

* add property name to relationships

* remove old code form PlantumlDocumentationCodegen

* add plantuml generator sample output

* remove use of javafx.util.Pair

* fix casing of complex data type for fields

* add plantuml generator docs

* fix bug caused by assumption that inline _allOf types will always be unique but apparently they can be shared if they have identical properties!

* fix bug with missing relationships caused by shared identical _allOf schemas

Co-authored-by: Patrick.Burls <patrick.burls@bskyb.com>
This commit is contained in:
Patrick Burls
2020-05-14 11:20:26 +01:00
committed by GitHub
parent 9f95f0cf3d
commit f03458dde4
13 changed files with 837 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
#*.plantuml

View File

@@ -0,0 +1 @@
5.0.0-SNAPSHOT

View File

@@ -0,0 +1,54 @@
@startuml
title OpenAPI Petstore Schemas Diagram
entity ApiResponse {
code: Integer
type: String
message: String
}
entity Category {
id: Long
name: String
}
entity Order {
id: Long
petId: Long
quantity: Integer
shipDate: Date
status: String
complete: Boolean
}
entity Pet {
id: Long
category: Category
* name: String
* photoUrls: List<String>
tags: List<Tag>
status: String
}
entity Tag {
id: Long
name: String
}
entity User {
id: Long
username: String
firstName: String
lastName: String
email: String
password: String
phone: String
userStatus: Integer
}
Pet -- Category : category
Pet -- "0..*" Tag : tags
@enduml