forked from loafle/openapi-generator-original
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:
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
5.0.0-SNAPSHOT
|
||||
54
samples/documentation/petstore/plantuml/schemas.plantuml
Normal file
54
samples/documentation/petstore/plantuml/schemas.plantuml
Normal 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
|
||||
Reference in New Issue
Block a user