mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
docs(api): achieve 100% endpoint coverage in OpenAPI spec and VitePress docs (#54)
Add 12 previously undocumented routes to the OpenAPI 3.1 specification: content-aware-resize, edit-metadata (+ inspect), stitch, pdf-to-image (+ info, preview), gif-tools/info, remove-background/effects, preview, pipeline/tools, and pipeline/batch. Fix license from MIT to AGPL-3.0, correct DELETE /files response from 204 to 200 with body, and update VitePress API docs (rest.md tool table, ai.md model parameters). Also register the sharpen operation in the image-engine OPERATION_MAP so it can be used as a standalone pipeline step. Co-authored-by: stirling-image <stirling-image@users.noreply.github.com>
This commit is contained in:
co-authored by
stirling-image
parent
cd886f0f82
commit
34ec840b72
@@ -13,6 +13,7 @@ import { resize } from "./operations/resize.js";
|
||||
import { rotate } from "./operations/rotate.js";
|
||||
import { saturation } from "./operations/saturation.js";
|
||||
import { sepia } from "./operations/sepia.js";
|
||||
import { sharpen } from "./operations/sharpen.js";
|
||||
import { stripMetadata } from "./operations/strip-metadata.js";
|
||||
import type {
|
||||
BrightnessOptions,
|
||||
@@ -29,6 +30,7 @@ import type {
|
||||
RotateOptions,
|
||||
SaturationOptions,
|
||||
Sharp,
|
||||
SharpenOptions,
|
||||
StripMetadataOptions,
|
||||
} from "./types.js";
|
||||
import { getImageInfo } from "./utils/metadata.js";
|
||||
@@ -55,6 +57,7 @@ const OPERATION_MAP: Record<
|
||||
"color-channels": (img, opts) => colorChannels(img, opts as unknown as ColorChannelOptions),
|
||||
grayscale: (img) => grayscale(img),
|
||||
sepia: (img) => sepia(img),
|
||||
sharpen: (img, opts) => sharpen(img, opts as unknown as SharpenOptions),
|
||||
invert: (img) => invert(img),
|
||||
"edit-metadata": (img, opts) => editMetadata(img, opts as unknown as EditMetadataOptions),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user