Add validate decorator to expose
Unit test coverage is provided by the patch tests in ironic.tests.unit.api.controllers.v1.test_types Story: 1651346 Task: 10551 Change-Id: I11c0ef3f5b008fb55cf2470c5f78fa12a8ad6861
This commit is contained in:
@@ -20,7 +20,6 @@ import platform
|
||||
|
||||
import mock
|
||||
from pecan import rest
|
||||
import wsme
|
||||
|
||||
from ironic.api.controllers.v1 import types
|
||||
from ironic.api import expose
|
||||
@@ -107,7 +106,7 @@ class MyPatchType(types.JsonPatchType):
|
||||
class MyTest(rest.RestController):
|
||||
"""Helper class for TestJsonPatchType tests."""
|
||||
|
||||
@wsme.validate([MyPatchType])
|
||||
@expose.validate([MyPatchType])
|
||||
@expose.expose([str], body=[MyPatchType])
|
||||
def patch(self, patch):
|
||||
return patch
|
||||
|
||||
Reference in New Issue
Block a user