add schema for upgrader
This commit is contained in:
@@ -89,6 +89,35 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ProblemDetails'
|
||||
/upgrade/settings:
|
||||
get:
|
||||
operationId: GetUpgradeSettings
|
||||
responses:
|
||||
'200':
|
||||
description: 200 response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UpgradeSettingsResponse'
|
||||
default:
|
||||
description: default response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ProblemDetails'
|
||||
/upgrade/authorize:
|
||||
post:
|
||||
operationId: PostUpgradeAuthorize
|
||||
parameters: []
|
||||
responses:
|
||||
'201':
|
||||
description: 201 response
|
||||
'400':
|
||||
description: 400 response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ProblemDetails'
|
||||
/user:
|
||||
get:
|
||||
operationId: GetUser
|
||||
@@ -339,6 +368,25 @@ components:
|
||||
type: string
|
||||
required:
|
||||
- version
|
||||
UpgradeSettingsResponse:
|
||||
type: object
|
||||
properties:
|
||||
currentState:
|
||||
type: string
|
||||
newState:
|
||||
type: string
|
||||
newVersion:
|
||||
type: string
|
||||
oldVersion:
|
||||
type: string
|
||||
reportUrl:
|
||||
type: string
|
||||
required:
|
||||
- currentState
|
||||
- newState
|
||||
- newVersion
|
||||
- oldVersion
|
||||
- reportUrl
|
||||
UserResponse:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import './installer';
|
||||
import './server';
|
||||
import './upgrader';
|
||||
import './user';
|
||||
|
||||
import { api } from '@airtasker/spot';
|
||||
|
||||
38
src/Umbraco.Web.UI.Client/temp-schema-generator/upgrader.ts
Normal file
38
src/Umbraco.Web.UI.Client/temp-schema-generator/upgrader.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { body, defaultResponse, endpoint, request, response } from '@airtasker/spot';
|
||||
|
||||
import { ProblemDetails } from './models';
|
||||
|
||||
@endpoint({
|
||||
method: 'GET',
|
||||
path: '/upgrade/settings',
|
||||
})
|
||||
export class GetUpgradeSettings {
|
||||
@response({ status: 200 })
|
||||
success(@body body: UpgradeSettingsResponse) {}
|
||||
|
||||
@defaultResponse
|
||||
default(@body body: ProblemDetails) {}
|
||||
}
|
||||
|
||||
@endpoint({
|
||||
method: 'POST',
|
||||
path: '/upgrade/authorize',
|
||||
})
|
||||
export class PostUpgradeAuthorize {
|
||||
@request
|
||||
request() {}
|
||||
|
||||
@response({ status: 201 })
|
||||
success() {}
|
||||
|
||||
@response({ status: 400 })
|
||||
badRequest(@body body: ProblemDetails) {}
|
||||
}
|
||||
|
||||
export interface UpgradeSettingsResponse {
|
||||
currentState: string;
|
||||
newState: string;
|
||||
newVersion: string;
|
||||
oldVersion: string;
|
||||
reportUrl: string;
|
||||
}
|
||||
Reference in New Issue
Block a user