docs: add api doc

This commit is contained in:
2023-07-05 11:16:46 +02:00
parent 11c9d742cd
commit 16a039a16e
12 changed files with 115 additions and 1707 deletions

View File

@@ -1,7 +1,8 @@
--- ---
'@openstapps/projectmanagement': major '@openstapps/projectmanagement': major
'@openstapps/builder-image': major
'@openstapps/node-image': major '@openstapps/node-image': major
--- ---
Move images to separate packages Move images to separate packages
Removed builder image due to migration to Kaniko

View File

@@ -7,6 +7,7 @@ deploy:
artifacts: artifacts:
paths: paths:
- ./.deploy - ./.deploy
- ./frontend/app/www
rules: rules:
- when: on_success - when: on_success
@@ -43,8 +44,6 @@ publish image:
DEPLOY_DIR: .deploy/minimal-plugin DEPLOY_DIR: .deploy/minimal-plugin
- IMAGE_NAME: node - IMAGE_NAME: node
DEPLOY_DIR: configuration/node-image DEPLOY_DIR: configuration/node-image
- IMAGE_NAME: builder
DEPLOY_DIR: configuration/builder-image
- IMAGE_NAME: app-builder - IMAGE_NAME: app-builder
DEPLOY_DIR: configuration/app-builder-image DEPLOY_DIR: configuration/app-builder-image
- IMAGE_NAME: app - IMAGE_NAME: app

View File

@@ -32,7 +32,6 @@
"build:docker": "docker build -t openstapps:backend ../../.deploy/backend", "build:docker": "docker build -t openstapps:backend ../../.deploy/backend",
"deploy": "pnpm --prod --filter=@openstapps/backend deploy ../../.deploy/backend", "deploy": "pnpm --prod --filter=@openstapps/backend deploy ../../.deploy/backend",
"dev": "tsup --watch --onSuccess \"pnpm run start\"", "dev": "tsup --watch --onSuccess \"pnpm run start\"",
"docs:disabled": "openapi build-docs --file ./node_modules/@openstapps/core/lib/openapi.json --output-dir docs/openapi",
"format": "prettier . -c --ignore-path ../../.gitignore", "format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore", "format:fix": "prettier --write . --ignore-path ../../.gitignore",
"lint": "tsc --noEmit && eslint --ext .ts src/", "lint": "tsc --noEmit && eslint --ext .ts src/",
@@ -95,8 +94,6 @@
"mocha": "10.2.0", "mocha": "10.2.0",
"mocha-junit-reporter": "2.2.0", "mocha-junit-reporter": "2.2.0",
"mocked-env": "1.3.5", "mocked-env": "1.3.5",
"openapi": "1.0.1",
"redoc-cli": "0.13.20",
"sinon": "15.0.4", "sinon": "15.0.4",
"sinon-express-mock": "2.2.1", "sinon-express-mock": "2.2.1",
"supertest": "6.3.3", "supertest": "6.3.3",

View File

@@ -1,22 +0,0 @@
FROM docker/compose
ARG NODE_VERSION="18"
RUN apk update && apk add nodejs npm git jq curl
RUN export DOWNLOAD_VERSION=$(curl -fsSL --compressed https://unofficial-builds.nodejs.org/download/release/index.json | \
jq --raw-output ".[]|select(.version | startswith(\"v$NODE_VERSION\"))|.version" | head -1) && \
curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/$DOWNLOAD_VERSION/node-$DOWNLOAD_VERSION-linux-x64-musl.tar.xz" && \
tar -xJf "node-$DOWNLOAD_VERSION-linux-x64-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner && \
ln -sf /usr/local/bin/node /usr/local/bin/nodejs
ADD . /opt/openstapps/projectmanagement
WORKDIR /opt/openstapps/projectmanagement
RUN npm ci && \
npm run build && \
chmod +x /opt/openstapps/projectmanagement/lib/cli.js && \
ln -s /opt/openstapps/projectmanagement/lib/cli.js /usr/bin/openstapps-projectmanagement
CMD []

View File

@@ -1,20 +0,0 @@
{
"name": "@openstapps/builder-image",
"version": "3.0.0-next.3",
"private": true,
"type": "module",
"license": "GPL-3.0-only",
"author": "Karl-Philipp Wulfert <krlwlfrt@gmail.com>",
"contributors": [
"Anselm Stordeur <anselmstordeur@gmail.com>",
"Jovan Krunić <jovan.krunic@gmail.com>",
"Michel Jonathan Schmitz",
"Rainer Killinger <mail-openstapps@killinger.co>",
"Thea Schöbl <dev@theaninova.de>"
],
"files": [
"Dockerfile",
"README.md",
"CHANGELOG.md"
]
}

View File

@@ -15,16 +15,13 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files // This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/testing'; import 'zone.js/testing';
import {getTestBed} from '@angular/core/testing'; import {getTestBed} from '@angular/core/testing';
import { import {BrowserTestingModule, platformBrowserTesting} from '@angular/platform-browser/testing';
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
declare const require: any; declare const require: any;
// First, initialize the Angular testing environment. // First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting());
// Then we find all the tests. // Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/); const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules. // And load the modules.

View File

@@ -12,7 +12,7 @@
"changeset:status": "changeset status", "changeset:status": "changeset status",
"deploy": "dotenv -c -- turbo run deploy --concurrency=1", "deploy": "dotenv -c -- turbo run deploy --concurrency=1",
"dev": "dotenv -c -- turbo run dev", "dev": "dotenv -c -- turbo run dev",
"docs": "dotenv -c -- turbo run docs && typedoc", "docs": "dotenv -c -- turbo run docs && typedoc && mkdir docs/api && cp packages/core/lib/api-doc.html docs/api/index.html && cp packages/core/lib/openapi.json docs/api/openapi.json && cp -r packages/core/lib/schema docs/api/schema",
"format": "dotenv -c -- turbo run format", "format": "dotenv -c -- turbo run format",
"format:fix": "dotenv -c -- turbo run format:fix", "format:fix": "dotenv -c -- turbo run format:fix",
"lint": "dotenv -c -- turbo run lint", "lint": "dotenv -c -- turbo run lint",

View File

@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>OpenStApps API</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
rel="stylesheet"
/>
<!-- Redoc doesn't change outer page styles -->
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<redoc spec-url="openapi.json"></redoc>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
</body>
</html>

View File

@@ -32,7 +32,7 @@
"CHANGELOG.md" "CHANGELOG.md"
], ],
"scripts": { "scripts": {
"build": "tsup-node --dts && pnpm run mappings && pnpm run schema && pnpm run openapi", "build": "tsup-node --dts && pnpm run mappings && pnpm run schema && pnpm run openapi && cp api-doc.html lib/api-doc.html",
"docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts", "docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts",
"format": "prettier . -c --ignore-path ../../.gitignore", "format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore", "format:fix": "prettier --write . --ignore-path ../../.gitignore",

1736
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,7 @@
"entryPoints": ["packages/**/docs/docs.json"], "entryPoints": ["packages/**/docs/docs.json"],
"out": "./docs", "out": "./docs",
"navigationLinks": { "navigationLinks": {
"API": "api",
"GitLab": "https://gitlab.com/openstapps/openstapps/", "GitLab": "https://gitlab.com/openstapps/openstapps/",
"Wiki": "https://gitlab.com/openstapps/openstapps/-/wikis/home" "Wiki": "https://gitlab.com/openstapps/openstapps/-/wikis/home"
}, },