Merge "api: Add response body schemas for server shares APIs"

This commit is contained in:
Zuul
2026-02-26 08:50:24 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 0 deletions

View File

@@ -73,6 +73,8 @@ show_response = {
'additionalProperties': False
}
delete_response = {'type': 'null'}
index_response = {
'title': 'Server shares',
'type': 'object',

View File

@@ -38,6 +38,7 @@ def _get_instance_mapping(context, server_id):
raise webob.exc.HTTPNotFound(explanation=e.format_message())
@validation.validated
class ServerSharesController(wsgi.Controller):
_view_builder_class = server_shares.ViewBuilder
@@ -231,6 +232,7 @@ class ServerSharesController(wsgi.Controller):
@wsgi.api_version("2.97")
@wsgi.response(200)
@wsgi.expected_errors((400, 403, 404, 409))
@validation.response_body_schema(schema.delete_response)
def delete(self, req, server_id, id):
context = req.environ["nova.context"]
# Get instance mapping to query the required cell database