Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.
/ difhub-codegen Public archive

Set of tools for the Metadata Driven code generation. The output of the instrument - Spring/Kotlin Microservice system and Infrastructure as a code for it. Contains API loader, codegen, and IntelliJ Idea plugin. New features and instrumentation coming soon.

License

Notifications You must be signed in to change notification settings

v-bilous/difhub-codegen

Repository files navigation

MOVED TO DJET ORG https://github.com/DJetCloud/djet-codegen

Build Status codecov CodeFactor

DifHub Code Generation tools.

Set of tools for the integration with https://metucat.com (previously https://difhub.com). Contains API loader, codegen and IntelliJ Idea plugin. New features and instrumentation coming soon.

Projects:

  1. openapi-load – API loader, connects to difhub.com, loads metadata of the selected system and converts it to the OpenAPI documents.
  2. codegen-cli – Codegen, takes OpenAPI specifications, settings, and generates project
  3. intellij-idea – 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. Geneate 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)
    • if file .difhub-codegen/.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 .difhub-codegen/settings.yaml is missing – plugin will create and open one. Add right settings.
  5. When all required are present – OpenAPI files will be generated by plugin.
  6. Having all OpenAPI files and setting – click Generate Code in the Plugin menu.

If any issue:

  1. Fix the issue and create PR
  2. Post issue here on GitHub

About

Set of tools for the Metadata Driven code generation. The output of the instrument - Spring/Kotlin Microservice system and Infrastructure as a code for it. Contains API loader, codegen, and IntelliJ Idea plugin. New features and instrumentation coming soon.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5