Skip to content

Conversation

wtrocki
Copy link
Member

@wtrocki wtrocki commented Sep 16, 2025

Add X-ENABLE-EFFECTIVE-FIELDS Header Support to Create Cluster API

Summary

This PR adds support for the X-ENABLE-EFFECTIVE-FIELDS header parameter to the createCluster operation in the Atlas SDK Go client. This header allows consumers (like Terraform providers) to enable/disable effective fields functionality on a per-request basis.

Changes Made

OpenAPI Specification Updates

  • Added new header parameter: xEnableEffectiveFields in the components parameters section

    • Parameter name: X-ENABLE-EFFECTIVE-FIELDS
    • Type: boolean
    • Default value: false
    • Required: false
    • Description: "Flag that indicates whether to enable effective fields functionality. Set to true to enable or false to disable."
  • Updated createCluster operation: Added reference to the new header parameter in the createCluster operation parameters list

Generated SDK Changes

  • The OpenAPI transformation process has processed the new header parameter
  • When the SDK is regenerated, it will include methods to set this header for create cluster requests

Usage Example

Once the SDK is regenerated, consumers will be able to use the header like this:

req := client.ClustersApi.CreateCluster(ctx, groupId, &cluster)
req = req.XEnableEffectiveFields(true)  // Enable effective fields
result, _, err := req.Execute()

@wtrocki wtrocki requested a review from a team as a code owner September 16, 2025 13:02
@Copilot Copilot AI review requested due to automatic review settings September 16, 2025 13:02
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for the X-ENABLE-EFFECTIVE-FIELDS header parameter to the Atlas SDK's createCluster operation, allowing consumers to enable/disable effective fields functionality on a per-request basis.

  • Adds new xEnableEffectiveFields parameter definition in OpenAPI specification
  • Updates the createCluster operation to include the new header parameter
  • Generates corresponding Go SDK code with fluent API methods for setting the header

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
openapi/atlas-api.yaml Adds parameter definition and references it in createCluster operation
openapi/atlas-api-transformed.yaml Transforms the OpenAPI spec with the new header parameter
admin/api_clusters.go Generates Go SDK code with header support and fluent API methods

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@wtrocki wtrocki changed the title task: sdk support for headers task: sdk support for cluster feature flag example Sep 16, 2025
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.

1 participant