Skip to content

Conversation

@agrja-rastogi-okta
Copy link
Contributor

@agrja-rastogi-okta agrja-rastogi-okta commented Feb 9, 2026

Overview

This PR updates the OpenAPI specification for the Email Server API to correct the response schema definitions for GET and LIST operations.

Changes Made

1. GET Email Server Response (/api/v1/email-servers/{serverId})

  • Previous Response Type: EmailServerListResponse
  • Updated Response Type: EmailServerResponse
  • Reason: The GET operation should return a single EmailServerResponse object, not the list wrapper schema

2. LIST Email Servers Response (/api/v1/email-servers)

  • Previous Schema: EmailServerListResponse (wrapper object with email-servers array property)
  • Updated Schema: Direct array of EmailServerResponse objects
  • Changes:
    • Removed type: object and properties: email-servers wrapper
      • Changed to type: array with direct items reference to EmailServerResponse
    • Simplified API contract for list operations

3. Component Schema Update

  • EmailServerListResponse definition restructured to be a direct array type instead of a wrapped object
  • Improves consistency with REST API conventions where list endpoints return arrays directly
  • Simplifies client code generation (no need to unwrap objects)

Benefits

Correct response types for GET and LIST operations
Simplified API contract
Better alignment with REST conventions

Testing

  • Generated API code will reflect these schema changes
  • Test cases for Email Server API GET and LIST operations will use the correct response types

Impact

  • Breaking Change: Yes, for clients expecting the wrapped EmailServerListResponse structure
  • Migration: Clients should update to expect arrays directly from list operations
  • SDK Generation: New SDK generation will produce correct type bindings

Files Modified:

  • src/swagger/api.yaml

@agrja-rastogi-okta agrja-rastogi-okta changed the title Okta 1110557 OKTA-1110557: Update Email Server API response schema definitions Feb 9, 2026
@agrja-rastogi-okta agrja-rastogi-okta marked this pull request as ready for review February 9, 2026 03:39
Copy link
Contributor

@prachi-okta prachi-okta left a comment

Choose a reason for hiding this comment

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

LGMT

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