forked from loafle/openapi-generator-original
Don't include read-only properties in Python examples. (#9252)
* Don't include read-only properties in Python examples. When using a schema with read-only fields as API inputs, Python generates examples for those: this excludes them. * Fix tests
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
"""
|
||||
OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
import petstore_api
|
||||
from petstore_api.model.readonly import Readonly
|
||||
|
||||
|
||||
class TestReadonly(unittest.TestCase):
|
||||
"""Readonly unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def testReadonly(self):
|
||||
"""Test Readonly"""
|
||||
# FIXME: construct object with mandatory attributes with example values
|
||||
# model = Readonly() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user