aports/testing/grommunio-admin-api/0002-enable-openapi-core-0.19.patch
Noel Kuntze cffa6dd838 testing/grommunio-admin-api: diverse fixes
- Switched redis to valkey
- Enhanced openapi-core patch
- Adapted grommunio-antispam patch for valkey
- New patch to enable sqlalchemy 2.x
- Fixed path ownership
2024-05-30 20:05:09 +00:00

32 lines
1.1 KiB
Diff

--- a/api/core.py
+++ b/api/core.py
@@ -22,12 +22,16 @@
from openapi_core.contrib.flask import FlaskOpenAPIRequest, FlaskOpenAPIResponse
if self.version < [0, 15, 0]:
from openapi_core import create_spec
- elif self.version < [0, 18, 0]:
+ elif self.version < [0, 19, 0]:
from openapi_core.spec.shortcuts import create_spec
+ else:
+ from jsonschema_path import SchemaPath
if self.version < [0, 18, 0]:
self.spec = create_spec(apiSpec)
- else:
+ elif self.version < [0, 19, 0]:
self.spec = openapi_core.Spec.from_dict(apiSpec)
+ else:
+ self.spec = SchemaPath.from_dict(apiSpec)
if self.version < [0, 15, 0]:
from openapi_core.shortcuts import RequestValidator, ResponseValidator
self.requestValidator = RequestValidator(self.spec)
--- a/res/openapi.yaml
+++ b/res/openapi.yaml
@@ -4858,7 +4858,6 @@
type: string
maxLength: 128
readOnly: True
- default: ""
maxUser:
type: integer
title: