mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-27 01:36:11 -06:00
9608 for writable serializers
This commit is contained in:
parent
6fc5edda56
commit
8089386c1d
@ -7,10 +7,10 @@ from drf_spectacular.extensions import (
|
|||||||
)
|
)
|
||||||
from drf_spectacular.openapi import AutoSchema
|
from drf_spectacular.openapi import AutoSchema
|
||||||
from drf_spectacular.plumbing import (
|
from drf_spectacular.plumbing import (
|
||||||
build_media_type_object,
|
|
||||||
ComponentRegistry,
|
ComponentRegistry,
|
||||||
ResolvedComponent,
|
ResolvedComponent,
|
||||||
build_basic_type,
|
build_basic_type,
|
||||||
|
build_media_type_object,
|
||||||
build_object_type,
|
build_object_type,
|
||||||
is_serializer,
|
is_serializer,
|
||||||
)
|
)
|
||||||
@ -58,6 +58,7 @@ class NetBoxAutoSchema(AutoSchema):
|
|||||||
4. bulk operations don't have pagination
|
4. bulk operations don't have pagination
|
||||||
5. bulk delete should specify input
|
5. bulk delete should specify input
|
||||||
"""
|
"""
|
||||||
|
|
||||||
writable_serializers = {}
|
writable_serializers = {}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -215,8 +216,7 @@ class NetBoxAutoSchema(AutoSchema):
|
|||||||
|
|
||||||
request_body = {
|
request_body = {
|
||||||
'content': {
|
'content': {
|
||||||
media_type: build_media_type_object(schema, examples)
|
media_type: build_media_type_object(schema, examples) for media_type, schema, examples in content
|
||||||
for media_type, schema, examples in content
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if request_body_required:
|
if request_body_required:
|
||||||
|
Loading…
Reference in New Issue
Block a user