Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

Commit 223dd88

Browse files
committed
feat: initial release
Signed-off-by: Martin Dünkelmann <duenkelmann@predic8.de>
1 parent 8b1cfb0 commit 223dd88

141 files changed

Lines changed: 12884 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci_release.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: CI Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build_frontend:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout frontend
11+
uses: actions/checkout@v4.1.7
12+
with:
13+
sparse-checkout: 'frontend'
14+
- name: Install PNPM
15+
uses: pnpm/action-setup@v4.0.0
16+
with:
17+
package_json_file: 'frontend/package.json'
18+
- name: Setup node env
19+
uses: actions/setup-node@v4.0.3
20+
with:
21+
cache: 'pnpm'
22+
cache-dependency-path: 'frontend/pnpm-lock.yaml'
23+
check-latest: true
24+
node-version: 'lts/*'
25+
- name: Install dependencies
26+
run: pnpm install --frozen-lockfile
27+
working-directory: 'frontend'
28+
- name: Lint code
29+
run: pnpm prepare && pnpm lint
30+
working-directory: 'frontend'
31+
- name: Build frontend
32+
run: pnpm build
33+
working-directory: 'frontend'
34+
- name: Upload frontend artifact
35+
uses: actions/upload-artifact@v4.3.6
36+
with:
37+
name: frontend-build
38+
path: frontend/dist/spa/
39+
build_backend:
40+
needs: build_frontend
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout backend
44+
uses: actions/checkout@v4.1.7
45+
with:
46+
sparse-checkout: 'backend'
47+
- name: Setup java env
48+
uses: actions/setup-java@v4.2.2
49+
with:
50+
cache: 'gradle'
51+
distribution: 'temurin'
52+
java-version: '21'
53+
- name: Create needed folders for the frontend artifact
54+
run: |
55+
mkdir -p src/main/resources/static/
56+
mkdir -p src/main/resources/templates/
57+
working-directory: 'backend'
58+
- name: Download frontend artifact
59+
uses: actions/download-artifact@v4.1.8
60+
with:
61+
name: frontend-build
62+
path: backend/src/main/resources/static/
63+
- name: Move index.html from static to templates
64+
run: gradle bootJar
65+
working-directory: 'backend'
66+
- name: Upload backend artifact
67+
uses: actions/upload-artifact@v4.3.6
68+
with:
69+
name: backend-build
70+
path: backend/build/libs/openapi-catalog-*.jar
71+
release:
72+
needs: build_backend
73+
runs-on: ubuntu-latest
74+
steps:
75+
- name: Download backend artifact
76+
uses: actions/download-artifact@v4.1.8
77+
with:
78+
name: backend-build
79+
path: build/libs/
80+
- name: Find artifact filename
81+
run: |
82+
echo "FILENAME=$(basename build/libs/openapi-catalog-*.jar)" >> "$GITHUB_ENV"
83+
- name: Create release tag
84+
run: |
85+
TAG_NAME=${{ github.event.head_commit.timestamp }}
86+
TAG_NAME=${TAG_NAME//:/-}
87+
echo "TAG_NAME=${TAG_NAME}" >> "$GITHUB_ENV"
88+
- name: Upload release
89+
uses: softprops/action-gh-release@v2
90+
with:
91+
files: build/libs/${{ env.FILENAME }}
92+
make_latest: true
93+
tag_name: ${{ env.TAG_NAME }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ gradle-app.setting
1919
.project
2020
# JDT-specific (Eclipse Java Development Tools)
2121
.classpath
22+
23+
# IDE
24+
.idea

README.md

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,75 @@
1-
# openapi-catalog
2-
Membrane OpenAPI Catalog
1+
# OpenAPI Catalog
2+
3+
The Membrane OpenAPI Catalog manages OpenAPI specifications.
4+
Features:
5+
6+
- Automatic updates
7+
- Linting
8+
- Diff checking for breaking changes
9+
10+
## Requirements
11+
12+
- Linux, macOS or Windows
13+
- x86-64
14+
- Java 21
15+
- Internet connection
16+
17+
## Installation
18+
19+
1. [Download the latest release](https://github.com/membrane/openapi-catalog/releases/latest)
20+
2. Execute the OpenAPI-Catalog with `java -jar openapi-catalog-{version}.jar`
21+
3. After you see `Completed initialization` in the terminal the application is ready.
22+
4. A browser window should open automatically. If not, [open the service in the browser](http://localhost:8000).
23+
24+
## Configuration
25+
26+
You can configurate the application by opening its file with an archive manager and edit specific files.
27+
28+
### Database
29+
30+
- file: /BOOT-INF/classes/application.yml
31+
- values:
32+
- datasource.username
33+
- file: /BOOT-INF/classes/application-prod.yml
34+
- values:
35+
- datasource.password
36+
- datasource.url
37+
38+
### Port
39+
40+
- file: /BOOT-INF/classes/application-prod.yml
41+
- values:
42+
- server.port
43+
44+
### Used tools
45+
46+
If the organization or repository names of the used tools change on GitHub, these values can be updated with the following parameters:
47+
48+
- file: /BOOT-INF/classes/application.yml
49+
- values:
50+
- tools.diff.github.name
51+
_repository name_
52+
- tools.diff.github.organization
53+
_organization name_
54+
- tools.lint.github.name
55+
_repository name_
56+
- tools.lint.github.organization
57+
_organization name_
58+
59+
## Automatic setup
60+
61+
On execution, the software will do the following tasks:
62+
63+
1. Installation of the tools:
64+
- If the tool doesn't exist or is older than the GitHub version, it will be downloaded.
65+
- If no internet is available and tools are already downloaded, the software will use them.
66+
- The location of the downloaded tools will be at `/home/{$HOME}/.predic8/openapicatalog/tools/`.
67+
- diff tool
68+
- filename: `openapi-changes`
69+
- version file: `.openapi-changes`
70+
- linting tool
71+
- filename: `spectral`
72+
- version file: `.spectral`
73+
2. Installation of the `hsqldb` database:
74+
- The database will be created at `/home/{$HOME}/.predic8/openapicatalog/database/`
75+
3. Update specifications which should be updated automatically.

backend/.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
bin/
16+
!**/src/main/**/bin/
17+
!**/src/test/**/bin/
18+
19+
### IntelliJ IDEA ###
20+
.idea
21+
*.iws
22+
*.iml
23+
*.ipr
24+
out/
25+
!**/src/main/**/out/
26+
27+
### NetBeans ###
28+
/nbproject/private/
29+
/nbbuild/
30+
/dist/
31+
/nbdist/
32+
/.nb-gradle/
33+
34+
### VS Code ###
35+
.vscode/
36+
37+
### Kotlin ###
38+
.kotlin
39+
/.idea/
40+
41+
### Frontend ###
42+
src/main/resources/static
43+
src/main/resources/templates

backend/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Backend
2+
3+
## Run in development mode
4+
5+
### Linux / Unix
6+
7+
`./gradlew bootRun --args='--spring.profiles.active=dev'`
8+
9+
### Windows
10+
11+
`gradlew.bat bootRun --args="--spring.profiles.active=dev"`
12+
13+
## Run in productive mode
14+
15+
### Linux / Unix
16+
17+
`./gradlew bootRun --args='--spring.profiles.active=prod'`
18+
19+
### Windows
20+
21+
`gradlew.bat bootRun --args="--spring.profiles.active=prod"`

backend/build.gradle.kts

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import org.gradle.api.JavaVersion.VERSION_21
2+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
3+
import org.springframework.boot.gradle.tasks.bundling.BootJar
4+
5+
plugins {
6+
val kotlinVersion = "2.0.20"
7+
8+
id("com.github.ben-manes.versions") version "0.51.0"
9+
id("io.spring.dependency-management") version "1.1.6"
10+
id("org.springframework.boot") version "3.3.3"
11+
12+
kotlin("jvm") version kotlinVersion
13+
kotlin("plugin.jpa") version kotlinVersion
14+
kotlin("plugin.serialization") version kotlinVersion
15+
kotlin("plugin.spring") version kotlinVersion
16+
}
17+
18+
group = "de.predic8"
19+
version = "1.0.0"
20+
21+
java {
22+
sourceCompatibility = VERSION_21
23+
}
24+
25+
repositories {
26+
mavenCentral()
27+
}
28+
29+
dependencies {
30+
// Database
31+
runtimeOnly("org.hsqldb:hsqldb")
32+
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
33+
34+
// (De-)Compression
35+
implementation("org.apache.commons:commons-compress:1.27.1")
36+
37+
// (De-)Serialization
38+
implementation("com.charleskorn.kaml:kaml:0.61.0")
39+
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.1")
40+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1")
41+
42+
// Git
43+
implementation("org.eclipse.jgit:org.eclipse.jgit:6.10.0.202406032230-r")
44+
implementation("org.kohsuke:github-api:1.324")
45+
46+
// Kotlin
47+
implementation("org.jetbrains.kotlin:kotlin-reflect")
48+
implementation("org.jetbrains.kotlin:kotlin-stdlib")
49+
50+
// Open the browser on startup
51+
implementation("org.seleniumhq.selenium:selenium-java:4.23.1")
52+
53+
// OS detection
54+
implementation("org.apache.commons:commons-lang3:3.16.0")
55+
56+
// Scheduler
57+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0-RC.2")
58+
59+
// Versioning
60+
implementation("org.semver4j:semver4j:5.3.0")
61+
62+
// Web
63+
implementation("org.springframework.boot:spring-boot-starter-security")
64+
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
65+
implementation("org.springframework.boot:spring-boot-starter-web")
66+
67+
// Testing
68+
testImplementation("org.springframework.boot:spring-boot-starter-test")
69+
}
70+
71+
tasks.named<BootJar>("bootJar") {
72+
archiveFileName = "openapi-catalog-${version}.jar"
73+
74+
launchScript()
75+
}
76+
77+
tasks.named("compileKotlin", KotlinCompilationTask::class.java) {
78+
compilerOptions {
79+
freeCompilerArgs.add("-Xjsr305=strict")
80+
}
81+
}
82+
83+
tasks.withType<Test> {
84+
useJUnitPlatform()
85+
}
42.6 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)