mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
Fixes for openapi-core version 0.19 (reported upstream)
|
|
--- 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:
|