This commit is contained in:
Arthur
2026-02-12 13:36:50 -08:00
parent a2f31b1094
commit fbd74d3b2c
2 changed files with 1 additions and 5 deletions

View File

@@ -27,11 +27,6 @@ router.register('config-context-profiles', views.ConfigContextProfileViewSet)
router.register('config-templates', views.ConfigTemplateViewSet)
router.register('scripts', views.ScriptViewSet, basename='script')
# Map POST to the script detail route for running scripts (without affecting the list route)
for route in router.routes:
if route.name == '{basename}-detail':
route.mapping['post'] = 'post'
app_name = 'extras-api'
urlpatterns = [
path('dashboard/', views.DashboardView.as_view(), name='dashboard'),

View File

@@ -264,6 +264,7 @@ class ConfigTemplateViewSet(SyncedDataMixin, ConfigTemplateRenderMixin, NetBoxMo
#
@extend_schema_view(
create=extend_schema(exclude=True), # Hide POST from list endpoint in Swagger
update=extend_schema(request=serializers.ScriptInputSerializer),
partial_update=extend_schema(request=serializers.ScriptInputSerializer),
)