Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
prisma-markdown
Advanced tools
Prisma Markdown documents generator including ERD diagrams and comment descriptions
Prisma markdown documents generator.
///
comments@namespace
commentsIf you want to see how markdown document being generated, visit below examples:
At first, install NPM package.
npm i -D prisma-markdown
At next, add the generator to the schema file.
generator markdown {
provider = "prisma-markdown"
output = "./ERD.md"
title = "Shopping Mall"
}
At last, run below command, than ERD.md file would be generated.
npx prisma generate
If your database has over hundreds of models, none of automatic ERD generators can express them perfect. In that case, prisma-markdown
recommends you to separate hundreds of models to multiple paginated diagrams by using /// @namepsace <name>
comments.
When you write /// @namepsace <name>
comment on models, they would be separated to proper sections of markdown document. For reference, you can assign multiple @namepsace
s to a model, and if you do not assign any @namepsace
to a model, it would be assigned to default
tag.
Also, if you use @erd <name>
instead of @namespace <name>
, target model would be expressed only at ERD. It would not be appeared to the markdown content section. Otherwise, @describe <name>
tag will show the model only at markdown content section, not at ERD.
@namespace <name>
: Both ERD and markdown content@erd <name>
: Only ERD@describe <name>
: Only markdown content@hidden
: Neither ERD nor markdown content@minItems 1
: Mandatory relationship when 1: N (||---|{
)/// Both description and ERD on Actors chatper.
///
/// Also, only ERD on Articles and Orders chapters.
///
/// @namespace Actors
/// @erd Articles
/// @erd Orders
model shopping_customers {
/// The tag "minItems 1" means mandatory relationship `||---|{`.
///
/// Otherwise, no tag means optional relationship `||---o{`.
///
/// @minItems 1
login_histories shopping_customer_login_histories[]
}
/// Only description on Actors chapter.
///
/// @describe Actors
model shopping_customer_login_histories {}
/// Only ERD on Articles chapter.
///
/// @erd Articles
model shopping_sale_reviews {}
/// Never be shown.
///
/// @hidden
model shopping_sale_hits {}
FAQs
Prisma Markdown documents generator including ERD diagrams and comment descriptions
The npm package prisma-markdown receives a total of 10,617 weekly downloads. As such, prisma-markdown popularity was classified as popular.
We found that prisma-markdown demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.