diff --git a/src/sentry/api/endpoints/project_servicehook_details.py b/src/sentry/api/endpoints/project_servicehook_details.py index 265836305926c..8c1b1b60f5469 100644 --- a/src/sentry/api/endpoints/project_servicehook_details.py +++ b/src/sentry/api/endpoints/project_servicehook_details.py @@ -10,8 +10,8 @@ from sentry.api.bases.project import ProjectEndpoint from sentry.api.exceptions import ResourceDoesNotExist from sentry.api.serializers import serialize -from sentry.api.validators import ServiceHookValidator from sentry.constants import ObjectStatus +from sentry.sentry_apps.api.parsers.servicehook import ServiceHookValidator from sentry.sentry_apps.api.serializers.servicehook import ServiceHookSerializer from sentry.sentry_apps.models.servicehook import ServiceHook diff --git a/src/sentry/api/endpoints/project_servicehooks.py b/src/sentry/api/endpoints/project_servicehooks.py index 9a02239d5b285..cc1af074094d4 100644 --- a/src/sentry/api/endpoints/project_servicehooks.py +++ b/src/sentry/api/endpoints/project_servicehooks.py @@ -10,8 +10,8 @@ from sentry.api.base import region_silo_endpoint from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize -from sentry.api.validators import ServiceHookValidator from sentry.constants import ObjectStatus +from sentry.sentry_apps.api.parsers.servicehook import ServiceHookValidator from sentry.sentry_apps.api.serializers.servicehook import ServiceHookSerializer from sentry.sentry_apps.models.servicehook import ServiceHook from sentry.sentry_apps.services.hook import hook_service diff --git a/src/sentry/api/validators/__init__.py b/src/sentry/api/validators/__init__.py index 9836bf781fe22..455db4b7f387b 100644 --- a/src/sentry/api/validators/__init__.py +++ b/src/sentry/api/validators/__init__.py @@ -7,5 +7,4 @@ from .notifications import * # noqa: F401,F403 from .project import * # noqa: F401,F403 from .project_codeowners import * # noqa: F401,F403 -from .servicehook import * # noqa: F401,F403 from .userrole import * # noqa: F401,F403 diff --git a/src/sentry/api/validators/sentry_apps/schema.py b/src/sentry/sentry_apps/api/parsers/schema.py similarity index 100% rename from src/sentry/api/validators/sentry_apps/schema.py rename to src/sentry/sentry_apps/api/parsers/schema.py diff --git a/src/sentry/sentry_apps/api/parsers/sentry_app.py b/src/sentry/sentry_apps/api/parsers/sentry_app.py index 464e02ec67a1b..c2b987e4270bb 100644 --- a/src/sentry/sentry_apps/api/parsers/sentry_app.py +++ b/src/sentry/sentry_apps/api/parsers/sentry_app.py @@ -3,9 +3,9 @@ from rest_framework.serializers import Serializer, ValidationError from sentry.api.serializers.rest_framework.base import camel_to_snake_case -from sentry.api.validators.sentry_apps.schema import validate_ui_element_schema from sentry.integrations.models.integration_feature import Feature from sentry.models.apiscopes import ApiScopes +from sentry.sentry_apps.api.parsers.schema import validate_ui_element_schema from sentry.sentry_apps.models.sentry_app import ( REQUIRED_EVENT_PERMISSIONS, UUID_CHARS_IN_SLUG, diff --git a/src/sentry/api/validators/servicehook.py b/src/sentry/sentry_apps/api/parsers/servicehook.py similarity index 100% rename from src/sentry/api/validators/servicehook.py rename to src/sentry/sentry_apps/api/parsers/servicehook.py diff --git a/tests/sentry/api/validators/__init__.py b/tests/sentry/api/validators/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/tests/sentry/api/validators/sentry_apps/__init__.py b/tests/sentry/api/validators/sentry_apps/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/src/sentry/api/validators/sentry_apps/__init__.py b/tests/sentry/sentry_apps/api/parsers/__init__.py similarity index 100% rename from src/sentry/api/validators/sentry_apps/__init__.py rename to tests/sentry/sentry_apps/api/parsers/__init__.py diff --git a/tests/sentry/api/validators/sentry_apps/test_alert_rule_action.py b/tests/sentry/sentry_apps/api/parsers/test_alert_rule_action.py similarity index 93% rename from tests/sentry/api/validators/sentry_apps/test_alert_rule_action.py rename to tests/sentry/sentry_apps/api/parsers/test_alert_rule_action.py index c34fcbd77e4ea..19823df9593b9 100644 --- a/tests/sentry/api/validators/sentry_apps/test_alert_rule_action.py +++ b/tests/sentry/sentry_apps/api/parsers/test_alert_rule_action.py @@ -4,7 +4,7 @@ from typing import Any from fixtures.schema_validation import invalid_schema -from sentry.api.validators.sentry_apps.schema import validate_component +from sentry.sentry_apps.api.parsers.schema import validate_component class TestAlertRuleActionSchemaValidation(unittest.TestCase): diff --git a/tests/sentry/api/validators/sentry_apps/test_header.py b/tests/sentry/sentry_apps/api/parsers/test_header.py similarity index 89% rename from tests/sentry/api/validators/sentry_apps/test_header.py rename to tests/sentry/sentry_apps/api/parsers/test_header.py index 9121ea3461aa2..e5cab737e4410 100644 --- a/tests/sentry/api/validators/sentry_apps/test_header.py +++ b/tests/sentry/sentry_apps/api/parsers/test_header.py @@ -4,7 +4,7 @@ from typing import Any from fixtures.schema_validation import invalid_schema -from sentry.api.validators.sentry_apps.schema import validate_component +from sentry.sentry_apps.api.parsers.schema import validate_component class TestHeaderSchemaValidation(unittest.TestCase): diff --git a/tests/sentry/api/validators/sentry_apps/test_image.py b/tests/sentry/sentry_apps/api/parsers/test_image.py similarity index 92% rename from tests/sentry/api/validators/sentry_apps/test_image.py rename to tests/sentry/sentry_apps/api/parsers/test_image.py index edd09ab81ed17..0fc37c1524693 100644 --- a/tests/sentry/api/validators/sentry_apps/test_image.py +++ b/tests/sentry/sentry_apps/api/parsers/test_image.py @@ -4,7 +4,7 @@ from typing import Any from fixtures.schema_validation import invalid_schema -from sentry.api.validators.sentry_apps.schema import validate_component +from sentry.sentry_apps.api.parsers.schema import validate_component class TestImageSchemaValidation(unittest.TestCase): diff --git a/tests/sentry/api/validators/sentry_apps/test_issue_link.py b/tests/sentry/sentry_apps/api/parsers/test_issue_link.py similarity index 98% rename from tests/sentry/api/validators/sentry_apps/test_issue_link.py rename to tests/sentry/sentry_apps/api/parsers/test_issue_link.py index 97daf90192b24..01aec8d60cfec 100644 --- a/tests/sentry/api/validators/sentry_apps/test_issue_link.py +++ b/tests/sentry/sentry_apps/api/parsers/test_issue_link.py @@ -4,7 +4,7 @@ from typing import Any from fixtures.schema_validation import invalid_schema -from sentry.api.validators.sentry_apps.schema import validate_component +from sentry.sentry_apps.api.parsers.schema import validate_component class TestIssueLinkSchemaValidation(unittest.TestCase): diff --git a/tests/sentry/api/validators/sentry_apps/test_issue_media.py b/tests/sentry/sentry_apps/api/parsers/test_issue_media.py similarity index 94% rename from tests/sentry/api/validators/sentry_apps/test_issue_media.py rename to tests/sentry/sentry_apps/api/parsers/test_issue_media.py index 0bad18fe548a8..1600528222087 100644 --- a/tests/sentry/api/validators/sentry_apps/test_issue_media.py +++ b/tests/sentry/sentry_apps/api/parsers/test_issue_media.py @@ -4,7 +4,7 @@ from typing import Any from fixtures.schema_validation import invalid_schema -from sentry.api.validators.sentry_apps.schema import validate_component +from sentry.sentry_apps.api.parsers.schema import validate_component class TestIssueMediaSchemaValidation(unittest.TestCase): diff --git a/tests/sentry/api/validators/sentry_apps/test_markdown.py b/tests/sentry/sentry_apps/api/parsers/test_markdown.py similarity index 90% rename from tests/sentry/api/validators/sentry_apps/test_markdown.py rename to tests/sentry/sentry_apps/api/parsers/test_markdown.py index ffa989e714ed2..ea37bbfe2d061 100644 --- a/tests/sentry/api/validators/sentry_apps/test_markdown.py +++ b/tests/sentry/sentry_apps/api/parsers/test_markdown.py @@ -4,7 +4,7 @@ from typing import Any from fixtures.schema_validation import invalid_schema -from sentry.api.validators.sentry_apps.schema import validate_component +from sentry.sentry_apps.api.parsers.schema import validate_component class TestMarkdownSchemaValidation(unittest.TestCase): diff --git a/tests/sentry/api/validators/sentry_apps/test_schema.py b/tests/sentry/sentry_apps/api/parsers/test_schema.py similarity index 98% rename from tests/sentry/api/validators/sentry_apps/test_schema.py rename to tests/sentry/sentry_apps/api/parsers/test_schema.py index 25a8279ff8bcf..86b7d0e6cd63e 100644 --- a/tests/sentry/api/validators/sentry_apps/test_schema.py +++ b/tests/sentry/sentry_apps/api/parsers/test_schema.py @@ -1,7 +1,7 @@ import unittest from fixtures.schema_validation import invalid_schema_with_error_message -from sentry.api.validators.sentry_apps.schema import validate_ui_element_schema +from sentry.sentry_apps.api.parsers.schema import validate_ui_element_schema class TestSchemaValidation(unittest.TestCase): diff --git a/tests/sentry/api/validators/sentry_apps/test_select.py b/tests/sentry/sentry_apps/api/parsers/test_select.py similarity index 94% rename from tests/sentry/api/validators/sentry_apps/test_select.py rename to tests/sentry/sentry_apps/api/parsers/test_select.py index 870e87b991824..21f1a331ecfb0 100644 --- a/tests/sentry/api/validators/sentry_apps/test_select.py +++ b/tests/sentry/sentry_apps/api/parsers/test_select.py @@ -4,7 +4,7 @@ from typing import Any from fixtures.schema_validation import invalid_schema -from sentry.api.validators.sentry_apps.schema import validate_component +from sentry.sentry_apps.api.parsers.schema import validate_component class TestSelectSchemaValidation(unittest.TestCase): diff --git a/tests/sentry/api/validators/sentry_apps/test_stacktrace_link.py b/tests/sentry/sentry_apps/api/parsers/test_stacktrace_link.py similarity index 85% rename from tests/sentry/api/validators/sentry_apps/test_stacktrace_link.py rename to tests/sentry/sentry_apps/api/parsers/test_stacktrace_link.py index 848071d35c813..10f91f7b42f4c 100644 --- a/tests/sentry/api/validators/sentry_apps/test_stacktrace_link.py +++ b/tests/sentry/sentry_apps/api/parsers/test_stacktrace_link.py @@ -1,7 +1,7 @@ import unittest from fixtures.schema_validation import invalid_schema -from sentry.api.validators.sentry_apps.schema import validate_component +from sentry.sentry_apps.api.parsers.schema import validate_component class TestOpenInSchemaValidation(unittest.TestCase): diff --git a/tests/sentry/api/validators/sentry_apps/test_text.py b/tests/sentry/sentry_apps/api/parsers/test_text.py similarity index 94% rename from tests/sentry/api/validators/sentry_apps/test_text.py rename to tests/sentry/sentry_apps/api/parsers/test_text.py index de2860451f8fb..48ea6e25ad8f5 100644 --- a/tests/sentry/api/validators/sentry_apps/test_text.py +++ b/tests/sentry/sentry_apps/api/parsers/test_text.py @@ -4,7 +4,7 @@ from typing import Any from fixtures.schema_validation import invalid_schema -from sentry.api.validators.sentry_apps.schema import validate_component +from sentry.sentry_apps.api.parsers.schema import validate_component class TestTextSchemaValidation(unittest.TestCase): diff --git a/tests/sentry/api/validators/sentry_apps/test_textarea.py b/tests/sentry/sentry_apps/api/parsers/test_textarea.py similarity index 94% rename from tests/sentry/api/validators/sentry_apps/test_textarea.py rename to tests/sentry/sentry_apps/api/parsers/test_textarea.py index 323c490a514eb..bf9267bb0b528 100644 --- a/tests/sentry/api/validators/sentry_apps/test_textarea.py +++ b/tests/sentry/sentry_apps/api/parsers/test_textarea.py @@ -4,7 +4,7 @@ from typing import Any from fixtures.schema_validation import invalid_schema -from sentry.api.validators.sentry_apps.schema import validate_component +from sentry.sentry_apps.api.parsers.schema import validate_component class TestTextareaSchemaValidation(unittest.TestCase): diff --git a/tests/sentry/api/validators/sentry_apps/test_video.py b/tests/sentry/sentry_apps/api/parsers/test_video.py similarity index 88% rename from tests/sentry/api/validators/sentry_apps/test_video.py rename to tests/sentry/sentry_apps/api/parsers/test_video.py index dc1e2c49e564f..3864b23eaba6c 100644 --- a/tests/sentry/api/validators/sentry_apps/test_video.py +++ b/tests/sentry/sentry_apps/api/parsers/test_video.py @@ -1,7 +1,7 @@ import unittest from fixtures.schema_validation import invalid_schema -from sentry.api.validators.sentry_apps.schema import validate_component +from sentry.sentry_apps.api.parsers.schema import validate_component class TestVideoSchemaValidation(unittest.TestCase):