Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 47f335f

Browse files
committed
Fixes 5 remaining tests
1 parent e1d6c3a commit 47f335f

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

  • modules/openapi-json-schema-generator/src/main/resources/python
  • samples/openapi3/client/petstore/python/petstore_api

modules/openapi-json-schema-generator/src/main/resources/python/schemas.handlebars

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,6 +2385,9 @@ class BytesSchema(
23852385
"""
23862386
this class will subclass bytes and is immutable
23872387
"""
2388+
class MetaOapg:
2389+
types = {bytes}
2390+
23882391
def __new__(cls, _arg: bytes, **kwargs: Configuration):
23892392
return super(Schema, cls).__new__(cls, _arg)
23902393

@@ -2409,6 +2412,8 @@ class FileSchema(
24092412
- to allow file reading and writing to disk
24102413
- to be able to preserve file name info
24112414
"""
2415+
class MetaOapg:
2416+
types = {FileIO}
24122417

24132418
def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration):
24142419
return super(Schema, cls).__new__(cls, _arg)

samples/openapi3/client/petstore/python/petstore_api/schemas.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,6 +2352,9 @@ class BytesSchema(
23522352
"""
23532353
this class will subclass bytes and is immutable
23542354
"""
2355+
class MetaOapg:
2356+
types = {bytes}
2357+
23552358
def __new__(cls, _arg: bytes, **kwargs: Configuration):
23562359
return super(Schema, cls).__new__(cls, _arg)
23572360

@@ -2376,6 +2379,8 @@ class FileSchema(
23762379
- to allow file reading and writing to disk
23772380
- to be able to preserve file name info
23782381
"""
2382+
class MetaOapg:
2383+
types = {FileIO}
23792384

23802385
def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration):
23812386
return super(Schema, cls).__new__(cls, _arg)

0 commit comments

Comments
 (0)