From 5c965b755506201e5177f5764d3f9de4ef43a8cc Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Jul 27 2021 20:26:31 +0000 Subject: Patch around a tiny OpenAPI schema discrepancy --- diff --git a/fastapi-0.67.0-openapi-schema.patch b/fastapi-0.67.0-openapi-schema.patch new file mode 100644 index 0000000..95973be --- /dev/null +++ b/fastapi-0.67.0-openapi-schema.patch @@ -0,0 +1,11 @@ +diff -Naur fastapi-0.67.0-original/tests/test_tutorial/test_dataclasses/test_tutorial003.py fastapi-0.67.0/tests/test_tutorial/test_dataclasses/test_tutorial003.py +--- fastapi-0.67.0-original/tests/test_tutorial/test_dataclasses/test_tutorial003.py 2021-07-21 14:00:39.000000000 -0400 ++++ fastapi-0.67.0/tests/test_tutorial/test_dataclasses/test_tutorial003.py 2021-07-27 15:01:25.883497846 -0400 +@@ -84,6 +84,7 @@ + "properties": { + "name": {"title": "Name", "type": "string"}, + "items": { ++ "default": [], + "title": "Items", + "type": "array", + "items": {"$ref": "#/components/schemas/Item"}, diff --git a/python-fastapi.spec b/python-fastapi.spec index 181d23d..03cc20d 100644 --- a/python-fastapi.spec +++ b/python-fastapi.spec @@ -46,6 +46,13 @@ BuildArch: noarch # (https://github.com/tiangolo/fastapi/pull/3594) Patch0: https://github.com/tiangolo/fastapi/pull/3594.patch +# A tiny difference in the OpenAPI schema in one test is not easily explained. +# Since we are using quite a few dependencies at different versions than those +# pinned upstream, it’s also hard to make a useful upstream bug report. For +# now, we just patch the expected schema downstream. The difference is +# trivial—just an added default value. +Patch1: %{srcname}-0.67.0-openapi-schema.patch + BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros