Skip to content

Commit

Permalink
chore(sentry_apps): Move validators for sentryapps to sentry_apps (#7…
Browse files Browse the repository at this point in the history
  • Loading branch information
Christinarlong authored Oct 1, 2024
1 parent 93d0665 commit a49edf8
Show file tree
Hide file tree
Showing 21 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/sentry/api/endpoints/project_servicehook_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/sentry/api/endpoints/project_servicehooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/sentry/api/validators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/sentry/sentry_apps/api/parsers/sentry_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
File renamed without changes.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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):
Expand Down

0 comments on commit a49edf8

Please sign in to comment.