generated from one-zero-eight/fastapi-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings.schema.yaml
173 lines (173 loc) · 4.38 KB
/
settings.schema.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
$schema: https://json-schema.org/draft-07/schema
$defs:
Accounts:
additionalProperties: false
description: InNoHassle Accounts integration settings
properties:
api_url:
default: https://api.innohassle.ru/accounts/v0
description: URL of the Accounts API
title: Api Url
type: string
api_jwt_token:
description: JWT token for accessing the Accounts API as a service
format: password
title: Api Jwt Token
type: string
writeOnly: true
required:
- api_jwt_token
title: Accounts
type: object
Environment:
enum:
- development
- production
title: Environment
type: string
Exchange:
additionalProperties: false
description: Exchange (Outlook) integration settings
properties:
ews_endpoint:
default: https://mail.innopolis.ru/EWS/Exchange.asmx
description: URL of the EWS endpoint
title: Ews Endpoint
type: string
username:
description: Username for accessing the EWS endpoint (email)
title: Username
type: string
password:
description: Password for accessing the EWS endpoint
format: password
title: Password
type: string
writeOnly: true
required:
- username
- password
title: Exchange
type: object
MyUni:
additionalProperties: false
description: My University integration settings
properties:
api_url:
default: https://my.university.innopolis.ru/apiv1
description: URL of the My University API
title: Api Url
type: string
secret_token:
description: Secret token for My University API
format: password
title: Secret Token
type: string
writeOnly: true
required:
- secret_token
title: MyUni
type: object
Room:
additionalProperties: false
description: Room description.
properties:
id:
description: Room slug
title: Id
type: string
title:
description: Room title
title: Title
type: string
short_name:
description: Shorter version of room title
title: Short Name
type: string
resource_email:
description: Email of the room resource
title: Resource Email
type: string
my_uni_id:
description: ID of room on My University portal
title: My Uni Id
type: integer
capacity:
anyOf:
- type: integer
- type: 'null'
default: null
description: Room capacity, amount of people
title: Capacity
access_level:
anyOf:
- enum:
- yellow
- red
- special
type: string
- type: 'null'
default: null
description: Access level to the room. Yellow = for students. Red = for employees.
Special = special rules apply.
title: Access Level
restrict_daytime:
default: false
description: Prohibit to book during working hours. True = this room is available
only at night 19:00-8:00, or full day on weekends.
title: Restrict Daytime
type: boolean
required:
- id
- title
- short_name
- resource_email
- my_uni_id
title: Room
type: object
additionalProperties: false
description: Settings for the application.
properties:
$schema:
default: null
title: $Schema
type: string
environment:
$ref: '#/$defs/Environment'
default: development
description: App environment flag
app_root_path:
default: ''
description: Prefix for the API path (e.g. "/api/v0")
title: App Root Path
type: string
rooms:
default: []
description: List of rooms
items:
$ref: '#/$defs/Room'
title: Rooms
type: array
ics_cache_ttl_seconds:
default: 60
description: TTL for the ICS cache in seconds
title: Ics Cache Ttl Seconds
type: integer
cors_allow_origin_regex:
default: .*
description: 'Allowed origins for CORS: from which domains requests to the API
are allowed. Specify as a regex: `https://.*.innohassle.ru`'
title: Cors Allow Origin Regex
type: string
accounts:
$ref: '#/$defs/Accounts'
my_uni:
$ref: '#/$defs/MyUni'
exchange:
$ref: '#/$defs/Exchange'
required:
- accounts
- my_uni
- exchange
title: Settings
type: object