Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPP-3799: Add schemas to API views for phones #4660

Merged
merged 15 commits into from
May 3, 2024

Conversation

jwhitlock
Copy link
Member

Add the schema details for the phones views. No changes have been made to the API code. In the future, they can be updated to use the new serializers created for documentation purposes.

How to test

With PHONES_ENABLED=True:

  • In the browsable API at http://127.0.0.1:8000/api/v1/docs/, views are grouped, and each view function has documentation and examples
    • phones: Outbound
      • POST /api/v1/call/
      • POST /api/v1/message/
      • POST /api/v1/messages/
    • phones: Twilio
      • POST /api/v1/inbound_call/
      • POST /api/v1/inbound_sms/
      • POST /api/v1/sms_status/
      • POST /api/v1/voice_status/
    • phones
      • The CRUD views for /api/v1/inboundcontact/, /api/v1/realphone/, and /api/v1/relaynumber are unchanged. The changed views:
      • POST /api/v1/realphone/resend_welcome_sms
      • GET /api/v1/relaynumber/search/
      • GET /api/v1/relaynumber/suggestions/
      • GET /api/v1/vCard/{lookup_key}/

With IQ_ENABLED=True, an additional group is available, between "phones: Twilio" and "phones":

  • phones: Inteliquent
    • POST /api/v1/inbound_sms_iq

When running ./manage.py check --deploy, no views in api/views/phones.py have a drf_spectacular.W002 warning.

Copy link
Member

@groovecoder groovecoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2d3c8c4a-930c-4a2e-99fc-1b10660777d7_text

@groovecoder groovecoder added this pull request to the merge queue May 3, 2024
Merged via the queue into main with commit a256e89 May 3, 2024
28 checks passed
@groovecoder groovecoder deleted the api-spec-phone-views-mpp-3799 branch May 3, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants