Skip to content

Instantly share code, notes, and snippets.

@wtrocki
Created December 2, 2022 13:51
Show Gist options
  • Save wtrocki/2e272375386ddecff69d6228c89d2a05 to your computer and use it in GitHub Desktop.
Save wtrocki/2e272375386ddecff69d6228c89d2a05 to your computer and use it in GitHub Desktop.
openapi: 3.0.1
info:
description: |-
API
license:
name: Apache
title: API
version: "1.0"
paths:
"/test":
get:
responses:
"200":
description: "test"
content:
application/json:
schema:
$ref: '#/components/schemas/OnlineArchiveScheduleView'
components:
schemas:
OnlineArchiveScheduleView:
type: object
description: Regular frequency and duration when archiving process occurs.
discriminator:
mapping:
DAILY: '#/components/schemas/DailyScheduleView'
DEFAULT: '#/components/schemas/DefaultScheduleView'
MONTHLY: '#/components/schemas/MonthlyScheduleView'
WEEKLY: '#/components/schemas/WeeklyScheduleView'
propertyName: type
oneOf:
- $ref: '#/components/schemas/DefaultScheduleView'
- $ref: '#/components/schemas/DailyScheduleView'
- $ref: '#/components/schemas/WeeklyScheduleView'
- $ref: '#/components/schemas/MonthlyScheduleView'
properties:
type:
type: string
required:
- type
title: Online Archive Schedule
DailyScheduleView:
type: object
allOf:
- $ref: '#/components/schemas/OnlineArchiveScheduleView'
- type: object
properties:
endHour:
type: integer
format: int32
description: Hour of the day when the scheduled window to run one online
archive ends.
maximum: 23
minimum: 0
endMinute:
type: integer
format: int32
description: Minute of the hour when the scheduled window to run one online
archive ends.
maximum: 59
minimum: 0
startHour:
type: integer
format: int32
description: Hour of the day when the when the scheduled window to run
one online archive starts.
maximum: 23
minimum: 0
startMinute:
type: integer
format: int32
description: Minute of the hour when the scheduled window to run one online
archive starts.
maximum: 59
minimum: 0
DefaultScheduleView:
type: object
allOf:
- $ref: '#/components/schemas/OnlineArchiveScheduleView'
WeeklyScheduleView:
type: object
allOf:
- $ref: '#/components/schemas/OnlineArchiveScheduleView'
- type: object
properties:
dayOfWeek:
type: integer
format: int32
description: Day of the week when the scheduled archive starts. The week
starts with Monday (`1`) and ends with Sunday (`7`).
maximum: 7
minimum: 1
endHour:
type: integer
format: int32
description: Hour of the day when the scheduled window to run one online
archive ends.
maximum: 23
minimum: 0
endMinute:
type: integer
format: int32
description: Minute of the hour when the scheduled window to run one online
archive ends.
maximum: 59
minimum: 0
startHour:
type: integer
format: int32
description: Hour of the day when the when the scheduled window to run
one online archive starts.
maximum: 23
minimum: 0
startMinute:
type: integer
format: int32
description: Minute of the hour when the scheduled window to run one online
archive starts.
maximum: 59
minimum: 0
MonthlyScheduleView:
type: object
allOf:
- $ref: '#/components/schemas/OnlineArchiveScheduleView'
- type: object
properties:
dayOfMonth:
type: integer
format: int32
description: Day of the month when the scheduled archive starts.
maximum: 31
minimum: 1
endHour:
type: integer
format: int32
description: Hour of the day when the scheduled window to run one online
archive ends.
maximum: 23
minimum: 0
endMinute:
type: integer
format: int32
description: Minute of the hour when the scheduled window to run one online
archive ends.
maximum: 59
minimum: 0
startHour:
type: integer
format: int32
description: Hour of the day when the when the scheduled window to run
one online archive starts.
maximum: 23
minimum: 0
startMinute:
type: integer
format: int32
description: Minute of the hour when the scheduled window to run one online
archive starts.
maximum: 59
minimum: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment