correct openapi schema

This commit is contained in:
bakito 2022-03-12 12:46:15 +01:00
parent e7b3c9969b
commit c346216424
No known key found for this signature in database
GPG Key ID: FAF93C1C384DD6B4
2 changed files with 8 additions and 10 deletions

View File

@ -316,7 +316,7 @@ type filterJSON struct {
URL string `json:"url"` URL string `json:"url"`
Name string `json:"name"` Name string `json:"name"`
RulesCount uint32 `json:"rules_count"` RulesCount uint32 `json:"rules_count"`
LastUpdated string `json:"last_updated"` LastUpdated string `json:"last_updated,omitempty"`
} }
type filteringConfig struct { type filteringConfig struct {

View File

@ -1396,7 +1396,6 @@
'required': 'required':
- 'enabled' - 'enabled'
- 'id' - 'id'
- 'last_updated'
- 'name' - 'name'
- 'rules_count' - 'rules_count'
- 'url' - 'url'
@ -1434,6 +1433,10 @@
'type': 'array' 'type': 'array'
'items': 'items':
'$ref': '#/components/schemas/Filter' '$ref': '#/components/schemas/Filter'
'whitelist_filters':
'type': 'array'
'items':
'$ref': '#/components/schemas/Filter'
'user_rules': 'user_rules':
'type': 'array' 'type': 'array'
'items': 'items':
@ -1451,14 +1454,7 @@
'description': 'Filtering URL settings' 'description': 'Filtering URL settings'
'properties': 'properties':
'data': 'data':
'properties': '$ref': '#/components/schemas/Filter'
'enabled':
'type': 'boolean'
'name':
'type': 'string'
'url':
'type': 'string'
'type': 'object'
'url': 'url':
'type': 'string' 'type': 'string'
'whitelist': 'whitelist':
@ -1860,6 +1856,8 @@
'description': 'Previously added URL containing filtering rules' 'description': 'Previously added URL containing filtering rules'
'type': 'string' 'type': 'string'
'example': 'https://filters.adtidy.org/windows/filters/15.txt' 'example': 'https://filters.adtidy.org/windows/filters/15.txt'
'whitelist':
'type': 'boolean'
'QueryLogItem': 'QueryLogItem':
'type': 'object' 'type': 'object'
'description': 'Query log item' 'description': 'Query log item'