forked from Apicurio/apicurio.github.io
-
Notifications
You must be signed in to change notification settings - Fork 1
add new codegen page #4
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
Open
AndreiZiatiev
wants to merge
4
commits into
djai-app:main
Choose a base branch
from
AndreiZiatiev:Docs--Add-new-page-for-Codegen
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| {% assign nav_segments = page.url | split: "/" %} | ||
| {% assign nav_segment = nav_segments[2] %} | ||
| <ul class="projnav nav"> | ||
| <li class="{% if nav_segment == blank %}active{% endif %}"> | ||
| <a href="{{ site.baseurl }}/codegen"> | ||
| <span>About</span> | ||
| <i class="fa fa-home" aria-hidden="true"></i> | ||
| </a> | ||
| </li> | ||
| <li class="{% if nav_segment == 'usage' %}active{% endif %}"> | ||
| <a href="{{ site.baseurl }}/codegen/usage"> | ||
| <span>Usage</span> | ||
| <i class="fa fa-book" aria-hidden="true"></i> | ||
| </a> | ||
| </li> | ||
| <li> | ||
| <a href="{{ site.github_codegen_url }}"> | ||
| <span>Source Code</span> | ||
| <i class="fa fa-github" aria-hidden="true"></i> | ||
| </a> | ||
| </li> | ||
| <li class="last"> | ||
| <a href="{{ site.github_codegen_url }}/issues"> | ||
| <span>Issue Tracker</span> | ||
| <i class="fa fa-bug" aria-hidden="true"></i> | ||
| </a> | ||
| </li> | ||
|
|
||
| </ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
|
|
||
| {%- include head.html -%} | ||
|
|
||
| <body> | ||
| {%- include header.html -%} | ||
|
|
||
| <div class="container projpage codegen"> | ||
| <div class="row"> | ||
| <div class="col-md-3"> | ||
| {%- include codegen/_projnav.html -%} | ||
| </div> | ||
| <div class="col-md-9"> | ||
| <h1 class="section-header first">{{ page.title }}</h1> | ||
| {{ content }} | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| {%- include footer.html -%} | ||
| </body> | ||
|
|
||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| --- | ||
| title: "Codegen" | ||
| permalink: /codegen/ | ||
| layout: page | ||
| --- | ||
|
|
||
| {% assign latestRelease = site.data.codegen.latestRelease %} | ||
| {% assign version = site.data.registry.latestRelease.tag_name | remove_first: "v" %} | ||
| {% assign theasset = site.data.registry.latestRelease.assets[0] %} | ||
|
|
||
| <div class="jumbotron codegen"> | ||
| <div class="logoimg"> | ||
| <img class="codegen-image" src="{{ site.baseurl }}/images/djai-code-generator.png" alt="apicurio datamodels subproject logo"> | ||
| </div> | ||
| <div class="tagline tagline-2"> | ||
| <span>Code Generation library for OpenAPI and AsyncAPI</span> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="quick-info"> | ||
|
|
||
| <div class="info info-with-divider"> | ||
| <span class="info-label">Version:</span> | ||
| <span class="info-value"> | ||
| <a href="{{ latestRelease.html_url }}"> | ||
| <span class="name">{{ latestRelease.name }}</span> | ||
| </a> | ||
| </span> | ||
| </div> | ||
|
|
||
| <div class="info"> | ||
| <span class="info-label"><span class="fa fa-fw fa-github"></span>Clone or fork</span> | ||
| <span class="info-value"><a href="{{ site.github_codegen_url }}">on GitHub</a></span> | ||
| </div> | ||
|
|
||
| </div> | ||
|
|
||
| <div class="container codegen"> | ||
| <div class="row"> | ||
| <div class="col-md-3"> | ||
| {%- include codegen/_projnav.html -%} | ||
| </div> | ||
| <div class="col-md-9"> | ||
| <div class="info"> | ||
| <div class="row summary"> | ||
| <div class="col-lg-10"> | ||
| <h1 class="section-header first">What is this library?</h1> | ||
| <div class="description"> | ||
| The DJAI Code Generator is a Java and Kotlin compatible library | ||
| that provides code generation for OpenAPI and AsyncAPI documents. | ||
| Use this library if you need to generate code for either OpenAPI or AsyncAPI specifications in your own projects. | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="row summary"> | ||
| <div class="col-lg-10"> | ||
| <h1 class="section-header first">Key Features</h1> | ||
| <div class="key-feature"> | ||
| <div class="header">Code generation</div> | ||
| <div class="description"> | ||
| Generate code in multiple languages from OpenAPI and AsyncAPI specifications. | ||
| </div> | ||
| <div class="header">Supports both Java and Kotlin</div> | ||
| <div class="description"> | ||
| Use this library in your Java or Kotlin based applications! | ||
| It works the same no matter how you use it. | ||
| </div> | ||
| <div class="header">Convert OpenAPI 2.0 to OpenAPI 3.0</div> | ||
| <div class="description"> | ||
| Includes a built-in transformer for easily converting older "Swagger" | ||
| documents into the newer OpenAPI 3 format. | ||
| </div> | ||
| <div class="header">Supports Mustache Templates</div> | ||
| <div class="description"> | ||
| Use Mustache templates to customize the generated code to your needs. | ||
| The library comes with a set of default templates, | ||
| but you can also create your own or override existing. | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| --- | ||
| layout: dm_usage_codegen | ||
| title: "Codegen : Usage" | ||
| permalink: /codegen/usage/ | ||
| excerpt: Learn how to use the Codegen | ||
| --- | ||
|
|
||
| {% assign latestRelease = site.data.codegen.latestRelease %} | ||
| {% assign version = site.data.codegen.latestRelease.tag_name | remove_first: "v" %} | ||
|
|
||
| A Java library for reading, manipulating, and writing OpenAPI and AsyncAPI documents. | ||
|
|
||
| Add to your maven project via: | ||
|
|
||
|
|
||
|
|
||
| ## DJAI Code Generation instrumentation. | ||
|
|
||
| DJAI is an instument to simplify & sistematize building of Enterprise class systems. The mission of DJAI – build development instrumentation to effectively design, generate, develop, & deploy microservice systems & modern web applications. | ||
|
|
||
| New features and instrumentation coming soon. | ||
|
|
||
| # Projects: | ||
|
|
||
| * codegen-cli – Codegen, takes OpenAPI specifications, settings, and generates the code for entire project incuding: data models, controllers, services, repositories, database tables, tests, entire configuration. Ready to run tests application. | ||
| * openapi-load (Deprecated) – API loader, connects to difhub.com, loads metadata of the selected system and converts it to the OpenAPI documents. | ||
| * intellij-idea (On Hold)– Plugin for the IntellijIdea to have UX. | ||
|
|
||
| ## Installation and usage instructions | ||
|
|
||
| `NOTE. Since project is in Preview, only usage in development mode available.` | ||
|
|
||
| **For new project:** | ||
|
|
||
| 1. Clone repository of the project | ||
| 2. Run ./gradlew intellij-plugin:runIde | ||
| 3. Select + Create New Project -> Bootstrap from DifHub (on left nav) | ||
| 4. Type your DifHub Username and Password, Organization Name where your system located. | ||
| 5. Select required system and change defaults (optional) -> Press Next | ||
| 6. Choose project name and directory | ||
| 7. Generate your project. Progress (or exception) you can see in the console output. | ||
|
|
||
|
|
||
| **For existing projects (coming soon):** | ||
|
|
||
| 1. Start plugin using the same 1. and 2. from above list | ||
| 2. Open existing project | ||
| 3. On the top (IJ) nav menu, right after the Tools find the DifHub menu item | ||
| 4. Click Load OpenApi to start initialization or load (if all settings are present in project) | ||
| 5. When all required are present – OpenAPI files will be generated by the plugin. | ||
| 6. Having all OpenAPI files and setting – click Generate Code in the Plugin menu. | ||
|
|
||
| **NOTE:** | ||
|
|
||
| > * if file djet/.credentials.yaml is missing – plugin will create and open one. Add right username, password, organization | ||
| > Note. this file added to gitignore file by generator so each user need to provide own credentials. | ||
| > | ||
| > * if file djet/settings.yaml is missing – plugin will create and open one. Add right settings. | ||
|
|
||
| **If any issue:** | ||
|
|
||
| 1. Fix the issue and create PR | ||
| 2. Post issue here on GitHub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| .projpage.codegen { | ||
| } | ||
|
|
||
| .projpage.codegen p { | ||
| font-size: 14px; | ||
| line-height: 20px; | ||
| margin-bottom: 15px; | ||
| } | ||
|
|
||
| .projpage.codegen h2 { | ||
| font-size: 24px; | ||
| text-shadow: 1px 1px 1px #abc; | ||
| } | ||
|
|
||
| .projpage.codegen h3 { | ||
| font-size: 20px; | ||
| text-shadow: 1px 1px 1px #abc; | ||
| } | ||
|
|
||
| .projpage.codegen h4 { | ||
| font-size: 16px; | ||
| text-shadow: 1px 1px 1px #abc; | ||
| } | ||
|
|
||
| .projpage.codegen table { | ||
| font-size: 15px; | ||
| border: 1px solid #ccc; | ||
| margin-bottom: 20px; | ||
| } | ||
|
|
||
| .projpage.codegen table th { | ||
| font-weight: 600; | ||
| background-color: #eef; | ||
| padding: 5px 10px 5px 10px; | ||
| border-bottom: 1px solid #ccc; | ||
| border-right: 1px solid #ccc; | ||
| border-radius: 2px; | ||
| } | ||
|
|
||
| .projpage.codegen table td { | ||
| padding: 5px 10px 5px 10px; | ||
| border-bottom: 1px solid #ccc; | ||
| border-right: 1px solid #ccc; | ||
| } | ||
|
|
||
| .projpage.codegen code { | ||
| font-size: 14px; | ||
| line-height: 20px; | ||
| } | ||
|
|
||
| .projpage.codegen ol li, .projpage.codegen ul li { | ||
| font-size: 14px; | ||
| } | ||
|
|
||
| .projpage.codegen ul { | ||
| padding-top: 15px; | ||
| padding-bottom: 2px; | ||
| } | ||
|
|
||
| .codegen blockquote { | ||
| border-left-color: #bbc; | ||
| background-color: #eef; | ||
| padding: 0px; | ||
| } | ||
|
|
||
| .codegen .key-feature .header { | ||
| color: #666; | ||
| font-size: 16px; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .codegen .key-feature .description { | ||
| font-size: 14px; | ||
| padding-left: 16px; | ||
| line-height: 16px; | ||
| padding-top: 10px; | ||
| padding-bottom: 10px; | ||
| } | ||
|
|
||
| .codegen h1.section-header { | ||
| font-size: 32px; | ||
| color: #656e82; | ||
| } | ||
|
|
||
| .codegen .col-lg-10 .description { | ||
| font-size: 14px; | ||
| line-height: 16px; | ||
| padding-top: 10px; | ||
| padding-bottom: 10px; | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.