add endpoint to fetch packages

This commit is contained in:
Jacob Overgaard
2022-09-05 10:21:47 +02:00
parent bd56659688
commit 8ceb60a726
2 changed files with 35 additions and 0 deletions

View File

@@ -73,6 +73,22 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/manifests/packages:
get:
operationId: Packages
responses:
'200':
description: 200 response
content:
application/json:
schema:
$ref: '#/components/schemas/PackagesResponse'
default:
description: default response
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemDetails'
/server/status:
get:
operationId: GetStatus

View File

@@ -11,6 +11,15 @@ export class Manifests {
default(@body body: ProblemDetails) {}
}
@endpoint({ method: 'GET', path: '/manifests/packages' })
export class Packages {
@response({ status: 200 })
response(@body body: PackagesResponse) {}
@defaultResponse
default(@body body: ProblemDetails) {}
}
export type Manifest =
| IManifestSection
| IManifestPropertyEditorUI
@@ -32,6 +41,16 @@ export interface ManifestsResponse {
manifests: Manifest[];
}
export interface PackagesResponse {
packages: Package[];
}
export interface Package {
name: string;
alias: string;
version: string;
}
export interface IManifest {
type: string;
alias: string;