Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ github_studio_url: https://github.com/apicurio/apicurio-studio
github_registry_url: https://github.com/apicurio/apicurio-registry
github_apicurito_url: https://github.com/apicurio/apicurito
github_datamodels_url: https://github.com/apicurio/apicurio-data-models
github_codegen_url: https://github.com/djai-app/djai-codegen
docker_hub_url: https://hub.docker.com/r/apicurio
try_now_url: https://studio.apicur.io/
mas_registry_url: https://console.redhat.com/application-services/service-registry
Expand Down
29 changes: 29 additions & 0 deletions _includes/codegen/_projnav.html
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>
3 changes: 3 additions & 0 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<li>
<a href="{{site.baseurl}}/datamodels/" class="{% if page.url contains '/datamodels/' %}active{% endif %}">Data Models</a>
</li>
<li>
<a href="{{site.baseurl}}/codegen/" class="{% if page.url contains '/codegen/' %}active{% endif %}">Codegen</a>
</li>
<li>
<a href="{{site.baseurl}}/apicurito/" class="{% if page.url contains '/apicurito/' %}active{% endif %}">Apicurito</a>
</li>
Expand Down
1 change: 1 addition & 0 deletions _includes/navtabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<li class="{% if first_segment == 'studio' %}active{% endif %}"><a href="{{ site.baseurl }}/studio">Studio</a></li>
<li class="{% if first_segment == 'registry' %}active{% endif %}"><a href="{{ site.baseurl }}/registry">Registry</a></li>
<li class="{% if first_segment == 'datamodels' %}active{% endif %}"><a href="{{ site.baseurl }}/datamodels">Data Models</a></li>
<li class="{% if first_segment == 'codegen' %}active{% endif %}"><a href="{{ site.baseurl }}/codegen">Codegen</a></li>
<li class="{% if first_segment == 'apicurito' %}active{% endif %}"><a href="{{ site.baseurl }}/apicurito">Apicurito</a></li>
</ul>
24 changes: 24 additions & 0 deletions _layouts/dm_usage_codegen.html
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>
85 changes: 85 additions & 0 deletions _pages/codegen/index.html
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>
63 changes: 63 additions & 0 deletions _pages/codegen/usage.md
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
2 changes: 1 addition & 1 deletion _pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h2><a href="{{ site.baseurl }}/registry/">Apicurio Registry</a></h2>
<div class="col-sm-6 col-md-6 contrib-block">
<a href="{{ site.baseurl }}/datamodels/"><img src="{{ site.baseurl }}images/subprojects/apicurio_datamodels_logo_default_h50px.png" alt="Apicurio Data Models subproject image"></a>
<h2><a href="{{ site.baseurl }}/datamodels/">Apicurio Data Models</a></h2>
<p>Data modeling library for OpenAPI and AsyncAPI specifications</p>
<p>Code generating for OpenAPI and AsyncAPI specifications</p>
Comment thread
AndreiZiatiev marked this conversation as resolved.
</div>
<div class="col-sm-6 col-md-6 contrib-block">
<a href="{{ site.baseurl }}/apicurito/"><img src="{{ site.baseurl }}images/subprojects/apicurio_apicurito_logo_default_h50px.png" alt="Apicurio Apicurito subproject image"></a>
Expand Down
91 changes: 91 additions & 0 deletions _sass/_codegen.scss
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;
}

13 changes: 13 additions & 0 deletions _sass/_jumbotron.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
margin: 0;
}

.jumbotron.codegen{
background-image: url(../images/jumbo-bg-codegen.png);
margin: 0;
}

.jumbotron.studio {
background-image: url(../images/jumbo-bg-studio.png);
}
Expand All @@ -25,6 +30,14 @@
padding-bottom: 3rem;
}

.jumbotron .logoimg .codegen-image {
width: 380px;

@media screen and (max-width: 993px) {
width: 60%;
}
}

.jumbotron .logoimg img {

@media screen and (max-width: 993px) {
Expand Down
1 change: 1 addition & 0 deletions css/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@import "blog";
@import "post";
@import "usage";
@import "codegen";
@import "contact";
@import "footer";
@import "trylive";
Expand Down
Binary file added images/dj-cdgn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/djai-code-generator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/jumbo-bg-codegen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.