-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Martin Dünkelmann <[email protected]>
- Loading branch information
Showing
141 changed files
with
12,863 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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,74 @@ | ||
name: CI Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build_frontend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout frontend | ||
uses: actions/[email protected] | ||
with: | ||
sparse-checkout: 'frontend' | ||
- name: Install PNPM | ||
uses: pnpm/[email protected] | ||
- name: Setup node env | ||
uses: actions/[email protected] | ||
with: | ||
cache: 'pnpm' | ||
check-latest: true | ||
node-version: 'lts/*' | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: Lint code | ||
run: pnpm prepare && pnpm lint | ||
- name: Build frontend | ||
run: quasar build | ||
- name: Upload frontend artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: frontend-build | ||
path: dist/spa/ | ||
build_backend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout backend | ||
uses: actions/[email protected] | ||
with: | ||
sparse-checkout: 'backend' | ||
- name: setup jdk 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
cache: 'gradle' | ||
distribution: 'temurin' | ||
java-version: '21' | ||
- name: Create needed folders for the frontend artifact | ||
run: | | ||
mkdir -p src/main/resources/static/ | ||
mkdir -p src/main/resources/templates/ | ||
- name: Download frontend artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: frontend-build | ||
path: src/main/resources/static/ | ||
- name: Move index.html from static to templates | ||
run: gradle bootJar | ||
- name: Upload backend artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: backend-build | ||
path: build/libs/openapi-catalog-*.jar | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download backend artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: backend-build | ||
path: build/libs/ | ||
- name: Upload release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: build/libs/ | ||
make_latest: true |
This file contains 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 |
---|---|---|
|
@@ -19,3 +19,6 @@ gradle-app.setting | |
.project | ||
# JDT-specific (Eclipse Java Development Tools) | ||
.classpath | ||
|
||
# IDE | ||
.idea |
This file contains 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 |
---|---|---|
@@ -1,2 +1,75 @@ | ||
# openapi-catalog | ||
Membrane OpenAPI Catalog | ||
# OpenAPI Catalog | ||
|
||
The Membrane OpenAPI Catalog manages OpenAPI specifications. | ||
Features: | ||
|
||
- Automatic updates | ||
- Linting | ||
- Diff checking for breaking changes | ||
|
||
## Requirements | ||
|
||
- Linux, macOS or Windows | ||
- x86-64 | ||
- Java 21 | ||
- Internet connection | ||
|
||
## Installation | ||
|
||
1. [Download the latest release](https://github.com/membrane/openapi-catalog/releases/latest) | ||
2. Execute the OpenAPI-Catalog with `java -jar openapi-catalog-{version}.jar` | ||
3. After you see `Completed initialization` in the terminal the application is ready. | ||
4. A browser window should open automatically. If not, [open the service in the browser](http://localhost:8000). | ||
|
||
## Configuration | ||
|
||
You can configurate the application by opening its file with an archive manager and edit specific files. | ||
|
||
### Database | ||
|
||
- file: /BOOT-INF/classes/application.yml | ||
- values: | ||
- datasource.username | ||
- file: /BOOT-INF/classes/application-prod.yml | ||
- values: | ||
- datasource.password | ||
- datasource.url | ||
|
||
### Port | ||
|
||
- file: /BOOT-INF/classes/application-prod.yml | ||
- values: | ||
- server.port | ||
|
||
### Used tools | ||
|
||
If the organization or repository names of the used tools change on GitHub, these values can be updated with the following parameters: | ||
|
||
- file: /BOOT-INF/classes/application.yml | ||
- values: | ||
- tools.diff.github.name | ||
_repository name_ | ||
- tools.diff.github.organization | ||
_organization name_ | ||
- tools.lint.github.name | ||
_repository name_ | ||
- tools.lint.github.organization | ||
_organization name_ | ||
|
||
## Automatic setup | ||
|
||
On execution, the software will do the following tasks: | ||
|
||
1. Installation of the tools: | ||
- If the tool doesn't exist or is older than the GitHub version, it will be downloaded. | ||
- If no internet is available and tools are already downloaded, the software will use them. | ||
- The location of the downloaded tools will be at `/home/{$HOME}/.predic8/openapicatalog/tools/`. | ||
- diff tool | ||
- filename: `openapi-changes` | ||
- version file: `.openapi-changes` | ||
- linting tool | ||
- filename: `spectral` | ||
- version file: `.spectral` | ||
2. Installation of the `hsqldb` database: | ||
- The database will be created at `/home/{$HOME}/.predic8/openapicatalog/database/` | ||
3. Update specifications which should be updated automatically. |
This file contains 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,43 @@ | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
bin/ | ||
!**/src/main/**/bin/ | ||
!**/src/test/**/bin/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Kotlin ### | ||
.kotlin | ||
/.idea/ | ||
|
||
### Frontend ### | ||
src/main/resources/static | ||
src/main/resources/templates |
This file contains 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,21 @@ | ||
# Backend | ||
|
||
## Run in development mode | ||
|
||
### Linux / Unix | ||
|
||
`./gradlew bootRun --args='--spring.profiles.active=dev'` | ||
|
||
### Windows | ||
|
||
`gradlew.bat bootRun --args="--spring.profiles.active=dev"` | ||
|
||
## Run in productive mode | ||
|
||
### Linux / Unix | ||
|
||
`./gradlew bootRun --args='--spring.profiles.active=prod'` | ||
|
||
### Windows | ||
|
||
`gradlew.bat bootRun --args="--spring.profiles.active=prod"` |
This file contains 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 @@ | ||
import org.gradle.api.JavaVersion.VERSION_21 | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask | ||
import org.springframework.boot.gradle.tasks.bundling.BootJar | ||
|
||
plugins { | ||
val kotlinVersion = "2.0.20" | ||
|
||
id("com.github.ben-manes.versions") version "0.51.0" | ||
id("io.spring.dependency-management") version "1.1.6" | ||
id("org.springframework.boot") version "3.3.3" | ||
|
||
kotlin("jvm") version kotlinVersion | ||
kotlin("plugin.jpa") version kotlinVersion | ||
kotlin("plugin.serialization") version kotlinVersion | ||
kotlin("plugin.spring") version kotlinVersion | ||
} | ||
|
||
group = "de.predic8" | ||
version = "1.0.0" | ||
|
||
java { | ||
sourceCompatibility = VERSION_21 | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// Database | ||
runtimeOnly("org.hsqldb:hsqldb") | ||
implementation("org.springframework.boot:spring-boot-starter-data-jpa") | ||
|
||
// (De-)Compression | ||
implementation("org.apache.commons:commons-compress:1.27.1") | ||
|
||
// (De-)Serialization | ||
implementation("com.charleskorn.kaml:kaml:0.61.0") | ||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.1") | ||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1") | ||
|
||
// Git | ||
implementation("org.eclipse.jgit:org.eclipse.jgit:6.10.0.202406032230-r") | ||
implementation("org.kohsuke:github-api:1.324") | ||
|
||
// Kotlin | ||
implementation("org.jetbrains.kotlin:kotlin-reflect") | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib") | ||
|
||
// Open the browser on startup | ||
implementation("org.seleniumhq.selenium:selenium-java:4.23.1") | ||
|
||
// OS detection | ||
implementation("org.apache.commons:commons-lang3:3.16.0") | ||
|
||
// Scheduler | ||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0-RC.2") | ||
|
||
// Versioning | ||
implementation("org.semver4j:semver4j:5.3.0") | ||
|
||
// Web | ||
implementation("org.springframework.boot:spring-boot-starter-security") | ||
implementation("org.springframework.boot:spring-boot-starter-thymeleaf") | ||
implementation("org.springframework.boot:spring-boot-starter-web") | ||
|
||
// Testing | ||
testImplementation("org.springframework.boot:spring-boot-starter-test") | ||
} | ||
|
||
tasks.named<BootJar>("bootJar") { | ||
archiveFileName = "openapi-catalog-${version}.jar" | ||
|
||
launchScript() | ||
} | ||
|
||
tasks.named("compileKotlin", KotlinCompilationTask::class.java) { | ||
compilerOptions { | ||
freeCompilerArgs.add("-Xjsr305=strict") | ||
} | ||
} | ||
|
||
tasks.withType<Test> { | ||
useJUnitPlatform() | ||
} |
Binary file not shown.
This file contains 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,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.