OpenAPI: Include type key in schema object properties dict. (#7169)

This commit is contained in:
Kentalot 2020-01-30 03:14:17 -08:00 committed by GitHub
parent bc4d52558b
commit 79d37bce4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -413,6 +413,7 @@ class AutoSchema(ViewInspector):
properties[field.field_name] = schema
result = {
'type': 'object',
'properties': properties
}
if required:

View File

@ -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',