mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
OpenAPI: Include type key in schema object properties dict. (#7169)
This commit is contained in:
parent
bc4d52558b
commit
79d37bce4c
|
@ -413,6 +413,7 @@ class AutoSchema(ViewInspector):
|
|||
properties[field.field_name] = schema
|
||||
|
||||
result = {
|
||||
'type': 'object',
|
||||
'properties': properties
|
||||
}
|
||||
if required:
|
||||
|
|
|
@ -335,6 +335,7 @@ class TestOperationIntrospection(TestCase):
|
|||
'schema': {
|
||||
'type': 'array',
|
||||
'items': {
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
'text': {
|
||||
'type': 'string',
|
||||
|
@ -386,6 +387,7 @@ class TestOperationIntrospection(TestCase):
|
|||
'item': {
|
||||
'type': 'array',
|
||||
'items': {
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
'text': {
|
||||
'type': 'string',
|
||||
|
@ -532,6 +534,7 @@ class TestOperationIntrospection(TestCase):
|
|||
'content': {
|
||||
'application/json': {
|
||||
'schema': {
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
'text': {
|
||||
'type': 'string',
|
||||
|
|
Loading…
Reference in New Issue
Block a user