Skip to content

Conversation

@manupedrozo
Copy link
Collaborator

Description

POC: Adding customization support in autogen.

  • Added support for ignoring operation attributes for schema generation via the config file: schema_ignore: true.
  • Enable custom implementation for API operations by overriding PerformRead/Create/Update/Delete functions.
  • Autogen resources now embed DefaultResourceAPIOperations, which provides stateless default implementations for all API operations (maintaining existing behavior).
  • Added support for id_attributes in the config file. This is necessary when the read path does not contain all the resource ID attributes (as is the case for org_service_account_secrets).
  • Generated the org_service_account_secrets resource
    • Implemented the custom PerformRead operation which uses the Org Service Account API and searches the secrets array by id (see orgserviceaccountsecretapi/custom_operations.go).
    • Added a basic acc test.

As this is a POC, it is missing tests for the new autogen functionality.

Alternative version: #3929

Link to any related issue(s): WRITING-34227

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contributing guides
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • If changes include deprecations or removals I have added appropriate changelog entries.
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@manupedrozo manupedrozo force-pushed the poc-autogen-customization-support-1 branch 3 times, most recently from 846e2b5 to 1e9b7ef Compare November 27, 2025 08:38
@manupedrozo manupedrozo force-pushed the poc-autogen-customization-support-1 branch from 1e9b7ef to ccea2c6 Compare November 27, 2025 11:22
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

This PR has gone 7 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 7 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!

@github-actions github-actions bot added the stale label Dec 3, 2025
@manupedrozo
Copy link
Collaborator Author

bump

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