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

chore: Define default resource and data source documentation template #1847

Merged
merged 4 commits into from Jan 17, 2024

Conversation

andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Jan 17, 2024

Description

Ticket: https://jira.mongodb.org/browse/CLOUDP-222897

Context:

  • Currently all generated documentation requires a new template to be defined.

Proposed Solution:

  • Define a generic template for resources as well as single/plural data sources.

For documentation that requires no specific changes the default template can be used and no new template needs to be created. In case specific adjustments are needed, the default template will serve as a starting point to define the new template.

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.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contribution guidelines
  • 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 defined an isolated PR with a relevant title as it will be used in the auto-generated changelog.

Testing

I ran export resource_name=cluster && make generate-doc and chcke that the default template was used.

@andreaangiolillo andreaangiolillo marked this pull request as ready for review January 17, 2024 11:15
@andreaangiolillo andreaangiolillo requested a review from a team as a code owner January 17, 2024 11:15
@andreaangiolillo andreaangiolillo merged commit aec40e2 into master Jan 17, 2024
39 checks passed
@andreaangiolillo andreaangiolillo deleted the CLOUDP-222897 branch January 17, 2024 13:46
Copy link
Collaborator

@AgustinBettati AgustinBettati left a comment

Choose a reason for hiding this comment

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

A small detail

# Import
## Add the import

For more information see: [MongoDB Atlas API - Search Node](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Atlas-Search/operation/createAtlasSearchDeployment) Documentation.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe we can remove this from the default template right? Not sure if we are capable of leaving this generic. Applies to the data source template as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe we can remove this from the default template right? Not sure if we are capable of leaving this generic.

we can have the import autogenerated if we define an import.txt in the example folder. similar to https://github.com/mongodb/terraform-provider-mongodbatlas/pull/1394/files#diff-ab6cba42e3e4a9f3642faec48e42d41f668902c8ffa3041a36bbc56e01c59913. What do you think?

applies to the data source template as well.

data sources do not have the import

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.

None yet

3 participants